Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Styles - Custom Colors given the same name cannot be applied properly #49593

Closed
Tracked by #57309
cuemarie opened this issue Apr 4, 2023 · 5 comments · Fixed by #65772
Closed
Tracked by #57309

Global Styles - Custom Colors given the same name cannot be applied properly #49593

cuemarie opened this issue Apr 4, 2023 · 5 comments · Fixed by #65772
Assignees
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@cuemarie
Copy link

cuemarie commented Apr 4, 2023

Description

If custom colors are added in the global styles theme settings with the same name (eg Color 1), it becomes impossible to select any color but the last custom color of that name.

Step-by-step reproduction instructions

  1. Start in site editor
  2. Select global styles
  3. Colors>Palettes>Custom Colors, add custom colors
  4. Select "Show Details" in the menu for custom colors, and rename all the colors to the same name, such as "Color 1"
  5. Return to the editor, and try selecting one of these custom color for any block color setting

Screenshots, screen recording, code snippet

Setup

Markup on 2023-04-04 at 13:35:31

Result

Markup on 2023-04-04 at 13:37:48

Environment info

Originally reported here: Automattic/wp-calypso#75197
Replicated in WP version 6.2 with all Gutenberg plugin active and deactivated.
Theme: Twenty Twenty-Three

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@jordesign jordesign added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Apr 5, 2023
@aaronrobertshaw
Copy link
Contributor

I believe this issue might be considered a duplicate of #43197.

The issue was also touched on in a related PR #43096 (comment).

@ramonjd
Copy link
Member

ramonjd commented Sep 24, 2024

I added some thoughts over in: #43197 (comment)

@ramonjd ramonjd self-assigned this Oct 1, 2024
@ramonjd
Copy link
Member

ramonjd commented Oct 30, 2024

I think this PR fixes the issue:

but only for duplicate named colors created after that PR.

Is that sufficient to close this issue?

@aaronrobertshaw
Copy link
Contributor

Is that sufficient to close this issue?

In my view, yes.

More than likely, anyone having hit this issue renamed the colors so they could be applied correctly.

@ramonjd ramonjd linked a pull request Oct 30, 2024 that will close this issue
@ramonjd
Copy link
Member

ramonjd commented Oct 30, 2024

Fixed by #65772

@ramonjd ramonjd closed this as completed Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants