-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add description for Most Popular products/bundles to calypso-products #67203
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~327 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~538 bytes added 📈 [gzipped])
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 (~326 bytes added 📈 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better and simple approach would be to return description based on feature-flag.
For example, in packages/calypso-products/src/plans-list.tsx
, you can do this inside getPlanJetpackCompleteDetails
getDescription: () =>
isEnabled( 'jetpack/pricing-page-rework-v1' )
? translate(
'Get the full Jetpack suite with real-time security tools, improved site performance, and tools to grow your business.'
)
: translate(
'Get the full power of Jetpack with all Security, Performance, Growth, and Design tools.'
),
You won’t need to change it for Security
You can do the same for Backup and VideoPress in packages/calypso-products/src/translations.tsx
@manzoorwanijk , although the approach you describe would work for the Bundles, I don't believe it will work for the Products because we need to have access to both a "regular" description and a "featured" description at the same time because the featured products (currently Backup and VideoPress) are displayed in both sections on the page, (the Most popular section showing a "featured" description, and the All products section showing a "regular" description). And I think it might be good to have a separate "featured" description and "regular" description for Bundles too because then other codebases that share the |
export const getJetpackProductsFeaturedText = (): Record< string, TranslateResult > => { | ||
const backupDailyFeaturedText = translate( | ||
'Protect your site or store. Save every change with real-time cloud backups, and restore in one click.' | ||
); | ||
const videoPressFeaturedText = translate( | ||
'Own your content. High-quality, ad-free video build specifically for WordPress.' | ||
); | ||
|
||
return { | ||
[ PRODUCT_JETPACK_BACKUP_DAILY ]: backupDailyFeaturedText, | ||
[ PRODUCT_JETPACK_BACKUP_DAILY_MONTHLY ]: backupDailyFeaturedText, | ||
[ PRODUCT_JETPACK_BACKUP_REALTIME ]: backupDailyFeaturedText, | ||
[ PRODUCT_JETPACK_BACKUP_REALTIME_MONTHLY ]: backupDailyFeaturedText, | ||
[ PRODUCT_JETPACK_BACKUP_T1_YEARLY ]: backupDailyFeaturedText, | ||
[ PRODUCT_JETPACK_BACKUP_T1_MONTHLY ]: backupDailyFeaturedText, | ||
[ PRODUCT_JETPACK_BACKUP_T2_YEARLY ]: backupDailyFeaturedText, | ||
[ PRODUCT_JETPACK_BACKUP_T2_MONTHLY ]: backupDailyFeaturedText, | ||
[ PRODUCT_JETPACK_VIDEOPRESS ]: videoPressFeaturedText, | ||
[ PRODUCT_JETPACK_VIDEOPRESS_MONTHLY ]: videoPressFeaturedText, | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add in a "featured description" for All of the Jetpack products, that way in the future we could easily swap out/change which products are shown in the Most popular products section. Also, later we want to build in the feature where if one of the Most popular products is already owned/active, we will display one of the other products as a "featured" product in its place. This means we will need featured descriptions defined for all of the products.
Here are the "Featured descriptions" for all of the products: pbNhbs-3MZ-p2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elliottprogrammer while I was working on it, even I thought it is good to have featuredDescription
for all the products. Thanks much for initiating conversation with the marketing team and getting it ready. I will add description for other products too
@elliottprogrammer, I guess @manzoorwanijk assumption is right since the new pricing page All product section isn't utilizing the what do you guys think? |
Ahh yes, I see.. Thanks for explaining further @vikneshwar. Yes, I think I am still leaning toward your current approach for the same reasons you mentioned. What do think @manzoorwanijk, do you see any noteworthy disadvantages of keeping with the current approach? |
There are no disadvantages to the current approach. It's nice. I just wanted to keep the changes simple and minimal wherever possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job 🚀
…o-product package * Adds description for products and bundles in featured section to calypso package * Makes use of newly added featuredText to render in the UI
…s in the product section Before this change products other than the one in featured section is shown in All products section, current changes shows all the products
The logic to render all items is handled already in the main component, so reverting it here
06dc068
to
5d0ec6e
Compare
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks @vikneshwar!
LGTM too! 🚀
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7508321 Thank you @vikneshwar for including a screenshot in the description! This is really helpful for our translators. |
Hi there! My translators called out a possible typo in the string:
Should |
One more here:
|
PR #67324 fixes the typo |
…#67203) * Jetpack New Pricing page - add featured product/bundle text to calypso-product package * Adds description for products and bundles in featured section to calypso package * Makes use of newly added featuredText to render in the UI * Jetpack New pricing page - update the logic to render all the products in the product section Before this change products other than the one in featured section is shown in All products section, current changes shows all the products * Jetpack New pricign page - Revert back logic to render all items The logic to render all items is handled already in the main component, so reverting it here * Jetpack New pricing page - add featuredText for other standalone products * Jetpack New Pricing page - update featured text for Jetpack Daily
Translation for this Pull Request has now been finished. |
This PR updates the pricing page featured section to show the correct description.
Proposed Changes
calypso-products
to fetch featured text for Productscalypso-products
to fetch featured text for BundlesfeaturedText
to selector objectFeaturedItemCard
Testing Instructions
/pricing?flags=jetpack/pricing-page-rework-v1
git fetch && git checkout add/featured-product-text
yarn start-jetpack-cloud
Screenshots
BEFORE:
AFTER:
Pre-merge Checklist