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

Theme JSON compat: refer to static instead of self for ROOT_BLOCK_SELECTOR const #39921

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Mar 31, 2022

What?

self::ROOT_BLOCK_SELECTOR should be static::ROOT_BLOCK_SELECTOR

Why?

While porting the get_block_classes in #38816 a self::ROOT_BLOCK_SELECTOR made it in. It should be static to retain the inheritance powers introduced in #38671

How?

Renamed self:: to static::

Testing Instructions

Add new post with some Group blocks.
Publish said post.
Check out the frontend:

  • Do things look as they should?
  • Are the global styles printed out in the document? Check the contents of <style id='global-styles-inline-css'> in the source.

Props to @aaronrobertshaw for spotting

@ramonjd ramonjd added the [Type] Code Quality Issues or PRs that relate to code quality label Mar 31, 2022
@ramonjd ramonjd self-assigned this Mar 31, 2022
@ramonjd ramonjd changed the title While porting the get_block_classes in https://github.com/WordPress/g… Theme JSON compat: refer to static instead of self for ROOT_BLOCK_SELECTOR const Mar 31, 2022
Copy link
Contributor

@aaronrobertshaw aaronrobertshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

✅ Works as advertised.

I believe it was actually @tellthemachines that spotted this one. 🕵️‍♀️

@ramonjd
Copy link
Member Author

ramonjd commented Mar 31, 2022

I believe it was actually @tellthemachines that spotted this one. 🕵️‍♀️

Props to @tellthemachines 💟

…ECTOR` made it in. It should be static to retain the inheritance powers introduced in #38671
@ramonjd ramonjd force-pushed the update/theme-json-compat-static-const branch from bce8060 to 89a76f3 Compare March 31, 2022 20:58
@talldan talldan merged commit 88689f0 into trunk Apr 1, 2022
@talldan talldan deleted the update/theme-json-compat-static-const branch April 1, 2022 03:04
@github-actions github-actions bot added this to the Gutenberg 13.0 milestone Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants