From e7c5b53e7c858a6daeea06a6a0754bcb35483ea7 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 14:24:10 +0300 Subject: [PATCH] =?UTF-8?q?fix(courses):=20=F0=9F=A7=91=E2=80=8D?= =?UTF-8?q?=F0=9F=8F=AB=20rebuild=20class=20browsing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - make kind tabs, search, and term filters responsive - replace dense cards with compact course rows - simplify course workspace tabs and people management --- src/components/courses/course-card.tsx | 57 ++++ src/components/ui/data-toolbar.tsx | 11 +- src/components/ui/select.tsx | 8 +- src/pages/course-detail-page.tsx | 137 ++++------ src/pages/courses-page.test.tsx | 114 ++++++++ src/pages/courses-page.tsx | 363 +++++++++++-------------- 6 files changed, 396 insertions(+), 294 deletions(-) create mode 100644 src/components/courses/course-card.tsx create mode 100644 src/pages/courses-page.test.tsx diff --git a/src/components/courses/course-card.tsx b/src/components/courses/course-card.tsx new file mode 100644 index 0000000..a51956d --- /dev/null +++ b/src/components/courses/course-card.tsx @@ -0,0 +1,57 @@ +import { Show } from "solid-js"; +import { Link } from "@tanstack/solid-router"; +import type { Course } from "@/api/client"; +import { Badge } from "@/components/ui/badge"; +import { IconBook, IconChevronRight, IconUsers } from "@/components/ui/icons"; +import { personLabel } from "@/lib/person"; + +export function CourseCard(props: { + course: Course; + term: string; + enrolled?: boolean; + labels: { + capacity: string; + enrolled: string; + kind: string; + }; +}) { + const teachers = () => [props.course.creator, ...(props.course.teachers ?? [])] + .filter((person, index, all) => all.findIndex((row) => row.id === person.id) === index); + + return ( + +
{props.course.description || "—"}
+{props.labels.capacity}
+{props.course.capacity ?? "—"}
+