From 92aa7ebdba1fc063ecec006174b7797e690e39e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Wed, 22 Jul 2026 12:44:22 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=A8=20elevate=20dropdowns=20an?= =?UTF-8?q?d=20clean=20up=20empty=20state=20warning=20panels=20-=20upgrade?= =?UTF-8?q?=20DropdownMenu,=20Combobox,=20and=20Popover=20primitives=20wit?= =?UTF-8?q?h=20Apple=20HIG=20squircle=20containers,=20frosted=20glass=20bl?= =?UTF-8?q?ur,=20tactile=20press=20feedback,=20and=2044pt=20touch=20target?= =?UTF-8?q?s=20-=20add=20custom=20dropdown=20chevron=20indicator=20and=20r?= =?UTF-8?q?ounded-xl=20squircle=20styling=20to=20native=20Select=20compone?= =?UTF-8?q?nt=20-=20clean=20up=20EmptyState=20component=20by=20eliminating?= =?UTF-8?q?=20inner=20action=20button=20slot=20-=20remove=20redundant=20ac?= =?UTF-8?q?tion=20buttons=20inside=20empty=20warning=20panels=20across=20n?= =?UTF-8?q?otes,=20course=20teachers,=20course=20detail,=20and=20terms=20p?= =?UTF-8?q?ages=20-=20verify=20build=20and=20202/202=20vitest=20unit=20tes?= =?UTF-8?q?ts=20pass?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/course-teachers-panel.tsx | 11 +--- src/components/notes/note-list.tsx | 4 +- src/components/ui/combobox.tsx | 12 ++--- src/components/ui/dropdown-menu.tsx | 50 +++++++++---------- src/components/ui/empty-state.tsx | 13 ++--- src/components/ui/popover.tsx | 4 +- src/components/ui/select.tsx | 23 ++++++--- src/pages/course-detail-page.tsx | 8 --- src/pages/notes-page.tsx | 6 --- src/pages/terms-page.tsx | 6 --- 10 files changed, 55 insertions(+), 82 deletions(-) diff --git a/src/components/courses/course-teachers-panel.tsx b/src/components/courses/course-teachers-panel.tsx index 585a05b..5b004fa 100644 --- a/src/components/courses/course-teachers-panel.tsx +++ b/src/components/courses/course-teachers-panel.tsx @@ -8,7 +8,7 @@ import { Button } from "@/components/ui/button"; import { ConfirmDialog } from "@/components/ui/confirm-dialog"; import { DataTable } from "@/components/ui/data-table"; import { EmptyState } from "@/components/ui/empty-state"; -import { IconPlus, IconTrash } from "@/components/ui/icons"; +import { IconTrash } from "@/components/ui/icons"; import { SidePanel } from "@/components/ui/side-panel"; import { UserSearchSelect } from "@/components/users/user-search-select"; import { createFlash } from "@/lib/flash"; @@ -122,15 +122,6 @@ export function CourseTeachersPanel(props: { fallback={ props.onAssignOpenChange(true)}> - - {t("courses.assignTeacher")} - - ) : undefined - } /> } > diff --git a/src/components/notes/note-list.tsx b/src/components/notes/note-list.tsx index ea75629..8d8b086 100644 --- a/src/components/notes/note-list.tsx +++ b/src/components/notes/note-list.tsx @@ -1,4 +1,4 @@ -import { For, Show, createSignal, type JSX } from "solid-js"; +import { For, Show, createSignal } from "solid-js"; import type { Note } from "@/api/client"; import { NoteCard } from "@/components/notes/note-card"; import { NoteReaderPanel } from "@/components/notes/note-reader-panel"; @@ -8,7 +8,6 @@ export function NoteList(props: { notes: Note[]; emptyTitle: string; emptyDescription?: string; - emptyAction?: JSX.Element; onUpdate: (id: string, values: { title: string; content: string }) => Promise; onDelete: (id: string) => Promise; }) { @@ -22,7 +21,6 @@ export function NoteList(props: { } > diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx index a21f055..2b0582b 100644 --- a/src/components/ui/combobox.tsx +++ b/src/components/ui/combobox.tsx @@ -14,8 +14,8 @@ export function ComboboxInput( return ( ( ( return ( ( ( return ( ( return ( - + - + {local.children} @@ -82,7 +82,7 @@ export function DropdownMenuCheckboxItem( export function DropdownMenuLabel(props: ParentProps<{ class?: string }>) { return ( {props.children} @@ -90,7 +90,7 @@ export function DropdownMenuLabel(props: ParentProps<{ class?: string }>) { } export function DropdownMenuSeparator(props: { class?: string }) { - return ; + return ; } export function DropdownMenuRadioItem( @@ -103,17 +103,17 @@ export function DropdownMenuRadioItem( return ( - + - - + + @@ -129,15 +129,15 @@ export function DropdownMenuSubTrigger( return ( {local.children} - + ); } @@ -152,9 +152,9 @@ export function DropdownMenuSubContent( -

{props.title}

+

{props.title}

-

{props.description}

-
- -
{props.action}
+

{props.description}

); diff --git a/src/components/ui/popover.tsx b/src/components/ui/popover.tsx index 1ebc9fc..3439079 100644 --- a/src/components/ui/popover.tsx +++ b/src/components/ui/popover.tsx @@ -17,8 +17,8 @@ export function PopoverContent( ; export function Select(props: SelectProps) { const [local, rest] = splitProps(props, ["class"]); return ( - option]:bg-popover [&>option]:text-popover-foreground [&>option]:py-1.5", + local.class, + )} + {...rest} + /> + + + + + + ); } diff --git a/src/pages/course-detail-page.tsx b/src/pages/course-detail-page.tsx index 4dcd013..1fc231c 100644 --- a/src/pages/course-detail-page.tsx +++ b/src/pages/course-detail-page.tsx @@ -668,14 +668,6 @@ function CourseDetailContent() { fallback={ setShowEnrollPanel(true)}> - - {t("courses.enroll")} - - ) : undefined - } /> } > diff --git a/src/pages/notes-page.tsx b/src/pages/notes-page.tsx index a3da424..732b2ad 100644 --- a/src/pages/notes-page.tsx +++ b/src/pages/notes-page.tsx @@ -125,12 +125,6 @@ function NotesContent() { notes={pageItems()} emptyTitle={t("dashboard.emptyNotesTitle")} emptyDescription={t("notes.empty")} - emptyAction={ - - } onUpdate={(id, values) => wrap(async () => { await patchNoteById(id, values); diff --git a/src/pages/terms-page.tsx b/src/pages/terms-page.tsx index 2b8047c..23775c3 100644 --- a/src/pages/terms-page.tsx +++ b/src/pages/terms-page.tsx @@ -196,12 +196,6 @@ function TermsContent() { fallback={ - - {t("terms.create")} - - } /> } >