Skip to content

[] Prevent duplicate color values in Color Picker config#10831

Draft
Mitch Goudy (mgoudy91) wants to merge 1 commit intomasterfrom
codex/color-picker-duplicate-validation
Draft

[] Prevent duplicate color values in Color Picker config#10831
Mitch Goudy (mgoudy91) wants to merge 1 commit intomasterfrom
codex/color-picker-duplicate-validation

Conversation

@mgoudy91
Copy link
Copy Markdown
Contributor

Summary

Improves the Color Picker config flow by preventing admins from saving duplicate swatch hex values, which can create confusing palettes for editors.

Changes

  • Detect duplicate color values in the Color Picker config screen using case-insensitive hex matching
  • Show inline validation on every conflicting swatch row
  • Block app configuration save when duplicate color values are present and surface a notifier error

Updated in:

  • apps/color-picker/src/locations/ConfigScreen.tsx
  • apps/color-picker/src/components/SwatchEditor.tsx

Notes

  • This is framed as a small support-shaped admin UX improvement for easier palette maintenance.
  • Verified by running

build
lerna run build --concurrency=1 --stream --since=${SINCE:-master} --include-dependencies in .

Copy link
Copy Markdown
Contributor Author

Staging deployment completed against the existing Color Picker staging space.

  • PR branch bundle uploaded to the existing staging app definition: 1az8RJ5AOvWt3MdyVsTn3r
  • Reused existing staging space: Color Picker (staging) (qs4f3m2az55q)
  • App was already installed in that space, so no new installation was needed
  • Seeded a minimal demo content type and entry for verification

Links:

Verification notes:

  • The bundle now includes the duplicate swatch validation change from this PR
  • The seeded content type uses an Object field named accentColor assigned to the staging app
  • The main behavior change is easiest to verify from the app config screen by creating duplicate hex values and confirming save is blocked with inline validation

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.

1 participant