jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

My Jetpack: Integrate Boost score increase into Boost card and tooltip

Open elliottprogrammer opened this issue 1 year ago • 2 comments

This PR shows whether the Boost Score (in the My Jetpack Boost product card) has increased (with an up-arrow and the number of points increased), and if so, also displays different copy in the tooltip.

Screenshots:

Markup 2024-02-29 at 10 22 54

. Markup 2024-02-29 at 10 25 52

Fixes: https://github.com/Automattic/jetpack-roadmap/issues/1236

Proposed changes:

  • When the Boost Plugin is activated, we fetch the Boost speed score and cache it in localStorage for 1 day. That way new Boost scores are only fetched once a day, at most.
  • When the Boost plugin is not activated, we only fetch new boost scores after 2 weeks.
  • Display an up-arrow and the number of points increased, if the currently fetched (daily) score has increased compared to the previous 'latestBoostSpeedScores'.
  • If score increase, also display different copy in the tooltip.

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

Project Thread: My Jetpack: Add Boost speed score into boost product card: pbNhbs-9Nt-p2

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

No

Testing instructions:

  • Create a Jurassic.Ninja site with Beta plugin running this feature branch (add/my-jetpack-boost-score-increase).
  • Navigate to the My Jetpack page. Verify the Boost Score is not loading (no spinner), and not showing because there is no site connection.
  • Connect Jetpack (Either site-only or user connection, doesn't matter).
  • Go to My Jetpack page, Verify you see the loading spinner in the Boost card. (Boost scores are loading for the first time).
  • Verify The Boost scores eventually load and the score bar and letter grade are shown. (Take note of the score, you may need to know it later.)
  • Now purchase the Boost Paid plan ($9.95 plan).
  • Now change the Date/time on your computer to 1 day forward.
  • Reload the My Jetpack page.
  • Verify the Boost scores are loading. (You should see the loading spinner).
  • Once loaded: If the new score is lower than the first score you had previously (from the previous day): preform the next step: Otherwise skip the next step:
  • For the localStorage key MyJetpackTodaysBoostScore, change the value of score to a number that's a few points higher than the first score you got. Then reload the My Jetpack page.
  • In the Boost product card, you should now see there is an increase in score, denoted by an up-arrow and the number of points it has improved. ( ↑5 ) - (See screenshots above)
  • Hover your mouse over (or tab to focus) the score letter grade. Verify the copy starts with, "Your speed has improved by x points!" ( you can check what copy should show based on the various states, here: 33a29-pb )
  • Don't forget to change the date/time on your computer back 1 day to where it was before. 😉

elliottprogrammer avatar Feb 29 '24 15:02 elliottprogrammer

Thank you for your PR!

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

  • :white_check_mark: Include a description of your PR changes.
  • :white_check_mark: Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • :white_check_mark: Add testing instructions.
  • :white_check_mark: Specify whether this PR includes any changes to data or privacy.
  • :white_check_mark: 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 :robot:


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 May 7, 2024 (scheduled code freeze on April 29, 2024).

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


Boost plugin:

  • Next scheduled release: May 7, 2024.
  • Scheduled code freeze: April 29, 2024.

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

github-actions[bot] avatar Feb 29 '24 15:02 github-actions[bot]

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the add/my-jetpack-boost-score-increase branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack add/my-jetpack-boost-score-increase
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

github-actions[bot] avatar Feb 29 '24 15:02 github-actions[bot]