-
Notifications
You must be signed in to change notification settings - Fork 10.2k
fix: Cal Video sidebar not showing meeting time in timezone #22821
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
Conversation
WalkthroughThe changes refactor the Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (3)**/*.ts📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
**/*.{ts,tsx}📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
**/*.tsx📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
🧠 Learnings (4)📓 Common learnings
packages/lib/dayjs/index.ts (1)Learnt from: CR apps/web/modules/videos/views/videos-single-view.tsx (1)Learnt from: CR apps/web/modules/bookings/views/bookings-single-view.tsx (3)Learnt from: CR Learnt from: eunjae-lee Learnt from: CR 🔇 Additional comments (6)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -1229,8 +1229,21 @@ function RecurringBookings({ | |||
<div key={idx} className={classNames("mb-2", isCancelled ? "line-through" : "")}> | |||
{formatToLocalizedDate(dayjs.tz(dateStr, tz), language, "full", tz)} | |||
<br /> | |||
{formatToLocalizedTime(dayjs(dateStr), language, undefined, !is24h, tz)} -{" "} |
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 we're passing an object to formatToLocalizedTime
we don't need to pass undefined as a param here.
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 are still setting timeStyle to undefined in the new object argument format, I think we should have skipped that.
<h3>{t("when")}:</h3> | ||
<p suppressHydrationWarning={true}> | ||
{formatToLocalizedDate(startTime)} <br /> | ||
{formatToLocalizedTime(startTime)} |
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.
Timezone wasn't being passed even though we're displaying it in the sidebar.
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (07/30/25)1 reviewer was added to this PR based on Keith Williams's automation. |
E2E results are ready! |
{formatToLocalizedTime({ | ||
date: dayjs(dateStr), | ||
locale: language, | ||
hour12: !is24h, | ||
timeZone: tz, | ||
})}{" "} | ||
-{" "} | ||
{formatToLocalizedTime({ | ||
date: dayjs(dateStr).add(duration, "m"), | ||
locale: language, | ||
hour12: !is24h, | ||
timeZone: tz, | ||
})}{" "} |
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: It might be better to have a fn that does returns this time range. It seems to be a duplicate here. Same as above.
{formatToLocalizedTime({ date, locale: language, hour12: !is24h, timeZone: tz })} -{" "} | ||
{formatToLocalizedTime({ | ||
date: dayjs(date).add(duration, "m"), | ||
locale: language, | ||
hour12: !is24h, | ||
timeZone: tz, | ||
})}{" "} |
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 one too is duplicate it seems
locale = undefined, | ||
timeStyle = "short", | ||
hour12 = undefined, | ||
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.
Would it make sense to make timeZone a required field, so that goign forward this timeZone isn't accidentally missed
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 nit comments regarding code cleanup, otherwise it is good !!
What does this PR do?
formatToLocalizedTime
to accept an object instead of multiple paramsvideos-single-view
pass timezone toformatToLocalizedTime
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?