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

Super Cache: add an admin notice to encourage migration to Jetpack Boost #37840

Closed
wants to merge 68 commits into from

Conversation

donnchawp
Copy link
Contributor

For site owners who are using the default settings of WP Super Cache they could use Jetpack Boost and see much the same caching results. This PR adds an admin notice with a "Migrate now" button that installs and activates Boost. It will set a flag that tells Boost to activate the Cache module.

TODO - check the WPSC config matches what Boost supports.

Fixes #37743

Proposed changes:

  • Add a function wpsc_jetpack_boost_notice() that displays the notice. It will only display on the WPSC settings page.
  • Add a function wpsc_dismiss_boost_notice() that allows the notice to be hidden.
  • Add JavaScript that catches clicks on the dismiss button so that action is recorded by wpsc_dismiss_boost_notice()
  • Style the admin notice
  • Add a nonce for dismissing the admin notice.

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

pc9hqz-2QH-p2

Does this pull request change what data or activity we track or use?

Testing instructions:

@donnchawp donnchawp added the [Plugin] Super Cache A fast caching plugin for WordPress. label Jun 13, 2024
@donnchawp donnchawp self-assigned this Jun 13, 2024
Copy link
Contributor

github-actions bot commented Jun 13, 2024

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen daily.
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for July 2, 2024 (scheduled code freeze on July 1, 2024).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Backup plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Boost plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Search plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Social plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Starter Plugin plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Protect plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Videopress plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Super Cache plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Migration plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Mu Wpcom plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Wpcomsh plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Automattic For agencies client plugin:

  • Next scheduled release: July 2, 2024.
  • Scheduled code freeze: June 24, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

donnchawp added a commit that referenced this pull request Jun 13, 2024
jdevalk and others added 21 commits June 13, 2024 12:36
* Add an ID to the jetpack form EU cookie law form tag

* Add changelog
Co-authored-by: Denys Zaikin <[email protected]>
* Fix incorrect track event prop names

* Add track event for learn more in critical css steps section

* Add track event for toggling performance panel

* Fix pricing table showing Quality Settings as free

* Add LIAR to pricing table

* add changelog

* Update performance history track event to include state of panel

Co-authored-by: Adnan Haque <[email protected]>

---------

Co-authored-by: Adnan Haque <[email protected]>
* Fix Like block editor and theme styling conflicts

* Update Like block's `editor.scss` with the latest styles

* Add changelog

* Pull the latest styles from `widgets.wp.com/likes/style.css`

* Adjust avatars alignments

* Format buttons correctly when displayed in columns
* Nav Redesign: Drop the early access and is_proxied (Automattic/wpcomsh#1835)

* Changelog.
)

