-
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
Hide free plan for domain upsell flow #74897
Hide free plan for domain upsell flow #74897
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~7 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. |
} | ||
|
||
setHideFreePlan( hideFreePlan ); | ||
setHideFreePlan( Boolean( suggestion.product_slug ) || shouldHideFreePlan ); |
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.
Just want to clarify what's happening here. Looks like we're taking out special logic for the DOMAIN_UPSELL_FLOW. I think we can do that here - without affecting other flows - because we're invoking setHideFreePlan( true );
on line 51 in domain-upsell.ts.
So basically, we just update that value in state when working within the domain-upsell flow, and the rest of the logic just works down stream.
Assuming that's right, I wonder whether there would be any unanticipated effects of updating that state value? For example, once we invoke setHideFreePlan( true );
that means as long as that state value persist, we'd never show the free plans. Is it possible that a user would end up back on the domains page via some other route/flow where they SHOULD see the free plan, but not see it because we've updated that state value?
Worth noting I can't think of one, but I just want to be sure we don't introduce unexpected changes to the domains page when not intended.
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're moving the "hide free plan" logic into the domain-upsell flow itself, instead of having that logic inside the domains step. It's essentially the same thing, but this change allows us to ensure that the Free plan is always hidden for the domain-upsell flow without modifying other code in the plans or domain step (until we decide we want to show the free plan for specific scenarios within the domain-upsell flow).
Assuming that's right, I wonder whether there would be any unanticipated effects of updating that state value? For example, once we invoke setHideFreePlan( true ); that means as long as that state value persist, we'd never show the free plans. Is it possible that a user would end up back on the domains page via some other route/flow where they SHOULD see the free plan, but not see it because we've updated that state value?
This is definitely possible if the same redux state value is retrieved/read in another plans-related component, but that will happen regardless of these changes. The only reference for getHideFreePlan
(to retrieve the "hide free plan" value from redux) in stepper plans/plans-wrapper.tsx
. This plans component is only used in Link-in-bio, newsletter, and the domain-upsell flow. The link-in-bio and newsletter will not be affected by these changes since they use the "old" plans component design (vs the new plans grid design we see on the /plans screen when going the domain-upsell flow)
This tests well, I'll hold off on approval due to Erick's comment |
Related to #74416
Testing / Review Estimation
Test: short
Review: short
Proposed Changes
Testing Instructions
Pre-merge Checklist