8000 Preserve hidden positions when reordering profile attributes by FayezBast · Pull Request #55560 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Preserve hidden positions when reordering profile attributes - #55560

Open
FayezBast wants to merge 2 commits into
keycloak:mainfrom
FayezBast:fix/filtered-profile-attribute-order
Open

FayezBast wants to merge 2 commits into
keycloak:mainfrom
FayezBast:fix/filtered-profile-attribute-order

Conversation

@FayezBast
Copy link
Copy Markdown

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.

Signed-off-by: FayezBast <fayezbast15@gmail.com>
@FayezBast
FayezBast requested review from a team as code owners November 25, 2026 23:42
Copilot AI balanced review requested due to automatic review settings November 25, 2026 23:42
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 00:31
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the filtered attribute reordering and save-refresh safeguards.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

8000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0