feat(studio): color-variant swatch picker for color fields#1833
Merged
Conversation
Color fields (`colorVariant` on metrics / dashboard widgets, etc.) are a fixed semantic palette but were edited as text dropdowns — the admin couldn't see the actual color. Add a shared swatch picker (colored circles, selected ring) used everywhere: - color-variant-field: shared COLOR_VARIANTS palette + ColorVariantPicker. - widgets: 'color-picker' widget (enum -> swatch row; free string -> native hex input) + registry entry. - SchemaForm: auto-detect color fields by name convention (color/colorVariant/ *Color) so generic forms get the picker without per-form wiring. - DashboardWidgetInspector: Color Variant now a swatch row. - block-config + PageBlockInspector: new 'color' field kind; object-metric Color renders as swatches. Verified live: page object-metric Color and dashboard widget Color Variant both render the swatch row with the correct color selected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Color fields (
colorVarianton metrics / dashboard widgets, badge tones, …) are a fixed semantic palette, but were edited as text dropdowns — the admin couldn't see the actual color. This adds one shared swatch picker (colored circles, selected ring) used across the generic form and the curated inspectors.COLOR_VARIANTSpalette +ColorVariantPicker.color-pickerwidget (enum → swatch row; free string → native hex input) + registry entry.color/colorVariant/*Color) so generic forms get the picker without per-form wiring.colorfield kind; object-metric Color renders as swatches.Verification
Verified live: the page object-metric Color and the dashboard widget Color Variant both render the swatch row with the correct color pre-selected (blue).
🤖 Generated with Claude Code