forge
Explore
Log in

Don't you dare go Hollow

🧭 reorganize sidebar nav groups

Browse files at this commit

6ecbb76ce6f56de43d8728306b9e2dc62680115eBurak BoduroğluParent: 08a1204
  • feat
    • 🧭 reorganize sidebar nav groups
Show full message
feat: 🧭 reorganize sidebar nav groups
- move marks, attendance, pomodoro and student-marks under Classes group
- move messages under Community group
- grades group becomes notes-only (Defter)
- update breadcrumbs and role-scope-matrix to match new hierarchy
- add Messages portal card to all dashboard roles
docs/role-scope-matrix.mdmodified+5 -4
@@ -30,11 +30,11 @@
3030
3131 | Sidebar group / item | Student | Teacher | Manager | Admin |
3232 |---|---|---|---|---|
33-| **classes** β€” Courses / Exams / Events | βœ… | βœ… | βœ… | βœ… |
34-| **grades** β€” Report card (`/marks`) | βœ… | ❌ | ❌ | ❌ |
35-| **grades** β€” Notes | βœ… | βœ… | βœ… | βœ… |
33+| **classes** β€” Courses / Exams / Events / exam grades | βœ… | βœ… | βœ… | βœ… |
34+| **grades** β€” Defter (`/notes`) | βœ… | βœ… | βœ… | βœ… |
35+| **community** β€” Messages / Question pool | βœ… | βœ… | βœ… | βœ… |
3636 | **students** β€” My attendance (`/attendance`) | βœ… | βœ… | βœ… | βœ… |
37-| **reports** β€” Student marks / attendance / work | ❌ | βœ… | βœ… | βœ… |
37+| **reports** β€” Student attendance / pomodoros / work | ❌ | βœ… | βœ… | βœ… |
3838 | **reports** β€” Staff work log | ❌ | ❌ | βœ… | βœ… |
3939 | **settings** β€” Settings / Terms | ❌ | ❌ | βœ… | βœ… |
4040 | **admin** β€” Users | ❌ | ❌ | ❌ | βœ… |
@@ -47,6 +47,7 @@
4747 | Exams | βœ… (enrolled scope) | βœ… | βœ… | βœ… |
4848 | Events | βœ… | βœ… (teacher badge) | βœ… | βœ… |
4949 | Report card | βœ… | ❌ | ❌ | ❌ |
50+| Messages | βœ… | βœ… | βœ… | βœ… |
5051 | Notes | βœ… | βœ… | βœ… | βœ… |
5152 | Student marks | ❌ | βœ… (teacher badge) | βœ… (teacher badge) | βœ… (teacher badge) |
5253 | Student attendance | ❌ | βœ… (teacher badge) | βœ… (teacher badge) | βœ… (teacher badge) |
src/components/layout/app-shell.tsxmodified+5 -5
@@ -31,10 +31,10 @@ export function AppShell(props: ParentProps) {
3131 const path = location().pathname;
3232 if (path === "/") return t("nav.home");
3333 if (path === "/notes") return `${t("nav.group.grades")} / ${t("nav.notes")}`;
34- if (path === "/messages") return `${t("nav.group.grades")} / ${t("nav.messages")}`;
35- if (path === "/marks") return `${t("nav.group.grades")} / ${t("nav.marks")}`;
36- if (path === "/attendance") return `${t("nav.group.grades")} / ${t("nav.attendance")}`;
37- if (path === "/pomodoro") return `${t("nav.group.grades")} / ${t("nav.pomodoro")}`;
34+ if (path === "/messages") return `${t("nav.group.community")} / ${t("nav.messages")}`;
35+ if (path === "/marks") return `${t("nav.group.classes")} / ${t("nav.marks")}`;
36+ if (path === "/attendance") return `${t("nav.group.classes")} / ${t("nav.attendance")}`;
37+ if (path === "/pomodoro") return `${t("nav.group.classes")} / ${t("nav.pomodoro")}`;
3838 if (path === "/courses" || path.startsWith("/courses/")) return `${t("nav.group.classes")} / ${t("nav.courses")}`;
3939 if (path === "/studies") return `${t("nav.group.classes")} / ${t("nav.studies")}`;
4040 if (path === "/clubs") return `${t("nav.group.classes")} / ${t("nav.clubs")}`;
@@ -45,7 +45,7 @@ export function AppShell(props: ParentProps) {
4545 if (path === "/questions" || path.startsWith("/questions/")) return `${t("nav.group.community")} / ${t("pool.title")}`;
4646 if (path.startsWith("/exam-room/")) return t("nav.exams");
4747 if (path === "/work") return `${t("nav.group.reports")} / ${t("nav.work")}`;
48- if (path === "/management/student-marks") return `${t("nav.group.reports")} / ${t("nav.studentMarks")}`;
48+ if (path === "/management/student-marks") return `${t("nav.group.classes")} / ${t("nav.studentMarks")}`;
4949 if (path === "/management/student-attendance") return `${t("nav.group.reports")} / ${t("nav.studentAttendance")}`;
5050 if (path === "/management/pomodoros") return `${t("nav.group.reports")} / ${t("nav.studentPomodoro")}`;
5151 if (path === "/management/staff-work") return `${t("nav.group.reports")} / ${t("nav.staffWork")}`;
src/components/layout/side-nav.tsxmodified+5 -5
@@ -67,6 +67,10 @@ const NAV_GROUPS: NavGroup[] = [
6767 { to: "/exams", labelKey: "nav.exams", Icon: IconExam },
6868 { to: "/events", labelKey: "nav.events", Icon: IconCalendar },
6969 { to: "/calendar", labelKey: "nav.calendar", Icon: IconCalendarDays },
70+ { to: "/marks", labelKey: "nav.marks", Icon: IconChart, exactRole: "student" },
71+ { to: "/management/student-marks", labelKey: "nav.studentMarks", Icon: IconChart, minRole: "teacher" },
72+ { to: "/attendance", labelKey: "nav.attendance", Icon: IconClipboardCheck, exactRole: "student" },
73+ { to: "/pomodoro", labelKey: "nav.pomodoro", Icon: IconClock, exactRole: "student" },
7074 ],
7175 },
7276 {
@@ -83,10 +87,6 @@ const NAV_GROUPS: NavGroup[] = [
8387 labelKey: "nav.group.grades",
8488 Icon: IconChart,
8589 items: [
86- { to: "/marks", labelKey: "nav.marks", Icon: IconChart, exactRole: "student" },
87- { to: "/attendance", labelKey: "nav.attendance", Icon: IconClipboardCheck, exactRole: "student" },
88- { to: "/pomodoro", labelKey: "nav.pomodoro", Icon: IconClock, exactRole: "student" },
89- { to: "/messages", labelKey: "nav.messages", Icon: IconMessage },
9090 { to: "/notes", labelKey: "nav.notes", Icon: IconNote },
9191 ],
9292 },
@@ -96,7 +96,6 @@ const NAV_GROUPS: NavGroup[] = [
9696 Icon: IconReportAnalytics,
9797 minRole: "teacher",
9898 items: [
99- { to: "/management/student-marks", labelKey: "nav.studentMarks", Icon: IconChart, minRole: "teacher" },
10099 { to: "/management/student-attendance", labelKey: "nav.studentAttendance", Icon: IconClipboardCheck, minRole: "teacher" },
101100 { to: "/management/pomodoros", labelKey: "nav.studentPomodoro", Icon: IconClock, minRole: "teacher" },
102101 { to: "/work", labelKey: "nav.work", Icon: IconBriefcase, minRole: "teacher", maxRole: "manager" },
@@ -108,6 +107,7 @@ const NAV_GROUPS: NavGroup[] = [
108107 labelKey: "nav.group.community",
109108 Icon: IconGlobe,
110109 items: [
110+ { to: "/messages", labelKey: "nav.messages", Icon: IconMessage },
111111 { to: "/questions", labelKey: "nav.questions", Icon: IconHelpCircle },
112112 ],
113113 },
src/pages/dashboard-page.tsxmodified+3 -0
@@ -231,6 +231,7 @@ function DashboardContent() {
231231 { Icon: IconCalendar, titleKey: "nav.events", to: "/events", descKey: "dashboard.portal.eventsDesc", stat: evc },
232232 { Icon: IconChart, titleKey: "nav.marks", to: "/marks", descKey: "dashboard.portal.marksDesc", stat: avgLabel() },
233233 { Icon: IconClock, titleKey: "nav.pomodoro", to: "/pomodoro", descKey: "dashboard.portal.pomodoroDesc" },
234+ { Icon: IconMessage, titleKey: "nav.messages", to: "/messages" },
234235 { Icon: IconNote, titleKey: "nav.notes", to: "/notes", descKey: "dashboard.portal.notesDesc", stat: nc },
235236 );
236237 return list;
@@ -247,6 +248,7 @@ function DashboardContent() {
247248 { Icon: IconClipboardCheck, titleKey: "nav.studentAttendance", to: "/management/student-attendance", descKey: "dashboard.portal.attendanceDesc", minRole: "teacher" },
248249 { Icon: IconClock, titleKey: "nav.studentPomodoro", to: "/management/pomodoros", descKey: "dashboard.portal.pomodoroDesc", minRole: "teacher" },
249250 { Icon: IconBriefcase, titleKey: "nav.work", to: "/work", descKey: "dashboard.portal.workDesc", minRole: "teacher" },
251+ { Icon: IconMessage, titleKey: "nav.messages", to: "/messages" },
250252 { Icon: IconNote, titleKey: "nav.notes", to: "/notes", descKey: "dashboard.portal.notesDesc", stat: nc },
251253 );
252254 return list;
@@ -262,6 +264,7 @@ function DashboardContent() {
262264 { Icon: IconChart, titleKey: "nav.studentMarks", to: "/management/student-marks", descKey: "dashboard.portal.studentMarksDesc", minRole: "teacher" },
263265 { Icon: IconClipboardCheck, titleKey: "nav.studentAttendance", to: "/management/student-attendance", descKey: "dashboard.portal.attendanceDesc", minRole: "teacher" },
264266 { Icon: IconClock, titleKey: "nav.studentPomodoro", to: "/management/pomodoros", descKey: "dashboard.portal.pomodoroDesc", minRole: "teacher" },
267+ { Icon: IconMessage, titleKey: "nav.messages", to: "/messages" },
265268 { Icon: IconNote, titleKey: "nav.notes", to: "/notes", descKey: "dashboard.portal.notesDesc", stat: nc },
266269 { Icon: IconSettings, titleKey: "nav.settings", to: "/management/settings", descKey: "dashboard.portal.settingsDesc", minRole: "manager" },
267270 { Icon: IconCalendarDays, titleKey: "nav.terms", to: "/management/terms", descKey: "dashboard.portal.termsDesc", minRole: "manager" },