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

Add additional product data(lightbox) to calypso package #67687

Merged
merged 4 commits into from Sep 13, 2022

Conversation

vikneshwar
Copy link
Contributor

@vikneshwar vikneshwar commented Sep 12, 2022

This PR adds data to be shown in lightbox to calypso-product package

Proposed Changes

  • Adds functions in calypso-products to fetch Includes, Benefits, Recommended For for Products
  • Adds the functions in calypso-products to fetch Includes, Benefits, Recommended For for Bundles
  • Adds new properties to selector object

Testing Instructions

Note: This is an internal change to add data to calypso-package, no testing in UI can be done until the components are ready. However, make sure everything works as before by following the below instructions

Pre-merge Checklist

  • 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)?

  • Related To:
    -1202796695664022-as-1202796695664084/f

  • To see the specific tasks where the Asana app for GitHub is being used, see below:
    • 0-as-1202796695664084

…kage

* Adds lightbox additional data - Includes, Recommended for, Benefits to calypso-products package
* Use the data from calypso package to generate item slug
@vikneshwar vikneshwar requested a review from a team September 12, 2022 17:31
@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 Sep 12, 2022
@vikneshwar vikneshwar added the Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) label Sep 12, 2022
@vikneshwar vikneshwar changed the title Jetpack New Pricing Page - Add additional product data to calypso pac… Add additional product data(lightbox) to calypso package Sep 12, 2022
@matticbot
Copy link
Contributor

matticbot commented Sep 12, 2022

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

