-
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
Limit Global Styles: Add notice to newsletter onboarding #68841
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~445 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. 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. |
{ isEnabled( 'limit-global-styles' ) && ( | ||
<Tooltip | ||
text={ __( | ||
'Upgrade to a paid plan for color changes to take affect and to unlock all premium design tools' |
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 replace "premium design tools" here with whatever feature name we finally give to Global Styles. See pdgrnI-1Ix-p2
...tepper/declarative-flow/internals/steps-repository/components/accent-color-control/index.tsx
Outdated
Show resolved
Hide resolved
hey @mmtr, looks nice, great work! I've noticed some small issues while on mobile:
|
Good catch, @BogdanUngureanu. @SaxonF do you have any ideas on how to prevent this? One thing that could avoid the issue is to display the tooltip on click, but I don't think it's immediately obvious that the badge is clickable. |
Finally found out a way in 75d5e21 so the tooltip shows up when hovering on desktop, and when clicking/tapping on mobile. |
.../declarative-flow/internals/steps-repository/components/global-styles-premium-badge/index.js
Outdated
Show resolved
Hide resolved
Looks and the interactions are way better now, thanks for implementing the suggestions. There's one small thing that maybe we should also implement: On mobile, when the popover is opened, it's not automatically closed when the user taps on other elements than the "Premium" badge. |
It'd be great if tapping on the tooltip dismissed it rather than launching the colour picker. |
Actually it looks like
|
@dsas that's the Calypso component, not the Gutenberg one which is the one I decided to use. But I'll probably switch to the Calypso component if it works better. |
The Popover component from Calypso works great! The tooltip is automatically closed now when clicking/tapping outside. |
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.
Works great on both mobile and desktop! 🎉
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7578092 Thank you @mmtr for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Fixes https://github.com/Automattic/dotcom-forge/issues/894
Proposed Changes
limit-global-styles
feature flag to the wpcalyps.json config file so it's easier to test in that environment.Further reading: paYJgx-2p8-p2
Testing Instructions
/setup/newsletterSetup?flow=newsletter
?flags=-limit-global-styles
param to the URL to disable the feature flag