You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds a missing origin to the code that processes theme.json. It also consolidates its name to blocks to be more reflective of what it affects. If the data coming from the blocks origin contained presets, it would be overriden by the data coming from the theme origin, which is not expected.
Hey @oandregal I don't really have the expertise to judge the code itself.
However, I am mostly just blindly following the testing instructions from WordPress/gutenberg#44363 and I can't reproduce the behaviour mentioned below:
Using a theme without theme.json (for example, Canape):
Verify that the styles for the pullquote and navigation blocks are still present in the global-styles-inline-css. These blocks are the only ones that use the __experimentalStyle API in its block.json. It should look like this:
Interesting, I've tested in trunk and it does not work either (it should).
It seems that we're missing a backport: I cannot find in trunk the filter *_theme_json_get_style_nodes, neither when it's thrown or when is used. This was introduced at WordPress/gutenberg#41160 and then the filter updated the name at WordPress/gutenberg#44189 Perhaps we're missing some backports?
I started working on PR #3319 without realizing this PR is dependent upon that one. As they need to be committed together, I'm closing this one in favor of PR #3319 (as I've already made it a complete backport).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trac ticket: https://core.trac.wordpress.org/ticket/56467
Backports WordPress/gutenberg#44363
This PR adds a missing origin to the code that processes
theme.json. It also consolidates its name toblocksto be more reflective of what it affects. If the data coming from theblocksorigin contained presets, it would be overriden by the data coming from thethemeorigin, which is not expected.