gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Editor Always applies Color( with same color values but diff slug and name )declared first irrespective of Color applied

Open adarshakshatPosimyth opened this issue 2 years ago • 3 comments

Description

If Theme have declared two colors with same color value but different slug and name

for ex : { "color": "#ffffff", "name": "Text 1", "slug": "text-2" }, { "color": "#ffffff", "name": "Text 2", "slug": "text-1" },

Then if in editor a text 2 color is selected, still the editor will apply text-1. image

This will cause issues when styles are changed. What if the colors values change in style declarations ? I also remember patterns will also have styles option in coming future, it will cause issues then

Step-by-step reproduction instructions

  1. Create Theme.json and add two Colors, Keep the values of color same , but slug and name different.
  2. Open Editor and add two components .
  3. Apply one color to each of component added.
  4. Open Code Editor and you can see the color added in markup is always the first

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

adarshakshatPosimyth avatar Jan 31 '24 10:01 adarshakshatPosimyth

Hi, This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps. Thanks for helping out.

github-actions[bot] avatar Mar 03 '24 00:03 github-actions[bot]

Sad to see this is stale and not receiving attention 😔 Unfortunately I lack the knowledge to contribute fixing it. As WordPress user, this issue is very annoying for me.

#55516 #9357

emdashftw avatar May 05 '24 07:05 emdashftw

@jeflopodev thanks for the heads-up. Indeed, this is a duplicate of https://github.com/WordPress/gutenberg/issues/9357

Let's continue the conversation there

SirLouen avatar Jul 24 '25 22:07 SirLouen