-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
New user progress guides #4716
New user progress guides #4716
Conversation
Your Render PR Server URL is https://social-app-pr-4716.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cq1m9ko8fa8c73ctut3g. |
|
120b74e
to
9c5420c
Compare
if (guide?.isComplete) { | ||
return | ||
} | ||
if (guide?.guide === 'like-10-and-follow-7') { |
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 idea: this is basically a reducer, I wonder if the params would be more extensible if we made this a discriminated union of reducer actions?
Could then extract this into a pure function for future extensibility and testing (if we ever need it). The result is used for side effects, so I think that could happen as a separate step instead of blending to two 🤔
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.
This can come later too
@@ -185,6 +187,7 @@ export function StepFinished() { | |||
setActiveStarterPack(undefined) | |||
setHasCheckedForStarterPack(true) | |||
setQueuedTour(TOURS.HOME) | |||
startProgressGuide('like-10-and-follow-7') |
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.
Should we check the gate here in case we want to test entirely separate variations or do you want to keep it more centralized?
startProgressGuide(guide: ProgressGuideName) { | ||
if (!gate('new_user_progress_guide')) { | ||
return | ||
} | ||
if (guide === 'like-10-and-follow-7') { |
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.
Should probably have some sort of check here to prevent clobbering an existing active guide
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.
This can come later
src/state/shell/progress-guide.tsx
Outdated
<ProgressGuideContext.Provider value={activeProgressGuide}> | ||
<ProgressGuideControlContext.Provider value={controls}> | ||
{children} | ||
<ProgressGuideToast |
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.
Any issues with these always rendering?
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, fixed
@@ -352,3 +354,25 @@ export function SuggestedFeeds() { | |||
</View> | |||
) | |||
} | |||
|
|||
export function ProgressGuide() { |
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.
This renders all the time, even if the guide isn't active
src/state/shell/progress-guide.tsx
Outdated
const controls = React.useMemo(() => { | ||
return { | ||
startProgressGuide(guide: ProgressGuideName) { | ||
if (!gate('new_user_progress_guide') && false) { |
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 reminding us to remove this when we're done testing
…le guide is active
…al-app into paul/progress-guides
@@ -369,6 +374,7 @@ function Header({ | |||
starterPack: starterPack.uri, | |||
count: dids.length, | |||
}) | |||
captureAction(ProgressGuideAction.Follow, dids.length) |
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.
oh subtle
Web
CleanShot.2024-07-01.at.19.22.43.mp4
Mobile
(Interstitials showing progress not yet done in this recording)
CleanShot.2024-07-01.at.19.19.58.mp4