Skip to content

fix: persist color variable edits from hex input#88

Merged
liamwalder merged 2 commits intodevelopfrom
fix/color-variable-update
Mar 24, 2026
Merged

fix: persist color variable edits from hex input#88
liamwalder merged 2 commits intodevelopfrom
fix/color-variable-update

Conversation

@tristan-mouchet
Copy link
Copy Markdown
Collaborator

Summary

Fix color variable edits via hex input not persisting after save/reload. Extract shared color commit logic into a helper to reduce duplication.

Changes

  • Route hex input changes through varEditState when editing/creating a color variable, matching the behavior of the saturation wheel
  • Extract commitColorValue helper to DRY up the 3-way dispatch (edit variable / create variable / direct onChange)
  • Merge duplicate blur branches (exact 6 digits and >6 digits) into one
  • Replace arbitrary Tailwind classes with standard equivalents (min-w-30, -outline-offset-1)

Test plan

  • Edit a color variable using the hex input field — verify the value persists after save/reload
  • Create a new color variable using the hex input — verify it saves correctly
  • Edit a color variable using the ration wheel — verify it still works
  • Type partial hex values and blur — verify it resets gracefully

@liamwalder liamwalder merged commit 9b6e8b7 into develop Mar 24, 2026
2 checks passed
@liamwalder liamwalder deleted the fix/color-variable-update branch March 24, 2026 09:40
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.

Bug: Cannot update the first color variable (sort_order: 0) via the UI

2 participants