Skip to content

fix(ui): color picker dropdown closing and custom color memory#4863

Open
LeoGradual wants to merge 1 commit intoudecode:mainfrom
LeoGradual:fix/font-color-toolbar-button
Open

fix(ui): color picker dropdown closing and custom color memory#4863
LeoGradual wants to merge 1 commit intoudecode:mainfrom
LeoGradual:fix/font-color-toolbar-button

Conversation

@LeoGradual
Copy link

Summary

  • Keep dropdown open during native color picker input by switching to modal mode
  • Remember custom colors across open/close cycles via session-based queue
  • Scan editor marks to populate previously used colors on dropdown open
  • Fix + button overlapping color circles with grid-based placement (col-start-10)
  • Add contrast-aware check icon for selected colors (white on dark backgrounds, bold stroke)

Test plan

  • Open font color dropdown, use native color picker — dropdown stays open
  • Pick custom colors, close/reopen dropdown — custom colors persist
  • Verify + button doesn't overlap color circles when many custom colors exist
  • Verify selected color shows bold checkmark, visible on both light and dark colors

🤖 Generated with Claude Code

- Keep dropdown open during native color picker input (modal mode)
- Remember custom colors across open/close cycles via session queue
- Scan editor marks to populate used colors on open
- Fix + button overlapping color circles (grid placement)
- Contrast-aware check icon for selected color on dark backgrounds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@LeoGradual LeoGradual requested a review from a team March 13, 2026 02:30
@codesandbox
Copy link

codesandbox bot commented Mar 13, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plate Ready Ready Preview, Comment Mar 13, 2026 2:39am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2026

⚠️ No Changeset found

Latest commit: b9824b6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. javascript Pull requests that update javascript code patch Bugfix & documentation PR labels Mar 13, 2026
@zbeyens
Copy link
Member

zbeyens commented Mar 13, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9824b618e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +335 to +339
(targetColor: string) =>
colors.some(
(c) => normalizeColor(c.value) === normalizeColor(targetColor)
) ||
fullCustomColors.some(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include custom palette in existing-color check

isColorInCollections only checks colors and fullCustomColors, so a value that already exists in customColors (the predefined custom row) is treated as a brand-new color. When that happens (for example, selecting the same hex via the native color input), updatedColor gets rendered again as customColor, creating a duplicate swatch and consuming one history slot unnecessarily. Add customColors to this membership check so existing custom entries are not duplicated.

Useful? React with 👍 / 👎.

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

Labels

javascript Pull requests that update javascript code patch Bugfix & documentation PR size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants