Skip to content

Conversation

@pdanpdan
Copy link
Contributor

  • fix and optimize inputValue processing in ColorPalette

    • svelte reactivity is not very funny
    • the effects are called right when the value changes (not batched), and we have to be very carefull with the order different state values are changed
  • use a single handleKeydown listener in ColorPalette

  • use colorName as key to mark colors as selected

    • color has duplicates zinc-50 and neutral-50
  • make sure we pick neutral-50 instead of zinc-50

    • in tailwind palette neutral-50 and zinc-50 are identical
    • pick neutral-50 because it is more meaningfull
  • avoid bind:value in ThemeCSSModal because we already have a listener on it

in tailwind palette neutral-50 and zinc-50 are identical
pick neutral-50 because it is more meaningfull
color has duplicates zinc-50 and neutral-50
svelte reactivity is not very funny
the effects are called right when the value changes (not batched), and we have to be very carefull with the order different state values are changed
@saadeghi saadeghi self-assigned this Nov 14, 2025
@saadeghi
Copy link
Owner

Thanks for the PR @pdanpdan

The value of neutral-50 and zinc-50 is indeed the same.
But isn't it a weird UX that people cannot choose zinc-50.
It feels like that color is broken if we click it and another cell gets selected.
I think either both should be shown as selected (existing behavior at https://daisyui.com/theme-generator) or the chosen one must be selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants