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

Block style resets doesn't work after saving and reloading the site-editor #46505

Open
madhusudhand opened this issue Dec 13, 2022 · 3 comments
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

@madhusudhand
Copy link
Member

madhusudhand commented Dec 13, 2022

Description

Editor styles remain unchanged on resetting block styles such as typography, after saving and reloading.

Step-by-step reproduction instructions

  1. Navigate to global styles and blocks.
  2. Choose a block such as paragraph.
  3. Update any settings such as typography -> font-family. (Editor is updated)
  4. Save the changes.
  5. Reload the editor or launch a fresh tab and edit site.
  6. Reset the same setting as above. typography -> font-family -> Reset (from the three dots menu)
  7. Observe that it doesn't reset the font dropdown or font-family of the paragraph.

Note: This issue happens only after the reload.

Screenshots, screen recording, code snippet

style-resets

Environment info

  • Wordpress: Latest (6.1)
  • Gutenberg: latest trunk (after 14.7.1)

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

@madhusudhand madhusudhand changed the title Resetting block styles doesn't work after saving and reloading the site-editor Block style resets doesn't work after saving and reloading the site-editor Dec 13, 2022
@ndiego ndiego 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 Dec 13, 2022
@ndiego
Copy link
Member

ndiego commented Dec 13, 2022

This issue was reviewed in today's Editor Bug Scrub. I was able to confirm in TT3 using Gutenberg 14.7.1 and WordPress 6.1.1

@ndiego ndiego added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Dec 13, 2022
@talldan
Copy link
Contributor

talldan commented Dec 14, 2022

I think this was possibly fixed by #46486. I can't reproduce when testing against trunk.

@ramonjd
Copy link
Member

ramonjd commented Dec 14, 2022

I can reproduce. I’m trying to debug useStyle and it looks like that the merged config from the global styles context isn’t updated after a call to setUserconfig and is always returning whatever was saved before here.

Not sure how to ensure a full update here...

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

No branches or pull requests

4 participants