-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Global Styles: Allow access in the post editor #72681
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
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. |
|
Size Change: +104 kB (+4.58%) 🔍 Total Size: 2.37 MB
ℹ️ View Unchanged
|
39c91a6 to
63e90ce
Compare
63e90ce to
f8db0ce
Compare
|
|
||
| // Expect a 2px border (added in JS). | ||
| await expect( defaultBlock ).toHaveCSS( 'border-width', '2px' ); | ||
| await expect( defaultBlock ).toHaveCSS( 'border-width', '3px' ); |
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.
Any specific reason for changing this?
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.
Yes, now that I added the "theme" styles to the plugin, it will be 2px even without the change made in JS. So in order to test the change properly (and ensure it's the JS one that is applied), I updated to 3px.
| @@ -0,0 +1,11 @@ | |||
| export default function WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) { | |||
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.
Not for here, but I guess we could reuse this for the other edit packages.
ntsekouras
left a comment
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.
It's a huge PR and tried to look into as much as I could, but not 100% I missed something. I couldn't pinpoint any issue and manually it tests well for me. Thanks!
|
I think this PR caused a regression in the Load Patterns metric for the Post Editor, but maybe that's to be expected since it adds more overhead to the post editor? The Load Patterns in the Site Editor looks like it's down because of this PR though. |
|
Looks like it improved the "navigate" metric in the site editor though haha :) (To be honest I don't understand exactly why) |
I noticed that too and even checked to make sure it wasn't within the normal variance haha. I'll give the PR a look through and see if I notice anything. |
|
Was it intended that this PR removed the Global Styles button from the site editor when editing a Page? If not, it appears this PR has caused a regression. The Global Styles button is still there when editing templates etc.
Steps to replicate:
|
It was intended unless you have "show template" true. |



Closes #72317
What?
This PR migrates global styles infrastructure and UI from the edit-site package to the editor package which makes Global Styles available in edit-post automatically. This also simplifies a lot of things in the editor package and allows us to remove some hacks and unstable props.
Why?
How?
Testing Instructions
Test in both the site editor and the editor in edit-post. The styles panel should appear in the post editor when editing the template of a post/page or when "show template" is toggled on.