From 4ce7895dd02b312d11b6e3424991839c8ec03da9 Mon Sep 17 00:00:00 2001 From: Patrick Demichiel Date: Tue, 10 Nov 2026 21:34:02 +0100 Subject: [PATCH] fix: keep a TONE3000 capture's name readable on a card with few knobs The capture selector took the knob grid's width, so a tone with a single knob left the trigger a sliver beside its two arrows, and a tone with no knobs lost its body - photograph and selector - entirely. The controls column now holds the width of the template's three-column grid whenever there is a selector, and the body renders for a TONE3000 tone whatever its knobs. Captures of one tone share their opening words and differ in the last ones, so the selector now truncates from the start (a new `truncate="start"` on Select) and keeps "(mid gain)" / "(high gain)" visible. Closes #6 --- ui/src/features/module/ModuleCard.svelte | 21 ++++++++++++++++--- ui/src/lib/components/Select.svelte | 26 ++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/ui/src/features/module/ModuleCard.svelte b/ui/src/features/module/ModuleCard.svelte index e2bc81e..b1da4da 100644 --- a/ui/src/features/module/ModuleCard.svelte +++ b/ui/src/features/module/ModuleCard.svelte @@ -841,7 +841,10 @@ - {#if module.params.length > 0 || expanded} + + {#if module.params.length > 0 || expanded || artwork || variants.length > 1}
{#if artwork} +
1 ? 'min-w-52' : 'min-w-0']} + {@attach measureControls} + > {#if variants.length > 1} + anything else in the rack; the trigger truncates instead — from the + start, since captures of one tone share their opening words and + differ in the last ones ("… (mid gain)", "… (high gain)"). --> +{#snippet label(text: string)} + {#if truncate === 'start'} + {text} + {:else} + {text} + {/if} +{/snippet} + open, setOpen} maxHeight={MENU_MAX_HEIGHT} @@ -206,7 +228,7 @@ {disabled} aria-label={ariaLabel} > - {selectedLabel || placeholder} + {@render label(selectedLabel || placeholder)} {/if} @@ -244,7 +266,7 @@ onmouseenter={() => (highlight = i)} onclick={() => choose(o.value)} > - {o.label} + {#if truncate === 'start'}{@render label(o.label)}{:else}{o.label}{/if} {:else}