Description
Proposed Changes
This PR adds dynamic handling for the Choose a Plan task for Launchpad. In particular the following changes have been made:
- Update text for task item to to “Choose a Plan” per Figma.
- Make the badge text on the Choose a Plan task dynamic. This had been hard coded. It will show the actual plan name, and the plan name will be translated. If no badge text is defined, the badge will now show.
- Related: I made badge text optional for the Task type since we’re only using that in a few places.
NOTE: Prettier made some extra formatting updates to style.scss. Those aren’t required for this PR, but I also didn’t want to directly override them.
Testing Instructions
-
Checkout and setup. Checkout this branch, do yarn and yarn start if needed.
-
Test Free Plan. Go to http://calypso.localhost:3000/setup/launchpad?flow=newsletter&siteSlug=SITESLUG (replace SITESLUG with any site that has free plan).
- Confirm plan task says Choose a Plan
- Confirm there is a badge for that task, and it says “Free”
- Test Paid Plan. Go to http://calypso.localhost:3000/setup/launchpad?flow=newsletter&siteSlug=SITESLUG (replace SITESLUG with any site with a paid plan).
- Confirm plan task says Choose a Plan
- Confirm there is a badge for that task, and it says “Personal” (or the name of whatever plan your site has)
- Extra: Test Another Paid Plan. Consider testing with the same URL again but with any other paid plan and confirm plan name shows correctly. The Choose a Plan task should always show the accurate plan name.
Unfortunately, no screenshots were provided by the developer.