-
Notifications
You must be signed in to change notification settings - Fork 245
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: streak warning prompt for timezone #4071
feat: streak warning prompt for timezone #4071
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Tested it, and the logic seems to work correctly, but a couple of things:
I think it looks... weird. 😅 What do you think about maybe making the warning triangle the icon instead of the streak? Would make it instantly more visible too, I think.. EDIT: Also, once again I have been baited by the DRAFT 😡 |
good feedback on 1. point, I fixed it so it only closes if you select something |
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.
For some reason the old icon was broken, we did not use it anywhere else in the project
@@ -46,6 +47,7 @@ export function PromptElement(props: Partial<ModalProps>): ReactElement { | |||
overlayClassName="!z-max" | |||
isDrawerOnMobile | |||
drawerProps={{ displayCloseButton: false, appendOnRoot: true }} | |||
shouldCloseOnOverlayClick={shouldCloseOnOverlayClick} |
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.
adding support to disable outside click on prompt
<IconWrapper wrapperClassName="relative flex items-center gap-2"> | ||
<ReadingStreakIcon secondary={hasReadToday} /> | ||
{!isTimezoneOk && ( | ||
<WarningIcon className="text-raw-cheese-40" secondary /> |
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 want this specific color
@@ -82,10 +99,13 @@ interface ReadingStreakPopupProps { | |||
fullWidth?: boolean; | |||
} | |||
|
|||
const timezoneSettingsHref = '/account/notifications?s=timezone'; |
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 in case we want to do something special when user comes from timezone prompt in the future
// once off check to see how many users with timezone mismatches we have in the wild | ||
useEffect(() => { |
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 also log this every time but for now it felt it was too much because for users that had the wrong timezone it would log every time they open the app
@idoshamun to check events 🙏 |
@@ -170,6 +170,7 @@ export enum LogEvent { | |||
ScheduleStreakReminder = 'schedule streak reminder', | |||
StreakRecover = 'restore streak', | |||
DismissStreakRecover = 'dimiss streaks milestone', | |||
StreakTimezoneMismatch = 'streak timezone mismatch', |
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.
What's the difference between this and the click with "streak timezone mismatch prompt"?
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.
@idoshamun this is (currently) a once off to see how many users will even see the warning, it is once of for now to not spam #4071 (comment)
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
Events
Did you introduce any new tracking events?
Log the new/changed events below:
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
AS-914 #done
Preview domain
https://as-914-reading-streak-warning-pr.preview.app.daily.dev