Skip to content

withFontSizes bug in WordPress 5.8 release #33653

@AnthonyLedesma

Description

@AnthonyLedesma

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] Block editor/packages/block-editor[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions