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 info popover for tier dropdown #90600
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~517 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. 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. |
// The lightbox z-index is 100200, consequences of updating the popover z-index | ||
// to higher than that are unclear, so we'll manually set it to 100200 here so we | ||
// can see the popover in the lightbox. | ||
.popover { |
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.
Should this be more specific (with a class name added to the popover) to prevent styles seeping elsewhere after this stylesheet is loaded? Perhaps also included alongside the other z-index mappings: https://github.com/Automattic/wp-calypso/blob/trunk/client/assets/stylesheets/shared/functions/_z-index.scss
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 agree with that! Especially since <InfoPopover />
allows for adding custom modifier class names, we should leverage that - instead of providing a global change as it's not our intention.
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.
Thank you both on this, I went ahead and added the class that was added to the component to specify it more. I can't nest it because the popover itself is rendered outside the parent component but this should keep it specific to this popover
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.
Besides the comments, the change tests good!
// The lightbox z-index is 100200, consequences of updating the popover z-index | ||
// to higher than that are unclear, so we'll manually set it to 100200 here so we | ||
// can see the popover in the lightbox. | ||
.popover { |
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 agree with that! Especially since <InfoPopover />
allows for adding custom modifier class names, we should leverage that - instead of providing a global change as it's not our intention.
screenReaderText={ translate( 'Learn more' ) } | ||
className="product-lightbox__variants-dropdown--popover" | ||
> | ||
{ PRODUCT_OPTIONS_HEADER_INFO_CONTENT[ product?.productSlug ] } |
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 might want to use preventWidows()
formatting function - currently I see the widow on the screenshot attached to the PR.
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.
Nice suggestion for improvement thank you!
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!
17b72da
to
79320c9
Compare
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
* Add info popover for tier dropdown * Prevent widows and specify css class for zindex * Remove conflicting imports
Proposed Changes
Testing Instructions
/pricing
pagePre-merge Checklist