-
Notifications
You must be signed in to change notification settings - Fork 16
Refactor WeekCalendar component + misc fixes #1459
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
base: main
Are you sure you want to change the base?
Conversation
12e12a0 to
8423e78
Compare
MelissaAutumn
left a 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 nice in action, I can't trigger the animation / scroll to stuff though.
For small mobile viewports I think we need to remove all left and right padding on the component.
| * Syncs horizontal scroll between header and body for mobile | ||
| * Uses requestAnimationFrame to batch updates and prevent layout thrashing | ||
| */ | ||
| function syncScroll(source: 'header' | 'body') { |
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.
When does this happen, because in mobiler simulator it doesn't seem to scroll to anything.
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 that was an interesting problem to solve for 😅 this is not an automatic scroll, it is actually just to be able to horizontally scroll the weekday header and the body since they are separate components (the calendar is a grid but the weekday header is in a separate div altogether).
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.
Well you fixed it so well I thought nothing was actually fixed haha.
|
TBH, and just my opinion of course, but from a user point of view I liked it better when the calendar grid only shows the hours that you have marked as your availability. I find it seems like a lot of extra white space and a lot of scrolling required to see your availability hours (and I am concerned it will especially be too much on mobile). |
@rwood-moz Good point! I tried to mitigate this by scrolling within the calendar to the current time so hopefully the requirements to keep scrolling around would be reduced. The problem with the previous approach though is the reason the ticket was created in the first place (remote events that couldn't fit in the calendar were not displayed at all)... it is a trade off of erroring on side of completeness vs keeping the calendar as small as possible. I've submitted a request with the design team for a review next week to go deeper into this and see what's the best approach. If it is the previous implementation, happy to revert and document the shortcomings somewhere for support! |
devmount
left a 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.
First: This is some heavy work you implemented here! Thanks so much for constantly syncing the views up with design 👏🏻 🎉
Alright, I tested this with different configurations. Here are some very opinionated findings, feel free to ignore those if you think they are not relevant / already discussed:
- Clarity on the current position: It's nice, that the view automatically scrolls to the current time on page load. But it's also a bit confusing and "feels random". Maybe it'd be good to investigate how to make that visible to the user? E.g. drawing a dashed horizontal line where the current time is or sth like that
- Default position: I also found myself scrolling back to the top every time I opened a bookers page. In most of the cases I don't look for meetings today/now, but the next days or week. So imho it makes more sense to default the scroll view to the first time an event occurs in that week. But again: This is highly subjective. Somebody else might have other needs here.
- Timezone offsets: I configured my schedule in Europe/Berlin to be everyday from 9am to 2pm. Now I access the bookers page from America/Los_Angeles and see... nothing 😂 I navigate through the weeks and don't see a single event because I'm in the timezone gap and need to scroll upwards to see the available time slots.
In general I think we're definitely going in the right direction here. I just believe we need some more tools or visual hints, to omit confusion. E.g. I can think of making the grid depending on the schedule event duration. If 60min slots are configured, maybe a grid with 60min resolution would be sufficient.
| /** | ||
| * Scrolls the calendar to the current time position | ||
| */ | ||
| function scrollToCurrentTime() { |
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.
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 so much better now!! thanks
d1f8cea to
6537066
Compare

Description of the Change
[TL;DR]:
LoadingSpinnerandEventPopupstyles and converted them from Tailwind to vanilla scoped CSSUserCalendarSyncto calculate the "time ago" properly, share a loading state with the calendar and bust cache to get the most up-to-date remote eventsNote
This is quite a big change so I'd appreciate some time to test the calendar out both in the Dashboard and in the BookersView with various Availability and calendar setups
--
[Explanation of why the issue happened and this PR's proposal on fixing it]:
Benefits
Screenshots
Light mode (Dashboard)

Light mode (Booker page)

Dark mode (Dashboard)

Dark mode (Booker page)

Applicable Issues
Fixes #1442