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: use "activate/install boost button" on the banner in other areas #37824

Merged
merged 10 commits into from
Jun 17, 2024

Conversation

donnchawp
Copy link
Contributor

@donnchawp donnchawp commented Jun 12, 2024

The Boost Banner in WPSC has an "Activate Jetpack Boost" button that this PR modifies so it can be used in similar buttons in other places of the settings page such as an admin notice and a secondary "Try Boost" button.

Proposed changes:

  • Add the function wpsc_get_boost_migration_config() that fetches config data used by all migration buttons.
  • Change JS so it triggers on the wpsc-install-boost-button class rather than a single ID.
  • The button clicked (source) will be stored as data-source.
  • That source is passed down to the activate function and on to PHP through an ajax request. It's passed on to Boost eventually.
  • Use a wpsc-activate-boost-button class rather than an ID in a similar way to above.
  • Modify the activateBoost function so it accepts a single "source" parameter. It also calls the wpsc_notify_migration_to_boost() function.

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

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

Testing instructions:

Edit inc/boost.php and add this function to aid testing if #37797 hasn't been merged yet:

function wpsc_notify_migration_to_boost( $source ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
}

Load the WP Super Cache settings page and click on the "Activate Jetpack Boost" button.
You should be brought to the Boost settings page.

@github-actions github-actions bot added [Plugin] Super Cache A fast caching plugin for WordPress. [Status] In Progress labels Jun 12, 2024
Copy link
Contributor

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.


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.

@donnchawp donnchawp self-assigned this Jun 13, 2024
@donnchawp donnchawp marked this pull request as ready for review June 13, 2024 13:35
@donnchawp donnchawp requested a review from a team June 13, 2024 13:35
@donnchawp donnchawp added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Team Review and removed [Status] In Progress labels Jun 13, 2024
Copy link
Contributor

@haqadn haqadn left a comment

Choose a reason for hiding this comment

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

The button works!

The design doesn't match though p1HpG7-sbr-p2. I am assuming this PR is scoped to the functionality and design will be addressed in a separate PR.

@donnchawp donnchawp merged commit cd21d87 into trunk Jun 17, 2024
53 checks passed
@donnchawp donnchawp deleted the update/super-cache/multi-button-install branch June 17, 2024 09:33
@github-actions github-actions bot added this to the super-cache/1.12.1 milestone Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Super Cache A fast caching plugin for WordPress. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants