ui : line the section chevron up with the family chevrons

Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash
This commit is contained in:
Aleksander Grygier
2026-09-28 12:10:12 +02:00
parent 148d4e06dd
commit 46eb0a98ee
3 changed files with 15 additions and 2 deletions
@@ -17,6 +17,8 @@
defaultOpen?: boolean;
/** Controlled open state, for a caller that binds it. */
open?: boolean;
/** Extra classes for the chevron, to line it up with a row's own control. */
chevronClass?: string;
/** Hide the chevron while expanded, until the trigger is hovered. */
revealChevronOnHover?: boolean;
/** Where the trigger sits relative to the content. */
@@ -26,6 +28,7 @@
}
let {
chevronClass = '',
children,
defaultOpen = true,
inMenu = false,
@@ -40,7 +43,7 @@
{#snippet chevron()}
<span
class="ml-auto shrink-0 text-muted-foreground {open && revealChevronOnHover
class="ml-auto shrink-0 text-muted-foreground {chevronClass} {open && revealChevronOnHover
? 'opacity-0 group-hover:opacity-100'
: ''}"
>
@@ -547,6 +547,7 @@
<ModelsSection
backendId={group.kind === 'provider' ? (group.backendId ?? undefined) : undefined}
chevronClass="mr-7"
count={group.items.length}
defaultOpen={group.kind !== 'hidden'}
icon={group.kind === 'provider' ? undefined : groupIcon}
@@ -10,6 +10,8 @@
children: Snippet;
/** Renders the backend's logo in the header. */
backendId?: string;
/** Extra classes for the chevron, to line it up with a row's own control. */
chevronClass?: string;
/** Number shown next to the label, omitted when undefined. */
count?: number;
error?: boolean;
@@ -31,6 +33,7 @@
let {
backendId,
chevronClass = '',
children,
count,
defaultOpen = true,
@@ -52,7 +55,13 @@
let triggerStyle = $derived(sticky ? 'top: var(--dropdown-sticky-height, 0px)' : '');
</script>
<CollapsibleSection {defaultOpen} {revealChevronOnHover} {triggerClass} {triggerStyle}>
<CollapsibleSection
{chevronClass}
{defaultOpen}
{revealChevronOnHover}
{triggerClass}
{triggerStyle}
>
{#snippet trigger()}
{#if onBack}
<button