Repository navigation
Conversation
Signed-off-by: FayezBast <fayezbast15@gmail.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
DraggableTable leaves itemOrder stale for callers without restoreOrderOnDrop, so consecutive drags before an async refresh can save incorrect key-provider priorities.
1 open issue
What changed in this PR
This PR fixes user-profile attribute reordering in filtered lists, preserving the positions of hidden attributes and refreshing saved configuration before further reorder or delete actions.
Changes:
- Reorder visible attributes within their existing positions in the full profile.
- Track pending saves and reloads, and add optional drag-order restoration.
- Add regression tests for filtered reordering and deletion after a delayed save.
| File | Description |
|---|---|
js/apps/admin-ui/test/utils/AdminClient.ts |
Adds a helper to retrieve saved user profiles. |
js/apps/admin-ui/test/realm-settings/userprofile.spec.ts |
Tests hidden-position preservation and delayed-save deletion. |
js/apps/admin-ui/src/realm-settings/user-profile/UserProfileContext.tsx |
Tracks pending saves and profile reload completion. |
js/apps/admin-ui/src/realm-settings/user-profile/AttributesTab.tsx |
Reorders filtered attributes and guards reorder/delete actions. |
js/apps/admin-ui/src/authentication/components/DraggableTable.tsx |
Adds optional order restoration and adjusts drop handling. |
Review effort: Balanced
Signed-off-by: FayezBast <fayezbast15@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Dragging an attribute in a filtered list applied its drop position to the full user profile. This could save the wrong order and shift attributes hidden by the filter.
Reordering now moves visible attributes among their existing positions in the full list. The Attributes tab reloads the saved profile before accepting another reorder or delete, so both actions use the latest saved order.