App Entrypoints (~1849 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper      +7977 B  (+0.2%)    +1849 B  (+0.2%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~2147 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
site-purchases                       +8355 B  (+0.6%)    +1950 B  (+0.5%)
scan                                 +8355 B  (+1.2%)    +1950 B  (+1.0%)
purchases                            +8355 B  (+0.5%)    +1950 B  (+0.5%)
plans                                +8355 B  (+0.9%)    +1950 B  (+0.8%)
jetpack-search                       +8355 B  (+2.0%)    +1950 B  (+1.6%)
jetpack-connect                      +8355 B  (+0.8%)    +1950 B  (+0.7%)
jetpack-cloud-pricing                +8355 B  (+1.5%)    +1950 B  (+1.2%)
domains                              +8355 B  (+0.5%)    +1959 B  (+0.5%)
backup                               +8355 B  (+1.0%)    +1950 B  (+0.8%)
themes                               +7977 B  (+1.1%)    +1856 B  (+0.9%)
theme                                +7977 B  (+1.7%)    +1856 B  (+1.3%)
stats                                +7977 B  (+1.1%)    +1856 B  (+0.9%)
signup                               +7977 B  (+2.0%)    +1856 B  (+2.2%)
settings-writing                     +7977 B  (+1.2%)    +1856 B  (+1.0%)
settings-security                    +7977 B  (+1.8%)    +1856 B  (+1.4%)
settings-performance                 +7977 B  (+1.4%)    +1856 B  (+1.1%)
settings                             +7977 B  (+1.2%)    +1856 B  (+1.0%)
purchase-product                     +7977 B  (+4.8%)    +1856 B  (+4.2%)
posts-custom                         +7977 B  (+1.3%)    +1856 B  (+1.1%)
posts                                +7977 B  (+1.3%)    +1856 B  (+1.1%)
plugins                              +7977 B  (+0.9%)    +1856 B  (+0.7%)
people                               +7977 B  (+1.4%)    +1856 B  (+1.1%)
migrate                              +7977 B  (+2.1%)    +1856 B  (+1.6%)
media                                +7977 B  (+0.4%)    +1856 B  (+0.4%)
marketplace                          +7977 B  (+1.2%)    +1856 B  (+0.9%)
marketing                            +7977 B  (+1.2%)    +1856 B  (+1.0%)
jetpack-cloud-settings               +7977 B  (+1.9%)    +1856 B  (+1.5%)
jetpack-cloud-plugin-management      +7977 B  (+1.0%)    +1856 B  (+0.8%)
jetpack-cloud-partner-portal         +7977 B  (+1.9%)    +1856 B  (+1.5%)
jetpack-cloud-agency-dashboard       +7977 B  (+1.7%)    +1856 B  (+1.4%)
hosting                              +7977 B  (+1.5%)    +1856 B  (+1.2%)
home                                 +7977 B  (+1.0%)    +1856 B  (+0.9%)
help                                 +7977 B  (+1.2%)    +1856 B  (+1.0%)
email                                +7977 B  (+1.3%)    +1856 B  (+1.0%)
earn                                 +7977 B  (+1.5%)    +1856 B  (+1.2%)
checkout                             +7977 B  (+0.5%)    +1856 B  (+0.4%)
activity                             +7977 B  (+1.1%)    +1856 B  (+0.9%)
accept-invite                        +7977 B  (+1.7%)    +1856 B  (+1.9%)

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 (~1856 bytes added 📈 [gzipped])

name                                                              parsed_size            gzip_size
async-load-masterbar-cart-masterbar-cart-wrapper                      +7977 B   (+4.9%)    +1856 B  (+3.8%)
async-load-design-playground                                          +7977 B   (+0.4%)    +1856 B  (+0.4%)
async-load-design-blocks                                              +7977 B   (+0.3%)    +1856 B  (+0.3%)
async-load-design                                                     +7977 B   (+0.4%)    +1856 B  (+0.4%)
async-load-calypso-reader-sidebar                                     +7977 B   (+5.6%)    +1856 B  (+4.9%)
async-load-calypso-post-editor-editor-media-modal                     +7977 B   (+0.5%)    +1856 B  (+0.4%)
async-load-calypso-my-sites-current-site-stale-cart-items-notice      +7977 B  (+10.4%)    +1856 B  (+9.3%)
async-load-calypso-my-sites-current-site-notice                       +7977 B   (+8.0%)    +1856 B  (+6.9%)
async-load-calypso-components-web-preview-component                   +7977 B   (+1.5%)    +1856 B  (+1.2%)
async-load-calypso-blocks-jitm-templates-sidebar-banner               +7977 B   (+9.2%)    +1856 B  (+8.0%)
async-load-calypso-blocks-jitm-templates-notice                       +7977 B   (+9.2%)    +1856 B  (+8.0%)
async-load-calypso-blocks-jitm-templates-default                      +7977 B   (+9.2%)    +1856 B  (+8.0%)
async-load-calypso-blocks-inline-help-popover                         +7977 B   (+1.3%)    +1856 B  (+1.1%)
async-load-calypso-blocks-editor-checkout-modal                       +7977 B   (+0.8%)    +1856 B  (+0.7%)
async-load-automattic-help-center                                     +7977 B   (+1.4%)    +1856 B  (+1.1%)

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.

* Remove constant that stored the translated text, instead call translate inline
* Remove redundant type cast and return types
@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit add/lightbox-info-to-calypso-package on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

* Remove extra whitespace in translation texts
* Rename selector function
Copy link
Member

@manzoorwanijk manzoorwanijk left a comment

Choose a reason for hiding this comment

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

This looks great now. Thank you for making the changes.

@vikneshwar vikneshwar merged commit f2cc08c into trunk Sep 13, 2022
@vikneshwar vikneshwar deleted the add/lightbox-info-to-calypso-package branch September 13, 2022 08:52
@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 Sep 13, 2022
@a8ci18n
Copy link

a8ci18n commented Sep 13, 2022

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

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

Comment on lines +509 to +510
const backupIncludesInfoMonthlyLog = translate( '30-day activity log archive' );
const backupIncludesInfoYearlyLog = translate( '1 year activity log archive' );
Copy link
Contributor

Choose a reason for hiding this comment

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

@vikneshwar, we have some incorrect data here:

The way is is defined right now is: (which is incorrect)

  • Backup T1 (monthly) has: '30-day activity log archive'
  • Backup T1 (yearly) has: '1 year activity log archive'
  • Backup T2 (monthly) has: '30-day activity log archive'
  • Backup T2 (yearly) has: '1 year activity log archive'

The way it should be:

  • Backup T1 (yearly & monthly) should have '30-day activity log archive'.
  • Backup T2 (yearly & monthly) should have '1 year activity log archive'.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you create a new PR with the above corrections ^^?


const socialBenefits = [
translate( 'Save time by sharing your posts automatically' ),
translate( 'Unlock your growth potential by building a following on social' ),
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we missing the word "media" at the end?

I think it should be:

"... building a following on social media"

Comment on lines +1867 to +1869
translate( '1TB (1,000GB) of cloud storage' ),
translate( '1-year activity log archive' ),
translate( 'Unlimited one-click restores from the last 1 year' ),
Copy link
Contributor

Choose a reason for hiding this comment

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

In these "What's included" items for SECURITY_T2 and also BACKUP_T2 products, there are some parts of it that should be bold type. For example:

  • 1TB (1,000GB) of cloud storage
  • 1-year activity log archive
  • Unlimited one-click restores from the last 1 year

As shown on the Figma design here: m0y1jHTuDpvMPkFsOJBoNP-fi-3557%3A123824

@vikneshwar
Copy link
Contributor Author

@elliottprogrammer Thanks for checking on this. I have created a new PR #67789

@a8ci18n
Copy link

a8ci18n commented Sep 21, 2022

Translation for this Pull Request has now been finished.

@vikneshwar vikneshwar self-assigned this Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants