From c2530ba2dd85c90c616848436210a4f5a3c2502f Mon Sep 17 00:00:00 2001 From: Andrew Michael McNutt Date: Fri, 27 Sep 2024 17:05:33 -0600 Subject: [PATCH] fiddle with naming stuff --- .../src/components/ContentEditable.svelte | 16 ++++------------ .../src/content-modules/LeftPanel.svelte | 7 +++++-- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/apps/color-buddy/src/components/ContentEditable.svelte b/apps/color-buddy/src/components/ContentEditable.svelte index 56bb8641..77a09899 100644 --- a/apps/color-buddy/src/components/ContentEditable.svelte +++ b/apps/color-buddy/src/components/ContentEditable.svelte @@ -1,9 +1,9 @@ @@ -12,6 +12,7 @@ { onChange(value); focused = false; @@ -32,19 +33,10 @@ focused = true; } }} - class:wrap-title={limitWidth} > - {value} + {displayValue} {/if} -{#if useEditButton} +{#if useEditButton && !focused} {/if} - - diff --git a/apps/color-buddy/src/content-modules/LeftPanel.svelte b/apps/color-buddy/src/content-modules/LeftPanel.svelte index 6eee0867..7679e27d 100644 --- a/apps/color-buddy/src/content-modules/LeftPanel.svelte +++ b/apps/color-buddy/src/content-modules/LeftPanel.svelte @@ -84,6 +84,9 @@ colorStore.setCurrentPalName(x)} value={currentPal.name} + displayValue={`${currentPal.name.slice(0, 20)}${ + currentPal.name.length > 20 ? "..." : "" + }`} useEditButton={true} /> @@ -125,7 +128,7 @@
- + { const updatedColors = [...colors]; @@ -133,7 +136,7 @@ colorStore.setCurrentPalColors(updatedColors); }} value={color.toHex()} - useEditButton={false} + useEditButton={true} /> {#if colorNames[idx]}