Skip to content

Use browser routing in admin UI and restore native JumpLinks behavior#51160

Open
edewit wants to merge 1 commit into
keycloak:mainfrom
edewit:jumplinks
Open

Use browser routing in admin UI and restore native JumpLinks behavior#51160
edewit wants to merge 1 commit into
keycloak:mainfrom
edewit:jumplinks

Conversation

@edewit

@edewit edewit commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Switch the Admin Console from hash routing to browser routing with
server-side deep-link fallback, and handle routable tab clicks through
React Router so tab changes stay client-side. With path-based routing in
place, remove the ScrollForm hash-safe click override and rely on
PatternFly JumpLinks href/node behavior, including stable anchors for
bordered panels.

Closes #32979
Closes #45494
Related: patternfly/patternfly-react#12223

Signed-off-by: Erik Jan de Wit erikjan.dewit@gmail.com

Switch the Admin Console from hash routing to browser routing with
server-side deep-link fallback, and handle routable tab clicks through
React Router so tab changes stay client-side. With path-based routing in
place, remove the ScrollForm hash-safe click override and rely on
PatternFly JumpLinks href/node behavior, including stable anchors for
bordered panels.

Closes keycloak#39693
Closes keycloak#45494
Related: patternfly/patternfly-react#12223

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Copilot AI review requested due to automatic review settings July 25, 2026 11:30
@edewit
edewit requested review from a team as code owners July 25, 2026 11:30

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.

Pull request overview

Migrates the Admin Console to browser-based routing and restores native PatternFly JumpLinks behavior.

Changes:

  • Adds server-side deep-link fallback and browser-router configuration.
  • Routes tab clicks through React Router.
  • Reworks ScrollForm anchors and updates affected Playwright URLs.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
services/.../AdminConsole.java Adds SPA deep-link fallback.
js/libs/ui-shared/.../ScrollForm.tsx Uses native JumpLinks scrolling.
js/libs/ui-shared/.../FormPanel.tsx Adds stable panel anchors.
js/apps/admin-ui/test/.../saml-signature-defaults.spec.ts Updates browser-route URL.
js/apps/admin-ui/test/.../main.ts Updates navigation helper URL.
js/apps/admin-ui/test/.../default-trust.spec.ts Updates browser-route URL.
js/apps/admin-ui/src/main.tsx Configures browser routing and legacy URL migration.
js/apps/admin-ui/src/context/.../useHash.tsx Removes obsolete hash tracking.
js/apps/admin-ui/src/context/.../RealmContext.tsx Derives realms from pathnames.
js/apps/admin-ui/src/components/.../RoutableTabs.tsx Adds client-side tab navigation handlers.
js/apps/admin-ui/src/App.tsx Removes hash cleanup logic.

Comment on lines +73 to +75
scrollableSelector={`#${mainPageContentId}`}
label={label}
offset={100}

if (window.location.hash.startsWith("#/")) {
const hashPath = decodeURIComponent(window.location.hash.substring(1));
window.history.replaceState(null, "", `${basename}${hashPath}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use browser router instead of hash router for admin ui ScrollForm navigation does not update active section on click or scroll

2 participants