Skip to content

feat(ui): align page layout and add expandable sidenav rail (72px ↔ 240px) - #953

Merged
AntonTyb merged 4 commits into
mainfrom
feat/ui-style-2-page-sidenav
Sep 23, 2026
Merged

AntonTyb merged 4 commits into
mainfrom
feat/ui-style-2-page-sidenav

Conversation

@liutj-tech

@liutj-tech liutj-tech commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Aligns Area #2 (Page Layout & Expandable Sidenav Navigation Rail) from the Prototype Style Alignment Audit:

  • Makes the left navigation sidenav expandable/collapsible (isExpanded state + toggleExpand() in cmd/ui/app/app.ts):
    • Collapsed (72px icon rail): 56px × 56px circular pill items (border-radius: 28px), centered icons, 40px divider, and a chevron_right Expand button at the bottom.
    • Expanded (240px drawer): Smoothly transitions (0.2s cubic-bezier(0.2, 0, 0, 1)) to 240px width with 216px × 56px rounded pill items (border-radius: 28px, padding: 0 20px, gap: 16px), visible text labels (.nav-label), full-width divider, and a chevron_left Collapse button.
  • Updates active route highlight to Google Cloud Console blue pill (var(--mat-sys-primary-container, #d3e3fd) fill, var(--mat-sys-on-primary-container, #041e49) text & icon, 600 weight).

(Part 2 of 8 in the scoped UI Style Alignment series corresponding to Area #2 of the Style Inconsistency Table.)

Visual Comparison (Before vs. After)

Component-Level Diff (Area #2: Expandable Sidenav 72px Collapsed ↔ 240px Expanded)

Component Before vs After

📸 Full-Page Context Screenshot (Production vs. Prototype)

Full Page Context

Motivation & Context

Brings Area #2 of cmd/ui/ (app.ts, app.ng.html, app.scss) into visual alignment with the Google Cloud / Material 3 prototype specification, including the expandable/collapsible left navigation rail.

Key Changes

  • cmd/ui/app/app.ts: Add readonly isExpanded = signal(false); and toggleExpand().
  • cmd/ui/app/app.ng.html: Bind [class.nav-expanded], [class.nav-closed], and [class.expanded]="isExpanded()", render .nav-label when expanded, and add .nav-divider + .nav-expand-btn (chevron_right / chevron_left + Collapse).
  • cmd/ui/app/app.scss: Style the 72px collapsed icon rail (56px × 56px circular pills) and 240px expanded drawer (216px × 56px rounded pills) with Material 3 CSS custom properties and prototype hex fallbacks.
  • cmd/ui/screenshot_tests/test_utils.ts: Keep deterministic 200px content margin in BASE_SCREENSHOT_STYLES so existing inner-page screenshot baselines remain unaffected.

Verification & Testing

  • Commands Executed:
    • npm run lint (ESLint & Angular template lint passed cleanly)
    • npm run build (Angular production bundle compiled cleanly)
    • npm test -- --watch=false --browsers=ChromeHeadlessNoSandbox (616 of 616 SUCCESS)
    • npx playwright test (Playwright visual regression tests passed)

Related Issues / Bugs

N/A

TAG=agy
CONV=10ea5f21-5600-4e9d-91a0-f605c676b5bd

Align the page-container background (#ffffff) and fixed 200px sidenav drawer (#f8f9fa background, #e8eaed border, and #e8f0fe/#1a73e8 active route pill) with the prototype while keeping the drawer non-expandable.

TAG=agy
CONV=10ea5f21-5600-4e9d-91a0-f605c676b5bd

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces active link styling to the sidenav navigation items and updates layout colors and spacing. The feedback highlights the need to maintain themeability, specifically dark mode support, by replacing hardcoded hex colors with Material Design CSS custom properties. Additionally, it suggests removing redundant CSS declarations in the menu item container that are already inherited from parent elements.

Comment thread cmd/ui/app/app.scss Resolved
Comment thread cmd/ui/app/app.scss Resolved
Comment thread cmd/ui/app/app.scss Resolved
Comment thread cmd/ui/app/app.scss Resolved
@liutj-tech liutj-tech changed the title feat(ui): align page surface and fixed sidenav active pill styles feat(ui): align page layout and add expandable sidenav rail (72px ↔ 240px) Sep 22, 2026
@liutj-tech liutj-tech self-assigned this Sep 22, 2026
@liutj-tech
liutj-tech requested a review from AntonTyb September 22, 2026 21:56
@liutj-tech
liutj-tech marked this pull request as ready for review September 22, 2026 21:56
@AntonTyb
AntonTyb added this pull request to the merge queue Sep 23, 2026
Merged via the queue into main with commit 67de003 Sep 23, 2026
12 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.

2 participants