-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Block editor settings: add missing global styles links dependencies #63823
Block editor settings: add missing global styles links dependencies #63823
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@@ -353,6 +353,7 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) { | |||
setIsInserterOpened, | |||
sectionRootClientId, | |||
globalStylesData, | |||
globalStylesLinksData, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussion of whether this variable needs to be renamed, or alternatives to the delivery of global styles data to the block editor via settings: #60100 (comment)
Size Change: +2 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I smoke tested as per the test instructions and didn't spot any regressions. While the discussion on renaming or moving the globalStylesLinksData
is ongoing, I think it makes sense to land this. It should mean it isn't missed when a rename does happen.
![Screenshot 2024-07-23 at 4 21 49 PM](https://private-user-images.githubusercontent.com/60436221/351208988-89f3be20-aade-4388-891e-05f847ee3e03.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMTY1ODgsIm5iZiI6MTcyNjExNjI4OCwicGF0aCI6Ii82MDQzNjIyMS8zNTEyMDg5ODgtODlmM2JlMjAtYWFkZS00Mzg4LTg5MWUtMDVmODQ3ZWUzZTAzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA0NDQ0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkOTYwNDY3NmRhZGJlMGIwMmY5MDhlZDQ0MzgzMDM4NzkwZDc4ZDhkNzMxYzU4NDIwY2M4OGY0M2Y1Mzg0NWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.v93DOyn-WL-c7fsXsWBtdGzqdSY4DCUzHpZe-BRkt1M)
I also noticed that I missed updating the location of the background image control in #63551. I can create a separate follow-up to explore whether it should live under the colors in the global styles sidebar as it does in the block inspector.
Sounds great, thanks for testing this one too. |
PR tweaking the location of the background panel is available in #63888. |
What?
Follow up to:
Adds the
globalStylesLinksData
dependency to the useMemo dependency list.Thanks to @youknowriad for catching it.
Why?
The
globalStylesLinksData
dependency was missing from the useMemo dependency list.How?
Add the
globalStylesLinksData
dependency to the useMemo dependency list.Testing Instructions
Smoke test that background images with relative paths in theme.json appear as they should in the editor.
Here's some test JSON that can be used with TT4:
In the Site Editor, check that: