From 4075feadea7d8f0d7a82bf6409ea9faa30d12dc6 Mon Sep 17 00:00:00 2001 From: Andrew Michael McNutt Date: Mon, 23 Sep 2024 18:51:12 -0600 Subject: [PATCH] futzing with menus --- .../src/components/Background.svelte | 3 +- .../src/components/ColorChannelPicker.svelte | 7 +- .../src/content-modules/MainColumn.svelte | 8 ++- apps/color-buddy/src/controls/PalTags.svelte | 65 +++++++++++-------- .../src/controls/PalTypeConfig.svelte | 28 ++++---- .../src/controls/SetColorSpace.svelte | 58 ++++++++--------- .../src/controls/SetSimulation.svelte | 2 +- 7 files changed, 96 insertions(+), 75 deletions(-) diff --git a/apps/color-buddy/src/components/Background.svelte b/apps/color-buddy/src/components/Background.svelte index 7f13e95..063e6ec 100644 --- a/apps/color-buddy/src/components/Background.svelte +++ b/apps/color-buddy/src/components/Background.svelte @@ -15,8 +15,9 @@
Background
+
Current Color
{ // @ts-ignore diff --git a/apps/color-buddy/src/components/ColorChannelPicker.svelte b/apps/color-buddy/src/components/ColorChannelPicker.svelte index 2915268..31f52a8 100644 --- a/apps/color-buddy/src/components/ColorChannelPicker.svelte +++ b/apps/color-buddy/src/components/ColorChannelPicker.svelte @@ -137,7 +137,7 @@
-
Color Space
+
Color Space
@@ -48,6 +48,8 @@ bg={currentPal.background} colorSpace={$configStore.channelPickerSpaceBackground} /> +
+
@@ -103,6 +105,10 @@ {/if} + {#if $focusStore.focusedColors.length === 0} + +
empty
+ {/if}
diff --git a/apps/color-buddy/src/controls/PalTags.svelte b/apps/color-buddy/src/controls/PalTags.svelte index 0cbc90f..9899dad 100644 --- a/apps/color-buddy/src/controls/PalTags.svelte +++ b/apps/color-buddy/src/controls/PalTags.svelte @@ -3,15 +3,21 @@ import Tooltip from "../components/Tooltip.svelte"; import { buttonStyle } from "../lib/styles"; import DownChev from "virtual:icons/fa6-solid/angle-down"; + import Times from "virtual:icons/fa6-solid/xmark"; $: currentPal = $colorStore.palettes[$colorStore.currentPal]; $: tags = currentPal?.tags || []; let tagInput = ""; $: inUseTags = new Set(tags); - $: commonTags = ["serious", "trustworthy", "calm"].filter( - (x) => !inUseTags.has(x) - ); + $: commonTags = [ + "serious", + "trustworthy", + "calm", + "playful", + "negative", + "positive", + ].filter((x) => !inUseTags.has(x));
@@ -19,47 +25,50 @@
- Tags describe palette level usages, like the intended affect and so on. {#if commonTags.length} - Here are some common ones that are have specific effects in the app - (such as engaging lints for specific affects).{/if} + Tags describe palette level usages, like the intended affect and so on. + They govern which checks are run on the palette.
-
Tags
+
Current Tags
{#each tags as tag} -
+
{tag}
{/each}
-
- {#each commonTags as tag} - - {/each} +
+ Common tags
-
- colorStore.setCurrentTags([...tags, tagInput])} - > - - -
+ {#each commonTags as tag} + + {/each}
+
+
Custom Tag
+
+ colorStore.setCurrentTags([...tags, tagInput])} + > + + +
+
{/each}
diff --git a/apps/color-buddy/src/controls/SetColorSpace.svelte b/apps/color-buddy/src/controls/SetColorSpace.svelte index 9b65504..4f4a642 100644 --- a/apps/color-buddy/src/controls/SetColorSpace.svelte +++ b/apps/color-buddy/src/controls/SetColorSpace.svelte @@ -2,7 +2,7 @@ import { colorPickerConfig } from "../lib/utils"; import DownChev from "virtual:icons/fa6-solid/angle-down"; import Tooltip from "../components/Tooltip.svelte"; - import { buttonStyle } from "../lib/styles"; + import { buttonStyle, simpleTooltipRowStyle } from "../lib/styles"; export let colorSpace: string; export let onChange: (e: any) => void; const notAllowed = new Set(["rgb"]); @@ -27,46 +27,42 @@
Select the color space to use for the color picker.
-
- {#each basicOptions as space} - - - {colorPickerConfig[space].description} - {/each} -
+ {colorPickerConfig[space].description.split(" ").slice(1).join(" ")} + + {/each}
Advanced Color Spaces
These color spaces provide more control over the color representation, but may be less intuitive or familiar
-
- {#each advancedSpaceOptions as space} - - - {colorPickerConfig[space].description} - {/each} -
+ {colorPickerConfig[space].description.split(" ").slice(1).join(" ")} + + {/each}
{/each}