ui : polish model selector spacing and avatar sizing

Assisted-by: pi
This commit is contained in:
Aleksander Grygier
2026-09-02 19:55:45 +02:00
parent 4639af0752
commit 2184890983
5 changed files with 19 additions and 12 deletions
@@ -71,8 +71,8 @@
// Params badge fallback for trigger ids that carry no params token.
const { paramsFallback } = useModelParamsFallback({
modelId: () => triggerModel,
metaParams: () => selectedOption?.meta?.n_params
metaParams: () => selectedOption?.meta?.n_params,
modelId: () => triggerModel
});
const showOrgNameInTrigger = $derived(
@@ -264,7 +264,7 @@
<DropdownMenu.Content
align="end"
class="w-full md:min-w-80 md:max-w-[26rem] max-w-[calc(100vw-2rem)] !py-0"
class="w-full md:min-w-80 md:max-w-[26rem] max-w-[calc(100vw-2rem)] p-0!"
onOpenAutoFocus={(event) => event.preventDefault()}
>
<DropdownMenuSearchable
@@ -278,7 +278,7 @@
>
<!-- Option list; the search header sticks to the top and the actions
footer to the bottom of the content scrollport. -->
<div class="models-list">
<div class="models-list px-1.5">
{#if !ms.isCurrentModelInCache && currentModel}
<!-- Show unavailable model as first option (disabled) -->
<button
@@ -338,7 +338,12 @@
{#snippet footer()}
<!-- Sticky actions footer: reasoning effort panel.
Sticks to the bottom of the content scrollport. -->
<div onfocusin={clearHighlight} onmouseenter={clearHighlight} role="none">
<div
class="px-1.5"
onfocusin={clearHighlight}
onmouseenter={clearHighlight}
role="none"
>
<ModelsSelectorReasoningPanel />
</div>
{/snippet}
@@ -14,8 +14,8 @@
import { ActionIcon, ModelId } from '$lib/components/app';
import { HF_BASE_MODEL_TAG_REGEX, ICON_CLASS_DEFAULT, PATH_SEPARATOR } from '$lib/constants';
import { ModelCapability, ServerModelStatus } from '$lib/enums';
import { HuggingFaceService, ModelsService } from '$lib/services';
import { useModelParamsFallback } from '$lib/hooks/use-model-params-fallback.svelte';
import { HuggingFaceService, ModelsService } from '$lib/services';
import { modelsStore } from '$lib/stores';
import type { ModelOption } from '$lib/types/models';
import { modelLoadFraction, modelLoadProgressText } from '$lib/utils';
@@ -101,8 +101,8 @@
}));
const { paramsFallback } = useModelParamsFallback({
modelId: () => option.model,
metaParams: () => option.meta?.n_params
metaParams: () => option.meta?.n_params,
modelId: () => option.model
});
</script>
@@ -132,7 +132,7 @@
quantOrg={showBaseModelAvatar ? orgName : undefined}
quantPositionClass="-bottom-1 -right-1"
quantSize="h-3 w-3"
size="h-6 w-6"
size="size-5"
/>
{/if}
@@ -20,7 +20,7 @@
through the `child` snippet to keep Collapsible.Trigger's native button.
closeOnSelect keeps the menu open while the effort list is being used. -->
<DropdownMenu.Item
class="w-full min-w-0 cursor-pointer items-center gap-2 py-2 rounded-md text-left text-sm"
class="w-full min-w-0 cursor-pointer items-center gap-2 rounded-md text-left text-sm"
closeOnSelect={false}
>
{#snippet child({ props })}
@@ -9,7 +9,9 @@
</script>
{#if readme}
<section class="bg-muted/50 p-3 rounded-xl">
<section
class="p-3 rounded-3xl border border-border/30 bg-muted/60 shadow-xs dark:border-border/20"
>
<MarkdownContent allowHtml class="prose-sm max-w-none" content={readme} />
</section>
{/if}
@@ -38,7 +38,7 @@
</script>
<!-- Sticks to the top of the dropdown content's scrollport. -->
<div class="sticky top-0 z-20 px-1 pb-2 pt-2">
<div class="sticky top-0 z-20 p-1.5">
<SearchInput
bind:value={searchValue}
class={searchClass}