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

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

Open
adarshakshatPosimyth opened this issue Jan 31, 2024 · 2 comments
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Testing Needs further testing to be confirmed. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended

Comments

@adarshakshatPosimyth
Copy link

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 adarshakshatPosimyth added the [Type] Bug An existing feature does not function as intended label Jan 31, 2024
@jordesign jordesign added Needs Testing Needs further testing to be confirmed. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Feb 1, 2024
Copy link

github-actions bot commented Mar 3, 2024

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 github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Mar 3, 2024
@jeflopodev
Copy link

jeflopodev commented May 5, 2024

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

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 Needs Testing Needs further testing to be confirmed. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended
3 participants