forge
Explore
Log in

Don't you dare go Hollow

✨ enhance dashboard documentation - clarify dashboard structure, role scoping, and design principles

Browse files at this commit

5eb75127bdf329ffbefc10bbe575c850fb11b69fBurak BoduroğluParent: aaa1045
  • feat
    • ✨ enhance dashboard documentation - clarify dashboard structure, role scoping, and design principles
    • update navigation patterns and role scope matrix for consistency
Show full message
feat: ✨ enhance dashboard documentation - clarify dashboard structure, role scoping, and design principles; update navigation patterns and role scope matrix for consistency
AGENTS.mdmodified+19 -2
@@ -69,8 +69,9 @@ Solid components run **once**, there is no re-render:
69 69
70 - Treat these docs as active project context before changing related areas:70 - Treat these docs as active project context before changing related areas:
71 - `docs/frontend-next-steps.md` — active backlog, role/pagination/request audit notes.71 - `docs/frontend-next-steps.md` — active backlog, role/pagination/request audit notes.
72- - `docs/navigation-patterns.md` — interaction rules, role scope, side-panel/full-page decisions.72+ - `docs/navigation-patterns.md` — interaction rules, role scope, side-panel/full-page decisions, dashboard structure.
73- - `docs/ui-redesign-tokens.md` — visual density, radius, table, side-panel, and status UI conventions.73+ - `docs/ui-redesign-tokens.md` — visual density, radius, table, side-panel, status UI, and dashboard card conventions.
74+ - `docs/role-scope-matrix.md` — role access matrix for pages/nav/dashboard cards.
74 - `docs/backend-ui-alignment-plan.md` — completed backend-alignment archive; do not treat it as active work unless backend scope changes.75 - `docs/backend-ui-alignment-plan.md` — completed backend-alignment archive; do not treat it as active work unless backend scope changes.
75 - Durable resources use full detail pages. Short create/edit/filter work uses `SidePanel`. Destructive actions use confirm dialogs.76 - Durable resources use full detail pages. Short create/edit/filter work uses `SidePanel`. Destructive actions use confirm dialogs.
76 - Header create actions use compact icon+label buttons with consistent size and current radius.77 - Header create actions use compact icon+label buttons with consistent size and current radius.
@@ -79,6 +80,22 @@ Solid components run **once**, there is no re-render:
79 - Lesson session roll call is teacher/manager workflow only. Students never self-mark lesson sessions; the session teacher or course manager marks enrolled students, and the session teacher's own presence row is manager-only per backend rules.80 - Lesson session roll call is teacher/manager workflow only. Students never self-mark lesson sessions; the session teacher or course manager marks enrolled students, and the session teacher's own presence row is manager-only per backend rules.
80 - Attendance status UI uses shared localized metadata: label, short detail text, and semantic colors.81 - Attendance status UI uses shared localized metadata: label, short detail text, and semantic colors.
81 82
83+## Dashboard / homepage design
84+
85+Reference: `src/pages/dashboard-page.tsx`. Homepage is a **read-only status board**, not a marketing landing or action hub.
86+
87+- **No mutations** on the dashboard: no create/edit/delete buttons, no primary CTAs that open forms. Links only navigate to existing list/detail routes.
88+- **Palette:** monochrome / grayscale surfaces (border, card, muted). Decorative color accents, gradients, activity charts, and multi-tone portal cards are out. **Semantic color only** for status (active / today / soon / danger).
89+- **Layout order (top → bottom):**
90+ 1. Compact header — greeting, role chip (neutral), date.
91+ 2. Role-scoped **workspace portal cards** (section links with optional counts).
92+ 3. **Needs attention** + **Upcoming** side by side on `lg+`, stacked on mobile.
93+- **Portal cards:** horizontal dense rows — icon | title + short desc | optional count. On desktop, title and count share one line as `Title | 12` (pipe separator, mono tabular count). No separate KPI strip that repeats the same numbers under the cards.
94+- **Grid:** `1` col mobile → `2` sm → `3` lg → `4` xl. Equal-ish min height; avoid uneven multi-line stat stacks.
95+- **Role scoping:** card set matches nav/role matrix (student personal tools; teacher teaching tools; manager+ management; admin gets staff-work + users, not personal `/work`). Optional min-role badge on a card is muted/neutral, not rainbow.
96+- **Attention list:** active / today / soon exams and events only; rows navigate to detail. Empty state is plain text, not a create CTA.
97+- Do not reintroduce guide marketing blocks, vanity charts, or redundant bottom KPI tiles.
98+
82 ## Containers99 ## Containers
83 100
84 - We use **Podman**, not Docker. Never suggest, generate, or run `docker` /101 - We use **Podman**, not Docker. Never suggest, generate, or run `docker` /
docs/frontend-next-steps.mdmodified+3 -2
@@ -8,7 +8,7 @@ validation, and list filtering cleanup.
8 8
9 - Backend alignment is complete for settings, terms, course sessions, attendance reports, work logs, exam attempts, and grade bands.9 - Backend alignment is complete for settings, terms, course sessions, attendance reports, work logs, exam attempts, and grade bands.
10 - Shared UI primitives cover dense tables, data toolbars, row action menus, side panels, confirm dialogs, date picking, and animated disclosures.10 - Shared UI primitives cover dense tables, data toolbars, row action menus, side panels, confirm dialogs, date picking, and animated disclosures.
11-- Dashboard is role-aware and read-only. Admin sees global course/exam scope; other roles use own/enrolled/related scope where the backend supports it.11+- Dashboard is a monochrome, role-aware, read-only status board: workspace portal cards (`Title | count` on desktop) + needs-attention / upcoming lists. No create CTAs, no vanity charts, no duplicate KPI strip. Admin sees global course/exam scope; other roles use own/enrolled/related scope where the backend supports it.
12 - Table and card actions use narrow centered three-dot menus through `TableRowActions`.12 - Table and card actions use narrow centered three-dot menus through `TableRowActions`.
13 - Dense tables have subtle column separators, fixed action columns, and stable date/number alignment.13 - Dense tables have subtle column separators, fixed action columns, and stable date/number alignment.
14 - Course creator display uses a username/display label when available; raw ids are fallback only.14 - Course creator display uses a username/display label when available; raw ids are fallback only.
@@ -77,7 +77,8 @@ validation, and list filtering cleanup.
77 - Session delete uses ConfirmDialog; exam room guards stale id on route change.77 - Session delete uses ConfirmDialog; exam room guards stale id on route change.
78 - Mobile bottom tab bar (home/courses/exams/notes/menu); exam-room hides tab chrome.78 - Mobile bottom tab bar (home/courses/exams/notes/menu); exam-room hides tab chrome.
79 - Shared ErrorAlert with try-again; lookup pages show person labels; profile shows localized role.79 - Shared ErrorAlert with try-again; lookup pages show person labels; profile shows localized role.
80-- Manager/admin dashboard portal includes daily tools + management cards; compact guide CTA on dashboard (guide stays in account menu).80+- Dashboard portal cards are role-ordered workspace links (manager/admin include management tools); guide stays in the account menu, not on the homepage.
81+- Dashboard layout: portal grid on top; attention + upcoming below (two columns from `lg`); grayscale cards with semantic status only.
81 - Terms page: SidePanel create/edit + dense table row actions; header create buttons use shared min-width/radius.82 - Terms page: SidePanel create/edit + dense table row actions; header create buttons use shared min-width/radius.
82 - Settings: dirty-state save gate and auto-clearing success message.83 - Settings: dirty-state save gate and auto-clearing success message.
83 - Nested breadcrumbs on exam room and live monitor.84 - Nested breadcrumbs on exam room and live monitor.
docs/navigation-patterns.mdmodified+21 -1
@@ -5,7 +5,27 @@ Use one of two patterns for every new interaction:
5 - Full page: resources with a durable detail view, such as a course, exam, event, user, exam room, or live monitor. Full pages must include breadcrumbs when nested.5 - Full page: resources with a durable detail view, such as a course, exam, event, user, exam room, or live monitor. Full pages must include breadcrumbs when nested.
6 - Side panel: short contained work that should return the user to the same list context, such as create, quick edit, and filters.6 - Side panel: short contained work that should return the user to the same list context, such as create, quick edit, and filters.
7 7
8-Dashboard pages are observation-only. They must not contain create, edit, delete, or other mutation actions. A richer dashboard is allowed, but every section must remain informational and role-scoped.8+## Dashboard (homepage)
9+
10+Dashboard pages are **observation-only**. They must not contain create, edit,
11+delete, or other mutation actions. Links may navigate to list/detail routes;
12+they must not open create/edit panels from the homepage.
13+
14+Structure (see `docs/ui-redesign-tokens.md` → Dashboard and
15+`src/pages/dashboard-page.tsx`):
16+
17+1. Compact header (greeting, neutral role chip, date).
18+2. Role-scoped workspace portal cards (section navigation + optional counts).
19+3. Needs attention + Upcoming lists (side by side on large screens).
20+
21+Rules:
22+
23+- Monochrome/grayscale chrome; semantic color only for status badges.
24+- Portal cards: horizontal dense row; desktop title and count as `Title | N`.
25+- No redundant KPI strip under cards, no activity charts, no guide/marketing CTA blocks on the homepage.
26+- Card set is role-scoped and must stay aligned with nav/`docs/role-scope-matrix.md`
27+ (e.g. personal `/work` for teacher–manager only; admin uses staff-work + users).
28+- Attention items are time-sensitive exams/events only; empty states are informational text.
9 29
10 Role scope rules:30 Role scope rules:
11 31
docs/role-scope-matrix.mdmodified+1 -1
@@ -115,4 +115,4 @@
115 - ✅ = access granted115 - ✅ = access granted
116 - ❌ = access denied116 - ❌ = access denied
117 - ❌ (FE) = hidden by the frontend only — the backend permits the underlying own-data read; never treat as a security boundary117 - ❌ (FE) = hidden by the frontend only — the backend permits the underlying own-data read; never treat as a security boundary
118-- (badge) = visual indicator showing minimum role requirement on dashboard cards118+- (badge) = optional neutral min-role chip on dashboard portal cards (muted border; not a colored accent)
docs/ui-redesign-tokens.mdmodified+46 -2
@@ -2,8 +2,10 @@
2 2
3 ## Direction3 ## Direction
4 4
5-Dense school admin UI: Fintables-style tables, Cloudflare-style grouped sidebar,5+Dense school admin UI: Fintables-style tables, Cloudflare-style grouped sidebar
6-neutral surfaces, subtle borders, one blue accent.6+and status boards, neutral surfaces, subtle borders, one blue accent for
7+interactive chrome only. Dashboard and overview surfaces stay grayscale; color
8+is reserved for semantic status (success / warning / danger / info).
7 9
8 ## Color10 ## Color
9 11
@@ -79,6 +81,47 @@ Implemented:
79 - mono IDs and tabular metrics81 - mono IDs and tabular metrics
80 - neutral surfaces, subtle borders, no gradients or decorative cards82 - neutral surfaces, subtle borders, no gradients or decorative cards
81 83
84+## Dashboard (homepage)
85+
86+Reference implementation: `src/pages/dashboard-page.tsx`.
87+
88+### Intent
89+
90+- Observation / navigation board, not a mutation surface.
91+- Cloudflare-style density: quiet borders, flat cards, mono counts, no vanity decoration.
92+
93+### Structure
94+
95+1. Header — greeting, neutral role chip, date.
96+2. Workspace portal cards — role-scoped section links.
97+3. Needs attention + Upcoming — two columns from `lg`, stacked on small screens.
98+
99+### Portal card anatomy
100+
101+```text
102+┌──────────────────────────────────────────────┐
103+│ [icon] Courses | 12 │
104+│ Browse courses and class materials. │
105+└──────────────────────────────────────────────┘
106+```
107+
108+- Horizontal row: left icon box (muted border, no tinted fill), middle title + one-line description, count on the **same line as the title**.
109+- Desktop title/count separator: literal `|` in muted border color (`Title | 12`). Count uses `.mono` / tabular nums.
110+- No colored top bars, no per-card accent tints, no large stacked KPI under the description.
111+- Do not add a second KPI strip that repeats the same course/exam/event counts.
112+- Grid: `grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4`, compact padding (`px-3 py-3` / `sm:px-4`), min height ~4.5–5rem.
113+- Optional min-role badge is neutral (border + muted), hidden on the smallest width if it crowds the row.
114+
115+### Attention / upcoming lists
116+
117+- Divided list inside one bordered card; row is a full-width link.
118+- Status uses semantic color only (dot + small badge): active (emerald), today (amber), soon (muted).
119+- Empty states are plain text — never “create exam/event” CTAs.
120+
121+### Out of scope for dashboard
122+
123+- Activity bar charts, multi-color portal accents, guide/marketing footers, create shortcuts, redundant summary KPI tiles under the portal grid.
124+
82 ## Current Implementation Notes125 ## Current Implementation Notes
83 126
84 - Data-heavy admin and management views should prefer `DataToolbar`, `DataTableFrame`, and `.data-table`.127 - Data-heavy admin and management views should prefer `DataToolbar`, `DataTableFrame`, and `.data-table`.
@@ -91,6 +134,7 @@ Implemented:
91 - User-facing tables should prefer usernames/display names over raw ids; show raw ids only as fallback or in explicit id columns.134 - User-facing tables should prefer usernames/display names over raw ids; show raw ids only as fallback or in explicit id columns.
92 - Header actions use compact icon + label buttons with equal min-width; related sections should use matching badge labels and button sizing.135 - Header actions use compact icon + label buttons with equal min-width; related sections should use matching badge labels and button sizing.
93 - Attendance status UI uses shared metadata: localized label, short detail text, and semantic color classes.136 - Attendance status UI uses shared metadata: localized label, short detail text, and semantic color classes.
137+- Homepage/dashboard follows the **Dashboard (homepage)** section above; keep list pages dense-table oriented, not dashboard-card oriented.
94 138
95 Static wireframe:139 Static wireframe:
96 140