-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: [1/n] Teams Downgrade Flow Experiment #27617
base: master
Are you sure you want to change the base?
Conversation
Size Change: +44 B (0%) Total Size: 1.13 MB ℹ️ View Unchanged
|
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 great, the downgradeLogic
is very clean 😄
@@ -36,6 +38,8 @@ export const BillingProductAddonActions = ({ addon, productRef }: BillingProduct | |||
cancelTrial, | |||
} = useActions(billingProductLogic({ product: addon })) | |||
const { featureFlags } = useValues(featureFlagLogic) | |||
const { showDowngradeModal } = useActions(downgradeLogic) | |||
const { isUserInExperiment } = useValues(downgradeLogic) |
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.
nit: make this more specific e.g. isUserInDowngradeFlowExperiment
listeners(({ actions, values }) => ({ | ||
handleDowngrade: async () => { | ||
if (values.currentAddon) { | ||
const logic = billingProductLogic({ product: values.currentAddon }) |
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.
Some random kea related questions:
How does this work with pulling in a logic directly, do we need to mount it?
Is this a common kea pattern, or is it more common to use connect? Not sure if using connect is possible here given you need to pass a product?
Problem
When a user unsubscribes from the teams feature, we want to show them a list of features that they are currently using and will lose access to.
Changes
In this PR, I'm doing the initial experiment setup and showing the user a basic modal before they can unsubscribe. Next I will add logic to check which features are actually used by the org and update the list.
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
Cloud: Yes
How did you test this code?
This is an old video, but the flow is the same where the unsubscribe survey opens after the modal
Screen.Recording.2025-01-14.at.2.25.13.PM.mov
Verified modal pops up before they are allowed to unsubscribe.
Verified that the user only sees the new flow if they are in the experiment group