From 7067ea0e3cde202267ca4203ca477106962e5b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Wed, 15 Jul 2026 09:19:21 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=93=9D=20Update=20project=20docum?= =?UTF-8?q?entation=20to=20reflect=20current=20state=20-=20Mark=20backend-?= =?UTF-8?q?ui-alignment-plan=20as=20completed=20archive=20-=20Add=20curren?= =?UTF-8?q?t=20follow-up=20document=20references=20-=20Document=20navigati?= =?UTF-8?q?on=20patterns=20(date=20picking,=20disclosures,=20resource=20st?= =?UTF-8?q?aleness)=20-=20Add=20UI=20redesign=20implementation=20notes=20(?= =?UTF-8?q?data=20tables,=20side=20panels,=20disclosures)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/backend-ui-alignment-plan.md | 12 ++- docs/frontend-next-steps.md | 121 ++++++++++++++++++++++++++++++ docs/navigation-patterns.md | 12 ++- docs/ui-redesign-tokens.md | 9 +++ 4 files changed, 150 insertions(+), 4 deletions(-) create mode 100644 docs/frontend-next-steps.md diff --git a/docs/backend-ui-alignment-plan.md b/docs/backend-ui-alignment-plan.md index 870e6c8..cb0e0da 100644 --- a/docs/backend-ui-alignment-plan.md +++ b/docs/backend-ui-alignment-plan.md @@ -1,4 +1,4 @@ -# Backend UI Alignment Plan +# Backend UI Alignment Plan (Completed Archive) ## Context @@ -17,7 +17,7 @@ Current frontend now supports: - Async duration derived from exam window. - Open exams untimed by default. -This plan covers the remaining backend features that need simple, low-complexity UI support. +This document is now a completed archive. It records the backend contract alignment work that was planned and implemented. Do not treat the commit list below as active work unless backend scope changes again. ## Product Principles @@ -28,7 +28,7 @@ This plan covers the remaining backend features that need simple, low-complexity - Run `bun run build` before every commit. - Commit messages must follow repository rules and require explicit user approval. -## Status +## Completion Status - Commit 1 complete in UI: live monitor shows absent count/status, attempt usage, and left timestamp; exam room summary shows attempt usage and left timestamp. - Commit 2 complete in UI: report card types accept grade-band fields and marks show `mark / grade` when backend sends labels. @@ -39,6 +39,12 @@ This plan covers the remaining backend features that need simple, low-complexity - Commit 7 complete in UI: teacher work log page supports check-in, check-out, and recent entry listing. - No planned backend-alignment commits remain. +## Current Follow-Up Documents + +- Active interaction rules: `docs/navigation-patterns.md`. +- Active visual reference: `docs/ui-redesign-tokens.md`. +- Active frontend backlog and dashboard plan: `docs/frontend-next-steps.md`. + ## Remaining Commit Order | Commit | Scope | Priority | diff --git a/docs/frontend-next-steps.md b/docs/frontend-next-steps.md new file mode 100644 index 0000000..8e957a9 --- /dev/null +++ b/docs/frontend-next-steps.md @@ -0,0 +1,121 @@ +# Frontend Next Steps + +This document tracks the remaining frontend work after the backend contract alignment, +dense table redesign, side-panel rollout, collapsible detail sections, and request-load +cleanup. + +## Current State + +- Backend alignment work is complete for settings, terms, course sessions, attendance reports, work logs, exam attempts, and grade bands. +- Navigation rules are documented in `docs/navigation-patterns.md`. +- Shared UI primitives now cover dense tables, data toolbars, side panels, confirm dialogs, date picking, and animated disclosures. +- Course detail and exam detail use animated disclosures for large sections. +- Closed disclosure sections do not mount their content, so hidden panels do not fetch data. +- Settings requests are cached and refreshed after settings patches. +- The Tabler icon dependency was removed after it caused excessive Vite module requests; sidebar icons now use local SVG wrappers. + +## Remaining Work + +### Notes UX + +- Replace note create/edit `FormDialog` with a `SidePanel` or a richer notebook writing layout. +- Decide whether the notes page should stay card-based or become a more structured notebook view. +- Keep note detail work lightweight unless notes become a durable resource with its own full page. + +### Exam Question Authoring + +- `ExamQuestionsPanel` still uses `FormDialog` for add/edit. +- This is acceptable while the question form stays small. +- Revisit as a `SidePanel` if question authoring grows or needs more vertical space. + +### Event Detail Optimization + +- Event detail still fetches attendance on initial page load. +- Consider wrapping attendance in `SectionDisclosure` so the attendance list fetches only when opened. +- Keep self-attendance visible if it remains a primary action. + +### Course Table Polish + +- Add a term filter to the courses page. +- Consider an enrolled/all filter for students if the list becomes large. +- Keep the table compact and preserve the full detail page for course resources. + +### Visual Consistency + +- Decide how far to extend the table/toolbar pattern to `events-page`, `notes-page`, `terms-page`, and `settings-page`. +- Preserve non-table layouts only where cards communicate the domain better than rows. + +## Dashboard Redesign Plan + +The homepage should become a richer, more useful dashboard while staying observation-only. +It must not contain create, edit, delete, or mutation actions. + +### Goals + +- Provide a high-signal overview of the school workspace. +- Make the first screen useful for students, teachers, managers, and admins. +- Keep all cards as links or read-only summaries. +- Reduce unnecessary initial API calls by fetching role-specific data only. + +### Role-Aware Sections + +- Student: + - today and upcoming events + - active/upcoming exams + - report-card snapshot + - enrolled courses + - recent notebook items +- Teacher: + - courses taught + - exams needing questions, monitoring, or grading + - recent attendance/session activity + - upcoming events +- Manager: + - term status + - active courses/events/exams + - settings/terms health links +- Admin: + - user role directory summary + - management links as read-only status cards + +### Layout Direction + +- Use a larger hero/status strip at the top with user context and date. +- Use a dense KPI row below it. +- Add a “Needs attention” panel for items requiring review. +- Add an “Upcoming timeline” panel for events/exams/sessions. +- Add compact linked lists for courses, exams, notes, and attendance summaries. +- Keep one page-level suspense boundary where practical and avoid spinner cascades. + +### Request Budget + +- Dashboard should not blindly fetch notes, events, exams, courses, and marks for every role. +- Target initial request counts: + - Student: at most 3-4 requests. + - Teacher: at most 3-4 requests. + - Manager/admin: at most 2-4 requests. +- If backend later adds a `/dashboard` endpoint, prefer it over multiple list fetches. + +## Request Budget Targets + +- `/courses`: max 2-3 initial API calls. +- `/courses/:id`: initial detail data only; closed sections should make zero extra requests. +- `/exams/:id`: initial exam data only plus role-required summary data; closed sections should make zero extra requests. +- `/events/:id`: consider lazy-loading attendance if the route feels heavy. +- Settings-dependent controls should share the cached settings request. + +## Docs Cleanup + +- Keep `docs/navigation-patterns.md` as the active interaction rulebook. +- Keep `docs/ui-redesign-tokens.md` as the visual system reference. +- Keep `docs/backend-ui-alignment-plan.md` as a completed archive unless backend scope changes. +- Update docs when a rule changes; do not let completed implementation plans look like active work. + +## Acceptance Checklist + +- `bun run build` passes. +- No native `date` or `datetime-local` inputs remain where the shared `DatePicker` should be used. +- Closed disclosure sections do not trigger network requests. +- Dashboard remains observation-only. +- Header create buttons use a consistent icon + label style. +- Detail routes do not show stale resource content after navigating between ids. diff --git a/docs/navigation-patterns.md b/docs/navigation-patterns.md index 74f8e10..4d90b84 100644 --- a/docs/navigation-patterns.md +++ b/docs/navigation-patterns.md @@ -5,8 +5,18 @@ Use one of two patterns for every new interaction: - 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. - Side panel: short contained work that should return the user to the same list context, such as create, quick edit, and filters. -Dashboard pages are observation-only. They may link to resource pages, but they must not contain create, edit, or delete actions. +Dashboard pages are observation-only. They may link to resource pages, but they must not contain create, edit, delete, or other mutation actions. A richer dashboard is allowed and encouraged, but every card or CTA must remain read-only navigation. Admin pages are action-oriented. Lists should use shared toolbar and table primitives, compact rows, sticky headers, fixed status/action columns, and pagination. Delete or destructive confirmation stays in a confirm dialog, not a side panel. + +Header create actions should use a consistent compact button shape: icon plus label, `size="sm"`, and `rounded-sm`. + +Date picking should use the shared `DatePicker` plus a separate `HH:mm` input when time is needed. Avoid native `date` and `datetime-local` controls in product forms. + +Animated disclosure sections must not mount their children while closed. Closed sections should not start API requests. + +Detail routes must avoid showing stale resource data after navigating between ids. If a resource id does not match the current route param, show a loading state instead of old content. + +Request budgets are part of the UX. Avoid fetching role-specific or hidden-section data until the current role and visible UI need it. diff --git a/docs/ui-redesign-tokens.md b/docs/ui-redesign-tokens.md index a633e94..127bc4b 100644 --- a/docs/ui-redesign-tokens.md +++ b/docs/ui-redesign-tokens.md @@ -76,6 +76,15 @@ Implemented: - mono IDs and tabular metrics - neutral surfaces, subtle borders, no gradients or decorative cards +## Current Implementation Notes + +- Data-heavy admin and management views should prefer `DataToolbar`, `DataTableFrame`, and `.data-table`. +- Quick create/edit flows should use `SidePanel`; destructive actions stay in confirm dialogs. +- Durable resources keep full detail pages with breadcrumbs. +- Large detail sections can use `SectionDisclosure`, but closed sections must not mount children or fetch data. +- Product date inputs should use the shared `DatePicker`; date-time flows should pair it with a compact `HH:mm` input. +- Sidebar icons are local SVG wrappers to keep development builds small and avoid large icon package module graphs. + Static wireframe: ```text