# Sidebar-First Navigation Refactor Plan ## Scope Refactor dashboard navigation so section jumping is sidebar-driven across desktop and mobile, remove rendered TopBar/SubNav from dashboard flow, and eliminate offset/scroll artifacts caused by legacy top-nav layout assumptions. ## Current State Findings - `src/components/DashboardLayout.tsx` still renders `TopBar` + `SubNav` and offsets the main flex layout by `--topbar-height` and `--subnav-height`. - `src/components/Sidebar.tsx` has profile/tags/alerts but no section navigation and no mobile collapse/expand behavior. - `src/components/SubNav.tsx` contains section jump logic and labels (including disallowed recruiter label mismatch: `Significant Interventions`). - `src/hooks/useActiveSection.ts` maps section IDs to outdated tile keys (`core-skills`, `career-activity`, `education`) that do not reflect current `data-tile-id` anchors in `DashboardLayout.tsx`. ## Implementation Plan ### 1) Make DashboardLayout sidebar-first and remove top-nav render path File: `src/components/DashboardLayout.tsx` - Remove imports/usages of `TopBar` and `SubNav` from rendered output. - Remove topbar/subnav animation variants and dead section-click handler tied to SubNav. - Rework root layout to a single full-height flex shell with no `marginTop` or `calc(100vh - topbar/subnav)` offsets. - Keep main content scroll container behavior and anchor IDs unchanged (`data-tile-id` values remain jump targets). - Pass navigation support props to sidebar (active section + section click callback) so jumping logic lives in sidebar. ### 2) Add recruiter-facing sidebar navigation + mobile rail/drawer behavior File: `src/components/Sidebar.tsx` - Introduce a canonical nav config array with required order/labels and icon mapping: - `overview` / `UserRound` / tile `patient-summary` - `projects` / `Pill` / tile `projects` - `experience` / `Workflow` / tile `section-experience` - `education` / `GraduationCap` / tile `section-education` - `skills` / `Wrench` / tile `section-skills` - Add `Navigation` subsection with buttons/links for the five sections (icon + text in expanded mode). - Keep a separate `My Data` subsection above `Navigation` in expanded mode (profile block remains here). - Implement mobile-first collapse model: - Default mobile state collapsed. - Top hamburger control toggles expanded/collapsed. - Collapsed mobile rail renders hamburger + five icon-only jump controls. - Expanded mobile state renders full sidebar content (`My Data`, `Navigation`, tags, alerts/highlights). - Preserve desktop expanded behavior (full content visible), with nav included. - Ensure controls are keyboard operable and include ARIA semantics: - toggle button: `aria-label`, `aria-expanded`, `aria-controls` - nav region: semantic `