-
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
Display license quantity on p2 #52199
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~250 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 (~308 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.
Working great, nice job! 🚢
@@ -8,6 +8,8 @@ import { useTranslate } from 'i18n-calypso'; | |||
import { useShoppingCart } from '@automattic/shopping-cart'; | |||
import type { RemoveProductFromCart, CouponStatus } from '@automattic/shopping-cart'; | |||
import { styled } from '@automattic/wpcom-checkout'; | |||
import { useSelector } from 'react-redux'; | |||
import getSelectedSite from 'calypso/state/ui/selectors/get-selected-site'; |
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.
I think this one could go into the Internal dependencies block.
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.
Looks good to me! Thanks!
One question: in your "after" screenshot, the math says "58 x 2 = 58". Is that correct? Or... oh, it's maybe not meant to be math. 🤷 Just a thought. |
No, you're right. That is indeed bad math 😆 I realized I was using the wrong property and fixed it in this commit: 438ee32#diff-1426f894a8a8f515e2c6dc4d96ff640d69a9720f186e51146cc0dec974c3ed02R565 |
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/5765005 Thank you @naxoc for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
This PR adds some tweaks to the checkout for P2s plan:
current_quantity
that was recently added to the API to display the price broken down in number of seats.current_quantity
to theResponseCartProduct
data type.hasP2PlusPlan
is added.Testing instructions
Before (for a P2 product):
After (for a P2 product):