From fe1ce72b1f38f23d31fbcadd7aface79788f5a6a Mon Sep 17 00:00:00 2001 From: eti Date: Thu, 30 Jul 2026 18:47:19 +0200 Subject: [PATCH] web/settings: match SettingsNav to the design system navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the DS navigation frame gaps its items by 4px and clips each one so a long label cannot grow it taller. add both, with a truncating label span so clipped text ends in an ellipsis instead of vanishing. figma draws the item 36px tall where this renders 38px, but that 2px is the CSS border adding to a box whose figma stroke sits inside it, and Button md carries the same offset — leave it. add stories too: /settings is auth-gated, so storybook is the only place these four item states can be reviewed. Signed-off-by: eti --- .../settings/SettingsNav.stories.svelte | 54 +++++++++++++++++++ .../components/settings/SettingsNav.svelte | 8 +-- 2 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 web/src/lib/components/settings/SettingsNav.stories.svelte diff --git a/web/src/lib/components/settings/SettingsNav.stories.svelte b/web/src/lib/components/settings/SettingsNav.stories.svelte new file mode 100644 index 00000000..961fc407 --- /dev/null +++ b/web/src/lib/components/settings/SettingsNav.stories.svelte @@ -0,0 +1,54 @@ + + + + + {#snippet template(args)} +
+ +
+ {/snippet} +
+ + + {#snippet template(args)} +
+ +
+ {/snippet} +
+ + ({ id, label, href })) }}> + {#snippet template(args)} +
+ +
+ {/snippet} +
diff --git a/web/src/lib/components/settings/SettingsNav.svelte b/web/src/lib/components/settings/SettingsNav.svelte index e60c3c60..4326760a 100644 --- a/web/src/lib/components/settings/SettingsNav.svelte +++ b/web/src/lib/components/settings/SettingsNav.svelte @@ -27,7 +27,7 @@ // grows by 1px on hover. const itemClass = (isActive: boolean) => [ - "flex min-h-8 w-full items-center gap-1.5 rounded-sm border px-3 py-1.5", + "flex min-h-8 w-full items-center gap-1.5 overflow-hidden rounded-sm border px-3 py-1.5", "typography-paragraph-regular text-foreground-default no-underline hover:no-underline", "transition-colors duration-150 ease-in-out", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus", @@ -38,7 +38,7 @@ -- 2.51.2