WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.34k stars 4.13k forks source link

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

Open madhusudhand opened 1 year ago

madhusudhand commented 1 year ago

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

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

ndiego commented 1 year ago

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

talldan commented 1 year ago

I think this was possibly fixed by https://github.com/WordPress/gutenberg/pull/46486. I can't reproduce when testing against trunk.

ramonjd commented 1 year ago

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...