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

withFontSizes bug in WordPress 5.8 release #33653

Closed
AnthonyLedesma opened this issue Jul 23, 2021 · 1 comment · Fixed by #33679
Closed

withFontSizes bug in WordPress 5.8 release #33653

AnthonyLedesma opened this issue Jul 23, 2021 · 1 comment · Fixed by #33679
Labels
[Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended

Comments

@AnthonyLedesma
Copy link
Contributor

AnthonyLedesma commented Jul 23, 2021

With the release of WordPress 5.8 the withFontSizes HOC within '@wordpress/block-editor' has bugged behavior. The CoBlocks implementation of withFontSizes has remained unchanged for over two years yet is non-functional in 5.8.

https://github.com/godaddy-wordpress/coblocks/blob/4b6a23ebbca9a9702acf88316cf35aeedad8a5da/src/blocks/highlight/edit.js#L136

https://github.com/godaddy-wordpress/coblocks/blob/4b6a23ebbca9a9702acf88316cf35aeedad8a5da/src/blocks/highlight/inspector.js#L36-L40

fontSizesBug

Description

It seems that while migrating to the new global settings schema that some items may have been left out.

Step-by-step reproduction instructions

  1. Add Highlight block. (Happens on any blocks using withFontSizes HOC)
  2. Modify block font size and save changes.
  3. Reload the editor to see an invalid block state.

Expected behaviour

Expect API changes to withFontSizes to allow deprecation.

WordPress information

  • WordPress version: 5.8
  • Gutenberg version: 11.1.0
  • Are all plugins except Gutenberg deactivated? (Except CoBlocks where we implement the HOC)
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

This does not occur using the same steps on 5.7.2

Device information

  • Device: Desktop
  • Operating system: IOS
  • Browser: Chrome/Firefox
@AnthonyLedesma
Copy link
Contributor Author

AnthonyLedesma commented Jul 23, 2021

This might be related to the issue reported here as the problem is only visible after save and reload.
#33636

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants