From aca0494bf7dbbcf62b60e239c73cbd608c2566bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Tue, 28 Jul 2026 18:55:52 +0300 Subject: [PATCH] =?UTF-8?q?refactor(nav):=20=F0=9F=96=BC=EF=B8=8F=20update?= =?UTF-8?q?=20group=20icons,=20hide=20item=20icons=20in=20expanded=20sideb?= =?UTF-8?q?ar=20details,=20chevron-right=20rotate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - classes: school→guide, students: users→report-analytics, workspace: message→globe, school: school→grid - expanded details hide item icons (icons only on collapsed rail) - chevron-down→chevron-right with rotate-90 on open - summary has active bg, no default details marker --- src/components/layout/nav-items.ts | 12 ++++++++---- src/components/layout/side-nav.tsx | 25 +++++++++++++++++-------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/components/layout/nav-items.ts b/src/components/layout/nav-items.ts index 6169a91..e6cca5e 100644 --- a/src/components/layout/nav-items.ts +++ b/src/components/layout/nav-items.ts @@ -10,11 +10,15 @@ import { IconClock, IconClipboardCheck, IconExam, + IconGlobe, + IconGrid, + IconGuide, IconHelpCircle, IconHomework, IconHome, IconMessage, IconNote, + IconReportAnalytics, IconSchool, IconSettings, IconUserCog, @@ -115,7 +119,7 @@ const NAV_GROUPS: NavGroup[] = [ { id: "classes", labelKey: "nav.group.classes", - Icon: IconSchool, + Icon: IconGuide, items: [ CLASSES_ITEM, { id: "homework", to: "/homework", labelKey: "nav.homework", Icon: IconHomework }, @@ -132,7 +136,7 @@ const NAV_GROUPS: NavGroup[] = [ { id: "students", labelKey: "nav.group.students", - Icon: IconUsers, + Icon: IconReportAnalytics, items: [ STUDENTS_ITEM, CHILDREN_ITEM, @@ -144,7 +148,7 @@ const NAV_GROUPS: NavGroup[] = [ { id: "workspace", labelKey: "nav.group.community", - Icon: IconMessage, + Icon: IconGlobe, items: [ MEALS_ITEM, { id: "messages", to: "/messages", labelKey: "nav.messages", Icon: IconMessage }, @@ -155,7 +159,7 @@ const NAV_GROUPS: NavGroup[] = [ { id: "school", labelKey: "nav.group.school", - Icon: IconSchool, + Icon: IconGrid, items: [ SCHOOL_ITEM, { id: "staff-work", to: "/management/staff-work", labelKey: "nav.staffWork", Icon: IconBriefcase, minRole: "manager" }, diff --git a/src/components/layout/side-nav.tsx b/src/components/layout/side-nav.tsx index 77e9f86..afd2065 100644 --- a/src/components/layout/side-nav.tsx +++ b/src/components/layout/side-nav.tsx @@ -1,7 +1,7 @@ import { For, Show } from "solid-js"; import { Link, useRouterState } from "@tanstack/solid-router"; import { primaryNavItems, routeNavItem, sidebarNavGroups, type NavItem } from "@/components/layout/nav-items"; -import { IconChevronDown } from "@/components/ui/icons"; +import { IconChevronRight } from "@/components/ui/icons"; import { cn } from "@/lib/cn"; import { useAuth } from "@/stores/auth-context"; import { useShellFeed } from "@/stores/shell-feed-context"; @@ -66,7 +66,7 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean }) // rail falls through to the icon-only section below. const dropdown = () => !props.collapsed; const active = () => group.items.some((item) => current()?.id === item.id); - const links = ( + const renderLinks = (showIcon: boolean) => (