-
Notifications
You must be signed in to change notification settings - Fork 11.1k
fix(calendar): Prevent date range header from flickering #25356
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?
fix(calendar): Prevent date range header from flickering #25356
Conversation
|
@shubham-021 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
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: |
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.
1 issue found across 1 file
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="packages/features/bookings/Booker/Booker.tsx">
<violation number="1" location="packages/features/bookings/Booker/Booker.tsx:164">
The memoized column-view extra day calculation only depends on `nonEmptyScheduleDays.length` even though it uses the array’s contents, so updates that change availability without changing the length leave `columnViewExtraDays.current` stale and the header can show wrong day offsets.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
Udit-takkar
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.
Unit tests are failing.
|
marking this draft until then |
|
@Udit-takkar @Pallava-Joshi
All Booker-specific tests pass successfully |
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.
No issues found across 3 files
What does this PR do?
The issue was caused by incorrect handling of columnViewExtraDays.current value in packages/features/bookings/Booker/Booker.tsx.
Problem:
Solution:
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Reproducing the issue:
problem.mov
After fixing the issue:
solved_2.mov
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
The existing Booker component tests cover the logic.This fix is just an optimization (when the calculation runs), not a logic change.