jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Custom CSS: add deprecation warning for Start Fresh option

Open monsieur-z opened this issue 9 months ago • 5 comments

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 Screenshot 2024-05-02 at 4 05 00 PM

  • Go to the Additional CSS section of the Customizer: /wp-admin/customize.php?autofocus%5Bsection%5D=custom_css

  • Enable the Start Fresh option Screenshot 2024-05-02 at 4 07 49 PM

Notices

  • Refresh the page

  • Notice the warning at the top of the Customizer sidebar Screenshot 2024-05-02 at 4 09 04 PM

  • 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 Screenshot 2024-05-02 at 4 10 10 PM

  • Check that a similar warning is shown at the top of the page (in the Settings and Dashboard pages) Screenshot 2024-05-02 at 4 10 46 PM

  • Visit the frontend of the site: check that you see a notice when you're authenticated as an admin only Screenshot 2024-05-14 at 10 46 57 AM

  • In the Customizer, disable the Start Fresh option

  • Check the warnings are not displayed anymore

monsieur-z avatar May 02 '24 19:05 monsieur-z