-
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
Global Styles on Personal AB: Calypso changes #98538
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
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 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~36 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~1808 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 (~325 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. |
…rigger an error in some circumstances
…global as default value to avoid prop drilling into the package.
Do not merge until we get the final experiment key. |
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 can see the style variations message on the design picker, but I'm not sure how to get the others.
client/state/sites/hooks/with-site-global-styles-on-personal.tsx
Outdated
Show resolved
Hide resolved
client/jetpack-cloud/sections/partner-portal/primary/wpcom-atomic-hosting/card-content.tsx
Outdated
Show resolved
Hide resolved
...g/stepper/declarative-flow/internals/steps-repository/design-setup/unified-design-picker.tsx
Show resolved
Hide resolved
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've been through and tested everything I can think of on control and treatment and it works for me.
I've only skimmed through the code, but @xavier-lc has had a closer look, so I'm approving.
LGTM too! 🥇 |
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 quick note about packages on calypso. Packages should ideally be self-contained and avoid global dependencies. We can approach this in one of two ways.
1 - Expose a brand new function
globalStylesOnPersonalExperimentFeatures: ()=>{}
2 - Inject a function parameter isGlobalStylesOnPersonalEnabled
Either way next we can introduce a new prop on plans grid as shown here.
wp-calypso/packages/plans-grid-next/src/types.ts
Lines 216 to 242 in 930396e
/** | |
* Reduce the vertical spacing between each feature group | |
*/ | |
enableReducedFeatureGroupSpacing?: boolean; | |
/** | |
* Display only the client logos for the enterprise plan | |
*/ | |
enableLogosOnlyForEnterprisePlan?: boolean; | |
/** | |
* Hide the titles for feature groups in the features grid | |
*/ | |
hideFeatureGroupTitles?: boolean; | |
/** | |
* Enable the display of the term savings in plan prices. | |
* Prices will display crossed out with the savings from shorter term accentuated in a label. | |
* This carries lower precedence than promo/coupon and introductory pricing, irrespective of whether set or not. | |
*/ | |
enableTermSavingsPriceDisplay?: boolean; | |
/** | |
* Determine if storage add-on products should be combined with plan costs when | |
* calculating prices. | |
*/ | |
reflectStorageSelectionInPlanPrices?: boolean; |
the prop can then be funneled down here to be utilized here to differentiate between the feature sets
wp-calypso/packages/plans-grid-next/src/hooks/data-store/use-plan-features-for-grid-plans.ts
Lines 41 to 51 in 930396e
const usePlanFeaturesForGridPlans: UsePlanFeaturesForGridPlans = ( { | |
gridPlans, | |
allFeaturesList, | |
hasRedeemedDomainCredit, | |
intent, | |
selectedFeature, | |
showLegacyStorageFeature, | |
isInSignup, | |
} ) => { | |
const highlightedFeatures = useHighlightedFeatures( { intent: intent ?? null, isInSignup } ); | |
return useMemo( () => { |
Let me know if I can help with this change. Happy to draw up a pull request to your PR :)
We now have the final experiment code and this PR can be merged. |
Promise.resolve( { | ||
shouldLimitGlobalStyles: true, | ||
globalStylesInUse: false, | ||
globalStylesInPersonalPlan: experimentAssignment.variationName === 'treatment', |
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 have 2 different treatments for this experiment which are: gs_on_personal
and gs_on_personal_extra_features
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.
Fixed in #98974
Related to:
Proposed Changes
Site settings
Design Picker
Theme Showcase
Front End Notice
Why are these changes being made?
Testing Instructions
Pre-merge Checklist