jetpack
jetpack copied to clipboard
Custom CSS: add deprecation warning for Start Fresh option
Proposed changes:
The Custom CSS feature will soon be deprecated from Jetpack.
In this PR, we're adding warnings for sites with the Start Fresh option enabled. Since this option prevents the site from loading the theme CSS, removing it will likely break the site design.
Site admins must take action, so these warnings must be visible. We've added them in 4 different places:
- The Customizer
- At the top of the Jetpack Dashboard and Settings pages
- In the Custom CSS section of the Settings page
- At the top of the frontend of the site, for admins only
Other information:
- [ ] Have you written new tests for your changes, if applicable?
- [ ] Have you checked the E2E test CI results, and verified that your changes do not break them?
- [ ] Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?
Jetpack product discussion
pfwV0U-4M-p2
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
Prerequisites
-
Spin up a test site with this branch
-
Connect Jetpack
-
Search for the Custom CSS section in the settings page:
/wp-admin/admin.php?page=jetpack#/settings?term=css
-
Enable the CSS customization panel enhancement
-
Go to the Additional CSS section of the Customizer:
/wp-admin/customize.php?autofocus%5Bsection%5D=custom_css
-
Enable the Start Fresh option
Notices
-
Refresh the page
-
Notice the warning at the top of the Customizer sidebar
-
Go back to the Custom CSS section in the settings section:
/wp-admin/admin.php?page=jetpack#/settings?term=css
-
Verify it now displays a warning
-
Check that a similar warning is shown at the top of the page (in the Settings and Dashboard pages)
-
Visit the frontend of the site: check that you see a notice when you're authenticated as an admin only
-
In the Customizer, disable the Start Fresh option
-
Check the warnings are not displayed anymore