From 1747ea7d41c09751bdc49cd1bec7c3899e506076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Fri, 18 Sep 2026 12:16:28 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=97=BA=EF=B8=8F=20navigation=20an?= =?UTF-8?q?d=20token=20docs=20match=20the=20app=20-=20navigation-patterns:?= =?UTF-8?q?=20the=20real=20per-role=20group=20tree,=20module=20filtering,?= =?UTF-8?q?=20=20=20the=20mobile=20bar=20ids,=20the=20back=20button=20and?= =?UTF-8?q?=20route=20error=20behaviour,=20and=20the=20=20=20management=20?= =?UTF-8?q?pages=20in=20place=20of=20a=20/school=20hub=20that=20never=20ex?= =?UTF-8?q?isted=20-=20detail=20pages=20use=20breadcrumbs,=20not=20in-page?= =?UTF-8?q?=20back=20buttons=20-=20tokens:=20the=20shadcn=20and=20surface-?= =?UTF-8?q?*=20names=20are=20aliases;=20new=20code=20uses=20shadcn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/ui/navigation-patterns.md | 43 ++++++++++++++++++++++------------ docs/ui/ui-redesign-tokens.md | 4 ++++ 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/docs/ui/navigation-patterns.md b/docs/ui/navigation-patterns.md index a7640c9..acf0a5f 100644 --- a/docs/ui/navigation-patterns.md +++ b/docs/ui/navigation-patterns.md @@ -9,20 +9,30 @@ Use one of two patterns for every new interaction: - Desktop uses one fixed role navigation: `15rem` expanded and `4rem` collapsed. Collapse preference persists. -- Primary destinations come from `src/components/layout/nav-items.ts`; sidebar, - mobile bar, header route labels, and command search reuse that metadata. -- Student: Today, Classes, Calendar, Progress. -- Teacher: Today, Classes, Students, Calendar. -- Manager/admin: Today, Classes, Students, Calendar, School. -- Parent: Today, Children, Calendar, Meals. -- Unsupported destinations are hidden. Secondary destinations are ordered by - user intent: Academics (course work), Planning (events and appointments), - Workspace (personal tools), Community, then role-specific management. - Appointments is always visible under Planning. +- Everything comes from `src/components/layout/nav-items.ts`: a group tree + per role (`ADMIN_GROUPS` for manager and admin, `TEACHER_GROUPS`, + `STUDENT_GROUPS`, `PARENT_GROUPS`), filtered by role (`minRole`, + `exactRole`) and by the school's enabled modules. Sidebar, mobile sheet, + header route labels, breadcrumbs' hub labels and command search reuse it. +- Groups today: + - manager/admin: School management, Teaching & content, Student tracking, + School services, Institution, AI + - teacher: My classroom, Student tracking, Teaching & content, Other, AI + - student: Study, Teaching & content, AI, Other + - parent: My student, Institution, AI +- Every item has its own icon for its meaning; the collapsed sidebar shows + icons only, so two items must not share one. +- Unsupported destinations are hidden; "yakında" items are the one approved + placeholder. - Account stays at sidebar bottom; profile, theme, language, guide, and logout live in its menu. Messages and notifications live in the top header. -- Mobile keeps the primary bottom bar and ends with Account, which opens the - complete grouped navigation drawer. +- Mobile bottom bar: Home plus two ids per role from `PRIMARY_IDS_BY_ROLE`, + then Search and Menu; Menu opens the full grouped tree in a sheet. +- The header back button goes back in app history, or to the nearest + existing parent route on a deep link (`src/lib/back-target.ts`); it never + leaves the app. +- A route that throws renders `RouteErrorFallback` in the page slot; the + shell and navigation stay. ## Hubs @@ -30,10 +40,13 @@ Use one of two patterns for every new interaction: - `/studies` and `/clubs` redirect to the matching `/courses?kind=...` view. - `/marks` is the student Progress hub; Report card and Attendance share tabs. - `/attendance` redirects to the Attendance tab for old links. -- `/students` is parent Children for parents and the staff lookup/report hub for - teacher+. -- `/school` groups settings, terms, staff work, meals, and admin-only users. +- `/students` is the parent's Children hub. +- School management pages live under `/management/*` (classes, academic + years, terms, settings, staff work, payments, modules, rosters); there is + no single `/school` page. - Course workspaces stay shallow: Overview, Work, Sessions, People. +- Durable detail pages carry `Breadcrumbs` (hub → record), not an in-page + back button. ## Dashboard (homepage) diff --git a/docs/ui/ui-redesign-tokens.md b/docs/ui/ui-redesign-tokens.md index 34453eb..233d190 100644 --- a/docs/ui/ui-redesign-tokens.md +++ b/docs/ui/ui-redesign-tokens.md @@ -31,6 +31,10 @@ Dark: Success, warning, destructive, and info remain semantic. Custom palette choice continues to override `--ui-accent`, which feeds `--primary`. +Token names: `text-muted-foreground` and `text-text-subtle`, `bg-card` and +`bg-surface-base` resolve to the same values (the shadcn names alias the +`surface-*`/`text-*` palette). New code uses the shadcn names; both stay valid. + Colored text uses the `*-text` tokens, never the fills: `text-primary-text`, `text-success-text`, `text-warning-text`, `text-info-text`, `text-destructive-text`. The fills (`bg-primary`, `bg-warning/10`, dots,