Skip to content
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

Clean up Limit Global Styles logic #70121

Merged
merged 7 commits into from
Dec 6, 2022
Merged

Conversation

mmtr
Copy link
Member

@mmtr mmtr commented Nov 17, 2022

Proposed Changes

Cleans up some technical debt from the logic that limits Global Styles:

  • The theme_json_user filter is no longer used to block styles since WP.com no longer loads the Gutenberg version that triggered it
  • Remove usages of _Gutenberg classes since they are not intended to be used externally.

Testing Instructions

  • Apply these changes to your sandbox: install-plugin.sh editing-toolkit update/clean-up-limit-global-styles
  • Go to https://wordpress.com/start and create a new free site
  • Add the wpcom-limit-global-styles blog sticker to the new site from the Blog RC
  • Sandbox the new site
  • Go to Appearance > Editor
  • Open the Global Styles sidebar
  • Change some styles
  • Click on the "Save" button
  • Visit the frontend
  • Make sure only the styles from the default theme variation are visible
  • Make sure the launchbar contains a "Styles hidden" action

@mmtr mmtr added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature] Global Styles The Global Styles tools in the site editor and theme style variations. labels Nov 17, 2022
@mmtr mmtr requested a review from a team November 17, 2022 15:31
@mmtr mmtr self-assigned this Nov 17, 2022
@github-actions
Copy link

github-actions bot commented Nov 17, 2022

@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit update/clean-up-limit-global-styles on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor

@dsas dsas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a fix for the fatal, though maybe you prefer to just pass wp_get_theme().

@dsas dsas dismissed their stale review November 17, 2022 17:52

Pushed a fix for the fatal

@mmtr
Copy link
Member Author

mmtr commented Nov 18, 2022

Pushed a fix for the fatal, though maybe you prefer to just pass wp_get_theme().

Thanks for that! Didn't notice the argument was actually required. I pushed an extra update to use wp_get_theme instead, since I think that's more readable.

Copy link
Contributor

@dsas dsas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@dsas dsas removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 6, 2022
@mmtr mmtr merged commit 96e552a into trunk Dec 6, 2022
@mmtr mmtr deleted the update/clean-up-limit-global-styles branch December 6, 2022 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Global Styles The Global Styles tools in the site editor and theme style variations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants