From bf534718a6a7762c62ca9441a8747da857c849f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Sun, 2 Aug 2026 10:20:23 +0300 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=A7=B9=20drop=20the=20depreca?= =?UTF-8?q?ted=20IconPencilQuestion=20alias=20-=20migrate=20its=20two=20ca?= =?UTF-8?q?llers=20(command-palette,=20exam-detail=20questions=20tab)=20to?= =?UTF-8?q?=20=20=20IconExam,=20which=20the=20alias=20already=20forwarded?= =?UTF-8?q?=20to=20-=20remove=20the=20@deprecated=20shim=20from=20the=20ic?= =?UTF-8?q?on=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/command-palette.tsx | 3 +- src/components/ui/icons.tsx | 5 -- src/pages/course-detail-page.tsx | 63 ++++++++++++----------- src/pages/exam-detail-page.tsx | 4 +- 4 files changed, 37 insertions(+), 38 deletions(-) diff --git a/src/components/layout/command-palette.tsx b/src/components/layout/command-palette.tsx index 75d991b..dbf8730 100644 --- a/src/components/layout/command-palette.tsx +++ b/src/components/layout/command-palette.tsx @@ -11,7 +11,6 @@ import { IconLogout, IconMoon, IconNote, - IconPencilQuestion, IconSearch, IconSparkles, IconSun, @@ -155,7 +154,7 @@ export function CommandPalette(props: CommandPaletteProps) { title: t("command.action.askQuestion"), description: t("command.action.askQuestionDesc"), keywords: "question soru sor havuz ekle topluluk", - icon: IconPencilQuestion, + icon: IconExam, shortcut: `${mod}Q`, roleBadge: isStudent ? t("role.student") : undefined, onSelect: () => void navigate({ to: "/questions", search: { action: "new" } as any }), diff --git a/src/components/ui/icons.tsx b/src/components/ui/icons.tsx index ff89e06..6a1d641 100644 --- a/src/components/ui/icons.tsx +++ b/src/components/ui/icons.tsx @@ -507,11 +507,6 @@ export function IconExam(props: IconProps) { ); } -/** @deprecated Prefer IconExam — kept as stable alias. */ -export function IconPencilQuestion(props: IconProps) { - return ; -} - export function IconGuide(props: IconProps) { return ( diff --git a/src/pages/course-detail-page.tsx b/src/pages/course-detail-page.tsx index af31c2d..bb1d126 100644 --- a/src/pages/course-detail-page.tsx +++ b/src/pages/course-detail-page.tsx @@ -157,6 +157,10 @@ function CourseDetailContent() { .sort((a, b) => (a.starts_at ?? a.ends_at ?? 0) - (b.starts_at ?? b.ends_at ?? 0))[0], ); const rosterCount = createMemo(() => roster()?.length ?? 0); + // `teachers` is the backend's assigned-teacher list. The course creator is + // rendered separately below, so adding one here made an admin-created course + // look as though it had a teacher who was never assigned to it. + const assignedTeacherCount = createMemo(() => course()?.teachers?.length ?? 0); const countDescription = (count: number, item: string) => t("common.countItem", { count, item }); const enrolledUserIds = () => (roster() ?? []).map((row) => row.user.id); @@ -285,8 +289,8 @@ function CourseDetailContent() { {(c) => ( }> {t("common.accessDenied")}}> -
-
+
+