fix: update BookingCalendar time axis to meet earliest booking if earlier than 9am - #836
Merged
Conversation
added 5 commits
July 3, 2026 16:06
…t declaration in useFavourites
…ffor relevant timeslots
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Updated BookingCalendar to display the 'min' (the earliest time along the y axis) as a dynamically calculated value depending on the earliest event during that day or week. This value is bounded to be at the earliest 5AM, and at its latest be 9AM.
Why
Previously, any bookings that occurred before 9AM would not display correctly, e.g. an event from 8AM-9AM would display beginning at 9AM along the axis. Alongside this events that would occur after such an event would visually collide with the previous event even though they shouldn't.
How
Used a useMemo to to identify, based on the day/week depending on the view, and if theres no events or the earliest event occurs during/after 9AM, then keep the default 9AM start time for the calendar. Else if an earlier event is found, bound it between 9AM and the earliest allowed time (5AM) and update the minimum time along the calendar axis to this new starting hour.
*The change to useFavourites was due to a bug in the snapshot cacheing that was occurring in rare cases
Screenshot / Recording
Before

After
