-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
fix: Valid timeslot marked 'slot no longer available' #19590
fix: Valid timeslot marked 'slot no longer available' #19590
Conversation
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
f03b440
to
c38f7b0
Compare
const dateBefore = dayjs(dateInGMT).subtract(1, "day").format("YYYY-MM-DD"); | ||
const dateAfter = dayjs(dateInGMT).add(1, "day").format("YYYY-MM-DD"); |
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.
Using this approach of checking on previous and next date as well of a particular date to find the timeslot.
Avoiding the approach of using the booker timezone to obtain the date to lookup for as that could still be buggy if user changes timezone on client and the timezone and the currently available scheduleData is out of sync(because getSchedule request could be in progress)
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (02/27/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add foundation team as reviewer" took an action on this PR • (02/27/25)1 reviewer was added to this PR based on Keith Williams's automation. |
E2E results are ready! |
@@ -76,6 +76,10 @@ export const PUBLIC_QUERY_AVAILABLE_SLOTS_INTERVAL_SECONDS = | |||
export const PUBLIC_INVALIDATE_AVAILABLE_SLOTS_ON_BOOKING_FORM = | |||
process.env.NEXT_PUBLIC_INVALIDATE_AVAILABLE_SLOTS_ON_BOOKING_FORM === "1"; | |||
|
|||
// Enables a feature for x% of all visitors. Takes a number between 0 and 100. | |||
export const PUBLIC_QUICK_AVAILABILITY_ROLLOUT = | |||
parseInt(process.env.NEXT_PUBLIC_QUICK_AVAILABILITY_ROLLOUT ?? "", 10) || 0; |
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.
Keeping default value to 0 so that it goes live disabled and we can enable it at convenient time
28f1653
to
9864f64
Compare
9864f64
to
dcf3d66
Compare
@@ -31,19 +91,14 @@ export const isTimeSlotAvailable = ({ | |||
return true; | |||
} | |||
|
|||
const dateInIso = isValidISOFormat(slotToCheckInIso) ? slotToCheckInIso.split("T")[0] : null; | |||
const dateInGMT = isValidISOFormat(slotToCheckInIso) ? slotToCheckInIso.split("T")[0] : null; |
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.
Not calling it ISO because ISO has time as well and it is just date.
What does this PR do?
To enable the 'Slot no longer available' feature we need to now set env variable. X is a percentage b/w 0 and 100.
0 to disable and 100 to enable for everyone.
NEXT_PUBLIC_QUICK_AVAILABILITY_ROLLOUT=X
After fix: https://www.loom.com/share/faefa4eb70564d939c49a5d8d495fbf5
Before fix: https://www.loom.com/share/096de9efb184410d8d60ed37aa44ed9f?from_recorder=1&focus_title=1
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?