🗺️ navigation and token docs match the app
Browse files at this commit1747ea7d41c09751bdc49cd1bec7c3899e506076Parent: 50506d2- docs
- 🗺️ navigation and token docs match the app
2 changed files +32 -15
docs/ui/navigation-patterns.mdmodified+28 -15
| @@ -9,20 +9,30 @@ Use one of two patterns for every new interaction: | ||
| 9 | 9 | |
| 10 | 10 | - Desktop uses one fixed role navigation: `15rem` expanded and `4rem` |
| 11 | 11 | collapsed. Collapse preference persists. |
| 12 | -- Primary destinations come from `src/components/layout/nav-items.ts`; sidebar, | |
| 13 | - mobile bar, header route labels, and command search reuse that metadata. | |
| 14 | -- Student: Today, Classes, Calendar, Progress. | |
| 15 | -- Teacher: Today, Classes, Students, Calendar. | |
| 16 | -- Manager/admin: Today, Classes, Students, Calendar, School. | |
| 17 | -- Parent: Today, Children, Calendar, Meals. | |
| 18 | -- Unsupported destinations are hidden. Secondary destinations are ordered by | |
| 19 | - user intent: Academics (course work), Planning (events and appointments), | |
| 20 | - Workspace (personal tools), Community, then role-specific management. | |
| 21 | - Appointments is always visible under Planning. | |
| 12 | +- Everything comes from `src/components/layout/nav-items.ts`: a group tree | |
| 13 | + per role (`ADMIN_GROUPS` for manager and admin, `TEACHER_GROUPS`, | |
| 14 | + `STUDENT_GROUPS`, `PARENT_GROUPS`), filtered by role (`minRole`, | |
| 15 | + `exactRole`) and by the school's enabled modules. Sidebar, mobile sheet, | |
| 16 | + header route labels, breadcrumbs' hub labels and command search reuse it. | |
| 17 | +- Groups today: | |
| 18 | + - manager/admin: School management, Teaching & content, Student tracking, | |
| 19 | + School services, Institution, AI | |
| 20 | + - teacher: My classroom, Student tracking, Teaching & content, Other, AI | |
| 21 | + - student: Study, Teaching & content, AI, Other | |
| 22 | + - parent: My student, Institution, AI | |
| 23 | +- Every item has its own icon for its meaning; the collapsed sidebar shows | |
| 24 | + icons only, so two items must not share one. | |
| 25 | +- Unsupported destinations are hidden; "yakında" items are the one approved | |
| 26 | + placeholder. | |
| 22 | 27 | - Account stays at sidebar bottom; profile, theme, language, guide, and logout |
| 23 | 28 | live in its menu. Messages and notifications live in the top header. |
| 24 | -- Mobile keeps the primary bottom bar and ends with Account, which opens the | |
| 25 | - complete grouped navigation drawer. | |
| 29 | +- Mobile bottom bar: Home plus two ids per role from `PRIMARY_IDS_BY_ROLE`, | |
| 30 | + then Search and Menu; Menu opens the full grouped tree in a sheet. | |
| 31 | +- The header back button goes back in app history, or to the nearest | |
| 32 | + existing parent route on a deep link (`src/lib/back-target.ts`); it never | |
| 33 | + leaves the app. | |
| 34 | +- A route that throws renders `RouteErrorFallback` in the page slot; the | |
| 35 | + shell and navigation stay. | |
| 26 | 36 | |
| 27 | 37 | ## Hubs |
| 28 | 38 | |
| @@ -30,10 +40,13 @@ Use one of two patterns for every new interaction: | ||
| 30 | 40 | - `/studies` and `/clubs` redirect to the matching `/courses?kind=...` view. |
| 31 | 41 | - `/marks` is the student Progress hub; Report card and Attendance share tabs. |
| 32 | 42 | - `/attendance` redirects to the Attendance tab for old links. |
| 33 | -- `/students` is parent Children for parents and the staff lookup/report hub for | |
| 34 | - teacher+. | |
| 35 | -- `/school` groups settings, terms, staff work, meals, and admin-only users. | |
| 43 | +- `/students` is the parent's Children hub. | |
| 44 | +- School management pages live under `/management/*` (classes, academic | |
| 45 | + years, terms, settings, staff work, payments, modules, rosters); there is | |
| 46 | + no single `/school` page. | |
| 36 | 47 | - Course workspaces stay shallow: Overview, Work, Sessions, People. |
| 48 | +- Durable detail pages carry `Breadcrumbs` (hub → record), not an in-page | |
| 49 | + back button. | |
| 37 | 50 | |
| 38 | 51 | ## Dashboard (homepage) |
| 39 | 52 |
docs/ui/ui-redesign-tokens.mdmodified+4 -0
| @@ -31,6 +31,10 @@ Dark: | ||
| 31 | 31 | Success, warning, destructive, and info remain semantic. Custom palette choice |
| 32 | 32 | continues to override `--ui-accent`, which feeds `--primary`. |
| 33 | 33 | |
| 34 | +Token names: `text-muted-foreground` and `text-text-subtle`, `bg-card` and | |
| 35 | +`bg-surface-base` resolve to the same values (the shadcn names alias the | |
| 36 | +`surface-*`/`text-*` palette). New code uses the shadcn names; both stay valid. | |
| 37 | + | |
| 34 | 38 | Colored text uses the `*-text` tokens, never the fills: `text-primary-text`, |
| 35 | 39 | `text-success-text`, `text-warning-text`, `text-info-text`, |
| 36 | 40 | `text-destructive-text`. The fills (`bg-primary`, `bg-warning/10`, dots, |