Skip to content

Style sidebar active gradient with theme colors - #238

Merged
jalexw merged 1 commit into
mainfrom
claude/zen-brown-whoorr
Sep 27, 2026
Merged

jalexw merged 1 commit into
mainfrom
claude/zen-brown-whoorr

Conversation

@jalexw

@jalexw jalexw commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Apply the auth server's white-label theme colors to the dashboard sidebar's active-item gradient, ensuring the active link indicator matches the deployment's branding (Wordmark and page background gradients).

Changes

  • New module sidebar-active-gradient-style.ts: Creates CSS custom property overrides for the sidebar active-item gradient (--sidebar-active-start and --sidebar-active-end) in both light and dark modes, using the configured theme colors
  • Root layout (app/layout.tsx): Apply the sidebar gradient style to the <html> element so it reaches the mobile sidebar (which renders in a portal outside the layout)
  • Authenticated layout (app/(client)/(authenticated)/layout.tsx): Extract the inline Link component to module scope as DashboardSidebarLink to prevent remounting on every render; now properly forwards the aria-current attribute that DashboardLayout sets for the current page
  • Environment documentation (.env.example): Clarify that theme colors now also style the sidebar active-item gradient, with guidance on color selection for legibility
  • Dependencies: Bump @schemavaults/theme to 0.30.0 and @schemavaults/ui to 0.111.0 to support the new gradient token overrides
  • Version bumps: Cascade dependency updates across auth-server, example resource server, and related packages

Implementation Details

The sidebar gradient style is set on <html> rather than the layout component so it applies to the mobile sidebar, which renders in a React portal outside the layout tree. The theme tokens default to the same brand colors as the theme colors, so this change is transparent unless SCHEMAVAULTS_AUTH_SERVER_THEME_COLOR_1/2 are configured.

https://claude.ai/code/session_01Vuugr5xmMe4QPKM1wFBkWW

…server-sdk:0.31.2, trpc-backend-init:0.9.68, openapi-docs-ui:0.1.9, auth-server:0.46.3, example-nextjs-resource-server:0.5.10 - @schemavaults/ui 0.111.0 + theme 0.30.0; mark the active dashboard sidebar item

Update @schemavaults/ui (0.110.1 -> 0.111.0) and @schemavaults/theme
(0.29.0 -> 0.30.0) everywhere. The new DashboardLayout marks the sidebar
item for the current page (longest matching url wins, so /admin/users
lights up "Users" rather than "Admin Dashboard", and /orgs/new falls back
to "Organizations") with a gradient wash, a glowing gradient bar and a
gradient label, and sets aria-current="page" on its link. The auth server
already passes usePathname, so it only needed the link to forward it:

- The sidebar's Link component is now a module-level component that
  forwards aria-current (and the onClick ui uses to close the mobile
  sidebar on tap) to next/link. It was an inline arrow before, which also
  gave DashboardLayout a new component type on every render and remounted
  every sidebar link.
- The gradient runs between the theme's --sidebar-active-start/-end
  tokens, which default to the brand blue and red. The root layout now
  points them at SCHEMAVAULTS_AUTH_SERVER_THEME_COLOR_1/2 (same defaults)
  through the theme's --sv-theme-{light,dark}-sidebar-active-* overrides
  on <html>, so white-label deployments get a gradient matching their
  wordmark and backgrounds, including in the portalled mobile sidebar.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Vuugr5xmMe4QPKM1wFBkWW
@jalexw jalexw self-assigned this Sep 27, 2026
@jalexw
jalexw merged commit 6f7339a into main Sep 27, 2026
55 checks passed
@jalexw
jalexw deleted the claude/zen-brown-whoorr branch September 27, 2026 15:40
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