-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Global Styles: pass only the data the site editor uses #35458
Merged
Merged
Conversation
This file contains 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
oandregal
requested review from
spacedmonkey and
TimothyBJacobs
as code owners
October 8, 2021 11:20
oandregal
added
[Type] Performance
Related to performance efforts
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
labels
Oct 8, 2021
oandregal
changed the title
Global Styles: pass only the data the client needs
Global Styles: pass only the data the site editor uses
Oct 8, 2021
Size Change: +4 B (0%) Total Size: 1.07 MB
ℹ️ View Unchanged
|
This is being used at #34843 |
oandregal
force-pushed
the
update/base-config-data
branch
from
October 13, 2021 14:27
9277331
to
7e1e6ba
Compare
youknowriad
approved these changes
Oct 14, 2021
oandregal
force-pushed
the
update/base-config-data
branch
from
October 14, 2021 08:25
7e1e6ba
to
e4b2b71
Compare
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
[Type] Performance
Related to performance efforts
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.
Follow-up to #35264 (comment)
This PR:
__experimentalGlobalStylesBaseStyles
to__experimentalGlobalStylesBaseConfig
__experimentalGlobalStylesBaseConfig
only contains settings & stylesContext
I've realized that we've been dumping some data we don't need at
__experimentalGlobalStylesBaseStyles
. It was originally thought to pass the base styles while now it's used to pass the base config (settings + styles). With the current implementation, though, we also pass any other data (custom templates, etc). This PR is a minor change to make sure we only pass the data in use.A larger refactoring should consider not passing the settings at all, given that it's data that already lives in
__experimentalFeatures
. I've looked at this but it's a bit convoluted, so thought to do this first.Note that mobile has a variable named
__experimentalGlobalStylesBaseStyles
which is different from this one. This rename should also help clarifying that.How to test
Verify tests still pass.
Do some testing of the site editor and verify that it still works. For example, change colors and save the results. Verify that the front applies the changes, etc.