8000 Add overridable login header, aside, alert, and language macros by edewit · Pull Request #55265 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Add overridable login header, aside, alert, and language macros - #55265

Merged
rmartinc merged 2 commits into
keycloak:mainfrom
edewit:feat/login-theme-chrome-hooks
Nov 26, 2026
Merged

rmartinc merged 2 commits into
keycloak:mainfrom
edewit:feat/login-theme-chrome-hooks

Conversation

@edewit
@edewit edewit commented Nov 17, 2026
Copy link
Copy Markdown
Contributor

Summary

  • Extract login chrome into overridable Base macros: header.ftl, aside.ftl, alert.ftl, and language-selector.ftl, alongside the existing footer.ftl hook, so custom themes can change brand content, side marketing/help text, alerts, and the locale selector without replacing template.ftl.
  • Keep the default aside empty; when a custom theme provides aside content, keycloak.v3 switches to a two-column layout on wide viewports.
  • Document the hooks in the UI customization guide, upgrading notes, and release notes.

Let custom themes customize brand content, a side marketing panel, alerts, and the locale selector without replacing template.ftl, matching the existing footer.ftl hook.

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
@edewit
edewit marked this pull request as ready for review November 24, 2026 09:01
@edewit
edewit requested review from a team as code owners November 24, 2026 09:01
Copilot AI balanced review requested due to automatic review settings November 24, 2026 09:01
@edewit
edewit force-pushed the feat/login-theme-chrome-hooks branch from 0ab2235 to 3d0fc6b Compare November 24, 2026 09:02
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

The aside is misplaced below 75rem, and whitespace compression removes meaningful formatting from custom help content.

1 open issue
What changed in this PR

This PR adds reusable login-theme hooks so custom themes can customize shared page elements without replacing template.ftl.

Changes:

  • Extract header, alert, and locale-selector markup into overridable macros and add an empty aside hook.
  • Add a wide-screen, two-column layout in keycloak.v3 when aside content is present.
  • Document the hooks in customization, upgrade, and release guides.
File Description
themes/​src/​main/​resources/​theme/​keycloak.v3/​login/​theme.properties Defines the aside CSS class.
themes/​src/​main/​resources/​theme/​keycloak.v3/​login/​resources/​css/​styles.css Adds aside positioning and a wide-screen layout.
themes/​src/​main/​resources/​theme/​base/​login/​template.ftl Calls the new macros and conditionally renders the aside.
themes/​src/​main/​resources/​theme/​base/​login/​language-selector.ftl Extracts the locale dropdown.
themes/​src/​main/​resources/​theme/​base/​login/​header.ftl Provides overridable brand content.
themes/​src/​main/​resources/​theme/​base/​login/​aside.ftl Provides an empty side-content hook.
themes/​src/​main/​resources/​theme/​base/​login/​alert.ftl Extracts feedback-alert markup.
docs/​guides/​ui-customization/​themes.adoc Explains the hooks and provides an aside example.
docs/​documentation/​upgrading/​topics/​changes/​changes-27_0_0.adoc Describes the new customization options.
docs/​documentation/​release_notes/​topics/​27_0_0.adoc Announces the login-theme hooks.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 24, 2026 09:05
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

The aside’s undefined narrow-screen grid area can cause horizontal overflow, while compressing overrides removes meaningful whitespace from custom content.

3 open issues

Review effort: Balanced

mabartos
mabartos previously approved these changes Nov 25, 2026
@mabartos mabartos left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@edewit Looks very good. Just small nitpicks

Preserve aside whitespace, stack the aside on narrow layouts, style
aside content with PatternFly content classes, and document the
header brandName parameter.

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 08:08
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 reported for the login-layout customization hooks and optional aside layout.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@mabartos mabartos left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@edewit LGTM, thanks!

@rmartinc rmartinc 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.

Thanks @edewit and @mabartos! I see you are also doing some improvements to the themes... 😄

@rmartinc
rmartinc merged commit 3ece1a6 into keycloak:main Nov 26, 2026
96 of 166 checks passed
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.

4 participants

D48
0