forge
Explore
Log in

Don't you dare go Hollow

🗺️ navigation and token docs match the app

Browse files at this commit

1747ea7d41c09751bdc49cd1bec7c3899e506076Burak BoduroğluParent: 50506d2
  • docs
    • 🗺️ navigation and token docs match the app
Show full message
docs: 🗺️ navigation and token docs match the app
- navigation-patterns: the real per-role group tree, module filtering,
  the mobile bar ids, the back button and route error behaviour, and the
  management pages in place of a /school hub that never existed
- detail pages use breadcrumbs, not in-page back buttons
- tokens: the shadcn and surface-* names are aliases; new code uses shadcn
docs/ui/navigation-patterns.mdmodified+28 -15
@@ -9,20 +9,30 @@ Use one of two patterns for every new interaction:
99
1010 - Desktop uses one fixed role navigation: `15rem` expanded and `4rem`
1111 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.
2227 - Account stays at sidebar bottom; profile, theme, language, guide, and logout
2328 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.
2636
2737 ## Hubs
2838
@@ -30,10 +40,13 @@ Use one of two patterns for every new interaction:
3040 - `/studies` and `/clubs` redirect to the matching `/courses?kind=...` view.
3141 - `/marks` is the student Progress hub; Report card and Attendance share tabs.
3242 - `/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.
3647 - Course workspaces stay shallow: Overview, Work, Sessions, People.
48+- Durable detail pages carry `Breadcrumbs` (hub → record), not an in-page
49+ back button.
3750
3851 ## Dashboard (homepage)
3952
docs/ui/ui-redesign-tokens.mdmodified+4 -0
@@ -31,6 +31,10 @@ Dark:
3131 Success, warning, destructive, and info remain semantic. Custom palette choice
3232 continues to override `--ui-accent`, which feeds `--primary`.
3333
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+
3438 Colored text uses the `*-text` tokens, never the fills: `text-primary-text`,
3539 `text-success-text`, `text-warning-text`, `text-info-text`,
3640 `text-destructive-text`. The fills (`bg-primary`, `bg-warning/10`, dots,