* Remove code to replace "Site visibility" with a link to Calypso (Automattic/wpcomsh#1893)

* Replace "Site visibility" with a link to Calypso

* Remove code to replace "Site visibility"

* Changelog.
* Revert adding overview menu option (Automattic/wpcomsh#1897)

* Changelog.
* Backport changes from 3.4.2

* Clean up changelogs

* add changelog

* Init new plugin cycle
* Fire "jb_cache_moved_to_boost" action when migrating to Boost

Fixes  #37742

* changelog

* An action may not be hooked if Boost is not connected.

Use a transient that can be checked after connection.

* Don't call the migration notifier, that's for another PR.

* Update versions from trunk
* Add array check before using the $links array.

* changelog

* Fix path to wp-cache.php

---------

Co-authored-by: Peter Petrov <[email protected]>
* Changelog and readme.txt edits.

* Version bumps

* Revert "Version bumps"

This reverts commit b30f148.
* add hook to hide the input when user types

* changelog

* add hideOnBlockFocus to the block handlers

* change hiding behavior to focus instead of keydown

* rename event listener function and fix autohide on stream
* Removed markdown file exclusion pattern.

* Add create_function polyfill (Automattic/wpcomsh#1894)

* Add create function polyfill

* Add create function polyfill

* Add License

* Trigger a notice when it gets used

Notifies site owners and allows us to keep track of the sites using it.

Props @ebinnion
See pfuQfP-gV-p2/#comment-559

* See if unit tests work.

* Fix linter and failing test

* Convert deprecations to exceptions

* Revert test

---------

Authored-by: TimBroddin
Co-authored-by: Konstantin Obenland <[email protected]>

* Changelog.

* Bump to 3.22.7

* Prevent non array/object from working (Automattic/wpcomsh#1901)

* Changelog.

* Bump to 3.22.8.

* Fix: do not override text color if it is not set on the theme (Automattic/wpcomsh#1902)

* do not override text color if it is not set on the theme

---------

Co-authored-by: Andrés Blanco <[email protected]>

* Changelog.

* Bumped to 3.22.9.

* Update read access cookie arguments (Automattic/wpcomsh#1905)

* Update read access cookie arguments

* Changelog.

* Bumped to 3.22.10.

* Bumped to 3.22.11.

* Update language files and version bump to 3.22.12 (Automattic/wpcomsh#1906)

* Update language files

---------

Co-authored-by: sdnunca <[email protected]>

* Untangling: Remove temporary code that hides Hosting menu options (Automattic/wpcomsh#1900)

* Remove temporary code

* Version bump to 3.22.13

* Project versions.

* Correct dates.

* Adding the proper markdown handling exclude wildcard, h/t @anomiex.

* Added first function creation warning safeguard.

* Reverted the previous solution and added initialization.

---------

Co-authored-by: Konstantin Obenland <[email protected]>
Co-authored-by: Andrés Blanco <[email protected]>
Co-authored-by: sdnunca <[email protected]>
* Support an onSetImage callback

* Provide the MediaUpload onSelect callback as the generator use image callback

* changelog

* Support libraryUrl property on the carousel of images and use it as the URL of the image being set

* Fix the name of the property that will receive the select callback
* Cast to int

* Add changelog

* Fix other instances too

* Add changelog entries

* Bump version

* Undo breaking change

* Bump version again
* Rewrite svg-optimize as JS script

* Update reference in build chain

* Remove old files

* Add changelog

* Add EOF newline to optimized SVGs

* Simplify logic

* Use svgo plugin to add <g> instead of regex
* Changed the wpcom site helper slug to wpcomsh instead of jetpack-wpcomsh.

* Changelog.
If no `.extra.autorelease.slug` and no `.extra.wp-plugin-slug` exist,
but `.extra.beta-plugin-slug` does, use that.
* Update Size-limit to v11
* Add pnpmfile hack for broken size-limit plugin loading

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>
@github-actions github-actions bot added [Package] Jetpack mu wpcom WordPress.com Features [Package] Masterbar [Package] My Jetpack [Package] Protect Models [Package] Publicize [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] Stats Admin [Package] Sync [Package] VideoPress [Plugin] Automattic For Agencies Client [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Plugin] Wpcomsh [Tests] Includes Tests [Tools] Development CLI The tools/cli to assist during JP development. Actions GitHub actions used to automate some of the work around releases and repository management Docs E2E Tests RNA labels Jun 18, 2024
@donnchawp donnchawp closed this Jun 18, 2024
@donnchawp donnchawp deleted the add/super-cache/admin-notice-boost branch June 19, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions GitHub actions used to automate some of the work around releases and repository management [Block] AI Assistant [Block] Like [Block] Top Posts Docs E2E Tests [Extension] AI Assistant Plugin [Feature] Contact Form [Feature] Extra Sidebar Widgets [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Feature] Theme Tools [JS Package] AI Client [JS Package] Base Styles [JS Package] Connection [JS Package] Eslint Config Target Es [JS Package] Explat This package no longer exists in the monorepo. You probably want [Package] Explat instead. [JS Package] Partner Coupon [JS Package] Publicize Components [JS Package] Social Logos [mu wpcom Feature] Wpcom Admin Interface [mu wpcom Feature] Wpcom Site Management Widget [mu wpcom Feature] Wpcom Site Menu [Package] Ad aka WordAds [Package] Backup [Package] Blaze [Package] Classic Theme Helper [Package] Forms [Package] Jetpack mu wpcom WordPress.com Features [Package] Masterbar [Package] My Jetpack [Package] Protect Models [Package] Publicize [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] Stats Admin [Package] Sync [Package] VideoPress [Plugin] Automattic For Agencies Client [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Plugin] Super Cache A fast caching plugin for WordPress. [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Plugin] Wpcomsh RNA [Tests] Includes Tests [Tools] Development CLI The tools/cli to assist during JP development.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Super Cache: Add an admin notice for 1 click migration