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

Jetpack Manage: 192 - add NextSteps component to Overview page #85675

Merged
merged 9 commits into from
Dec 21, 2023

Conversation

tbradsha
Copy link
Contributor

@tbradsha tbradsha commented Dec 21, 2023

Resolves Automattic/jetpack-manage#192 - add NextSteps component to Overview page

Proposed Changes

This introduces a NextSteps component for the Overview page. Of note:

Originally I found the Launchpad component, but in the end it is tightly integrated with Calypso Blue and would require implementing a new set of listeners + API calls, so I dug a bit deeper and used the Checklist component it uses internally.

Testing Instructions

One can manually update the completed booleans for each task and see the correct states. Tracks should fire when clicking on each task and when dismissing the dialog.

The hidden task can be brought back by clearing the key out of localStorage:

delete localStorage.jetpack_manage_hide_next_steps;

No tasks completed:
image

Two tasks completed:
image

Fully completed:
image

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?

@tbradsha tbradsha requested a review from a team December 21, 2023 21:43
@tbradsha tbradsha self-assigned this Dec 21, 2023
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 21, 2023
Copy link

github-actions bot commented Dec 21, 2023

@matticbot
Copy link
Contributor

matticbot commented Dec 21, 2023

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~1673 bytes added 📈 [gzipped])

name                    parsed_size           gzip_size
jetpack-cloud-overview      +5699 B  (+1.4%)    +1633 B  (+1.2%)
write-flow                   +241 B  (+0.0%)      +20 B  (+0.0%)
videopress-flow              +241 B  (+0.0%)      +20 B  (+0.0%)
subscribers                  +241 B  (+0.0%)       +9 B  (+0.0%)
link-in-bio-tld-flow         +241 B  (+0.0%)      +20 B  (+0.0%)
home                         +241 B  (+0.0%)      +11 B  (+0.0%)
earn                         +241 B  (+0.0%)      +20 B  (+0.0%)
build-flow                   +241 B  (+0.0%)      +20 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~50 bytes added 📈 [gzipped])

name                                                 parsed_size           gzip_size
async-load-masterbar-launchpad-navigator                  +241 B  (+0.4%)      +28 B  (+0.2%)
async-load-calypso-my-sites-stats-stats-subscribers       +241 B  (+0.1%)      +22 B  (+0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/jp-manage/192/add_next_steps_component on your sandbox.

@tbradsha tbradsha marked this pull request as ready for review December 21, 2023 21:57
@tbradsha tbradsha changed the title Jetpack Manage: 192 - add Next Steps component to Overview page Jetpack Manage: 192 - add NextSteps component to Overview page Dec 21, 2023
return (
<div className="next-steps">
<div className="next-steps__header">
<h2>{ isCompleted ? translate( '🎉 Congratulations!' ) : translate( 'Next Steps' ) }</h2>
Copy link
Contributor

Choose a reason for hiding this comment

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

@yashwin suggested in #85488 (comment) to separate the emoji from the text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unless there's a good reason to change it, I think it's best to keep it as-is. Splitting it means less flexibility for translators, which in general is a bad idea (though honestly I prefer no emojis).

Copy link
Contributor

@gogdzl gogdzl left a comment

Choose a reason for hiding this comment

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

Aside from my comment, the code looks good and works as advertised!
Great job!

Approving this as my comment is not a blocker.

@tbradsha tbradsha merged commit 5349c3e into trunk Dec 21, 2023
13 of 14 checks passed
@tbradsha tbradsha deleted the add/jp-manage/192/add_next_steps_component branch December 21, 2023 22:53
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 21, 2023
@a8ci18n
Copy link

a8ci18n commented Dec 22, 2023

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/10456794

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @tbradsha for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Dec 24, 2023

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants