-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix Global Styles Panel Font Change Update #49216
Conversation
This addresses a bug opened against themes: Automattic/themes#2989 This appears to only reproduce when in production (or with some other dependency I'm unable to reproduce). When running this editing-toolkit locally this works as expected. Note that when running locally the edited content resides in the element: ``` <div tabindex="-1" class="edit-post-visual-editor editor-styles-wrapper"> ``` However on wpcom I see that it's actually in: ``` <div class="edit-post-visual-editor"> <div class="popover-slot"/> <div class="editor-styles-wrapper"> ``` Therefore the selector `.edit-post-visual-editor.editor-styles-wrapper` does not reflect the values being written. Changing this selector is still the most specific selector defining the variables so those are what are displayed.
Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com D55893-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Webpack Runtime (~14 bytes added 📈 [gzipped])
Webpack runtime for loading modules. It is included in the HTML page as an inline script. Is downloaded and parsed every time the app is loaded. App Entrypoints (~72 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
I haven't tested it but this change looks legit. It looks like WordPress/gutenberg#27035 changed the node where the |
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.
Works perfectly! Tested with Varia and Seedlet
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.
I applied this patch to my sandbox and tested it with Seedlet and Varia themes on my Simple site. I made sure that the site and API were sandboxed. However I'm still noticing the issue that it should fix.
Maybe I'm missing something with the testing instructions?
Did you sandbox public-api and widgets? Since this is an ETK change we need to sandbox those too. I think one of them should be enough to make this work, but I never tested out which one so I usually just sandbox both of them. |
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.
Never mind, the patch won't apply cleanly on sandbox due to conflict in new ETK plugin version (it was updated in the meantime). After altering it manually to match the one from the diff everything worked fine.
Just public-api, widgets are not needed for this. |
This appears to only reproduce when in production (or with some other
dependency I'm unable to reproduce). When running this editing-toolkit
locally this works as expected.
Note that when running locally the edited content resides in the
element:
However on wpcom I see that it's actually in:
Therefore the selector
.edit-post-visual-editor.editor-styles-wrapper
does not reflect the values being written.
Changing this selector is still the most specific selector defining the
variables so those are what are displayed.
Changes proposed in this Pull Request
Testing instructions
This addresses a bug opened against themes: Automattic/themes#2989