-
Notifications
You must be signed in to change notification settings - Fork 244
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: Plus CTA copy experiment #4173
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -113,7 +116,7 @@ export const BlockedWords = (): ReactElement => { | |||
}); | |||
}} | |||
> | |||
upgrade to Plus | |||
{plusCta} |
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 think we should lowercase the first letter from this variable since the replaced value did have a lowercased first letter which might mean this is a part of a whole sentence.
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.
Right, thanks for noticing! Updated ✔️
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 amazing! Just two minor comments and we should be good.
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.
You didn't use the conditional hook, kindly make sure that none of the components are rendered until we actually know the user is not plus.
@sshanzel moved to conditional hook for better experiment tracking ✔️ |
const { | ||
value: { full: plusCta }, | ||
} = useConditionalFeature({ | ||
feature: featurePlusCtaCopy, | ||
shouldEvaluate: !isPlus, | ||
}); |
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 think it might be a good idea to introduce a hook that manages this (all usages). So that we can also check if isAuthReady
is true as this can evaluate while the boot is being loaded.
Sorry for the last mile changes 🙏
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 add a hook dedicated to this label but originally didn't want to over engineering this feature.
About the evaluation: I've checked the logic in hook and once shouldEvaluate
value change it should rerun the query and check again (everything seems managed with useQuery and shouldEvaluate is both in queryKey and enabled).
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.
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.
Yeah, what I mean is at on load, the value of isPlus
is false then it would make the shouldEvaluate
to true while the boot is still being fetched. And once it has turned true, the user is already enrolled even if we return it back to false with shouldEvaluate
.
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 don't think having the hook would over-engineer the feature, especially since experiments are quite a mess to manage, and having a hook would make it easier to make changes across implementations. Also, I can help you refactor this if you are a bit occupied with high-priority tasks if you want 🙏
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.
If you are confident that the edge case won't unnecessarily enroll users (since experiments are expensive to run, hence a bit strict with enrollment), I'll trust your judgement so we can move on to merge 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.
Looks good to me.
Changes
Experiment
Did you introduce any new experiments?
Name:
plus_cta_copy
Value: JSON object with full/short properties
{ full: 'Upgrade to Plus', short: 'Upgrade' }
Enrollment conditions:
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
Preview domain
https://mi-786-plus-copy-experiment.preview.app.daily.dev