feat: Westside Basketball Keycloak login theme #130
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform!130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "129-feat-westside-keycloak-login-theme"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a CSS-only custom Keycloak login theme for Westside Basketball. The theme inherits from the default
keycloak(PatternFly v4) theme and overrides colors to match the Westside app's dark design system. Theme files are deployed via a Kubernetes ConfigMap mounted into the Keycloak pod.Changes
keycloak/themes/westside/login/theme.properties-- theme config inheriting fromkeycloak, loading parentlogin.cssplus customwestside.csskeycloak/themes/westside/login/resources/css/westside.css-- color overrides for page background (#0a0a0a), card surfaces (#141414), borders (#262626), primary buttons (#d42026), hover states (#e8333a), links, form inputs, alerts, social provider buttons, locale dropdown, and mobile breakpoints. Design tokens sourced fromwestside-app/src/app.css.terraform/main.tf-- newkubernetes_config_map_v1.keycloak_westside_themeresource containing both theme files; newwestside-themevolume on the Keycloak deployment using ConfigMap items with nested paths; new volume_mount at/opt/keycloak/themes/westside/login; theme caching disabled via--spi-theme-static-max-age=-1 --spi-theme-cache-themes=falseargs for dev iteration.tofu plan Output
tofu validatepasses. Fulltofu planrequires secrets from Salt pillar (not available in worktree). Expected plan:kubernetes_config_map_v1.keycloak_westside_themekubernetes_deployment_v1.keycloak(volume, volume_mount, args)Test Plan
make tofu-planon archbox to verify plan matches expected changesReview Checklist
tofu fmtandtofu validateRelated
PR #130 Review
DOMAIN REVIEW
Tech stack: Terraform/k8s (ConfigMap, volume mount, deployment args) + CSS (Keycloak theme overrides).
Terraform / k8s review:
ConfigMap structure -- Clean. Uses
file()to read from repo-local paths, keeping the source CSS/properties files as first-class files rather than inline HCL strings. Theitemsblocks with nestedpathvalues correctly reconstruct the Keycloak theme directory layout inside the container.Volume mount --
read_only: trueis correct for a theme ConfigMap. Mount path/opt/keycloak/themes/westside/loginaligns with Keycloak's theme directory convention.Theme caching disabled --
--spi-theme-static-max-age=-1 --spi-theme-cache-themes=falseadded to theargslist. This is appropriate for dev iteration as noted in the PR body. NIT: These flags should be removed (or made conditional) before production hardening, since they force Keycloak to re-read theme files on every request. Not a blocker for this PR since Keycloak is currently runningstart-devmode anyway.Namespace reference -- ConfigMap uses
kubernetes_namespace_v1.keycloak.metadata[0].name, consistent with the existingkeycloak_adminsecret pattern. No hardcoded namespace.No state-breaking changes -- This adds a new ConfigMap resource and modifies the existing deployment (volume, volume_mount, args). No renames, no moves, no imports. Safe to apply.
tofu fmt/tofu validate-- PR body confirms both pass. Alignment in thedatablock ("theme.properties" = .../"westside.css" = ...) looks correctly formatted.CSS review:
Design token fidelity -- I verified every hex value in
westside.cssagainstwestside-app/src/app.css:roottokens. All 12 tokens match exactly:#0a0a0a=--color-black,#141414=--color-dark,#262626=--color-gray-800#d42026=--color-red,#e8333a=--color-red-hover,#ffd700=--color-yellow#ffffff=--color-white,#f0f0f0=--color-gray-100,#a3a3a3=--color-gray-400#737373=--color-gray-600,4px=--radius,8px=--radius-lgOne off-palette value --
.select-auth-box-parent:hoveruses#1a1a1a(line 222), which is not in the Westside design token set. It falls between--color-dark(#141414) and--color-gray-800(#262626). This is a reasonable intermediate hover state but is technically an off-palette magic number. Non-blocking since it is a subtle hover shade.Redundant border declarations --
.card-pf(lines 49-50) sets bothborder-top: 4px solid #d42026andborder-color: #d42026. Theborder-coloron line 50 will override the top border's color (no-op since it is already #d42026) but also sets left/right/bottom border colors. If the intent is only a top accent border,border-coloralone would be cleaner. If the intent is all borders red, theborder-topshorthand is partially redundant. Minor clarity nit.CSS completeness -- Good coverage: page bg, card, header, form labels, form inputs (with focus states), primary/secondary buttons (with hover/focus), links, info footer, signup text, form options, alerts, social providers, locale dropdown, authenticator boxes, and mobile breakpoint. The comment header documenting the token mapping is excellent.
Accessibility -- Focus states are present for inputs and buttons (box-shadow outline pattern). Color contrast: white (#ffffff) on dark (#141414) card = 15.3:1 ratio, well above WCAG AAA. Red (#d42026) on dark (#0a0a0a) = ~5.2:1, above WCAG AA for large text. Muted text (#a3a3a3) on dark (#141414) = ~5.9:1, above AA.
Mobile breakpoint --
@media (max-width: 767px)is standard for PatternFly/Keycloak mobile. Card goes transparent to match page bg, which is the expected mobile pattern for Keycloak themes.BLOCKERS
None.
This is a CSS-only theme with Terraform infrastructure to deploy it. There is no executable code, no user input handling, no auth logic, and no secrets. The "new functionality with zero test coverage" blocker does not apply -- CSS themes are validated visually per the Test Plan, which appropriately includes manual viewport testing. No security surface is introduced.
NITS
Theme cache flags are dev-only --
--spi-theme-static-max-age=-1 --spi-theme-cache-themes=falseshould be tracked for removal when Keycloak moves to production mode. Consider a TODO comment or a follow-up issue.Off-palette hover color --
#1a1a1aon.select-auth-box-parent:hover(line 222) is not in the design token set. Consider using#141414(--color-dark) for consistency, or documenting the exception.Redundant border shorthand --
.card-pflines 49-50:border-top: 4px solid #d42026followed byborder-color: #d42026. The intent could be clearer. If only the top border accent is desired, remove theborder-colorline. If all borders should be red, useborder: 1px solid #d42026; border-top-width: 4px;instead.font-size: 29pxmagic number --#kc-header-wrapperusesfont-size: 29px(line 42). This is not from the Westside design token set. It appears to be a Keycloak-specific override, but documenting why 29px was chosen (or rounding to a standard value) would help future maintainers.SOP COMPLIANCE
129-feat-westside-keycloak-login-themematches issue #129plan-wkqPhase 15 is referenced in the task context but not in the PR body itself -- acceptable since the issue linkage provides traceability5467471says "fix: Westside Basketball Keycloak login theme" which is descriptivetofu fmtandtofu validateconfirmed passing per PR bodytofu planoutput: PR body explains plan requires Salt pillar secrets not available in worktree, and describes expected plan output textually. This is a known limitation of the worktree-based workflow. Acceptable.PROCESS OBSERVATIONS
VERDICT: APPROVED