-
Notifications
You must be signed in to change notification settings - Fork 201
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
[KOA-4846] Fixed white spaces selection in calendar component #2296
Conversation
Browser supportIf this is a visual change, make sure you've tested it in multiple browsers, |
Visual regression tests passed 😎. Bear in mind that they only run in Chromium on static components – they aren't perfect. |
Visit https://backpack.github.io/storybook-prs/2296 to see this build running in a browser. |
Visual regression tests passed 😎. Bear in mind that they only run in Chromium on static components – they aren't perfect. |
Visit https://backpack.github.io/storybook-prs/2296 to see this build running in a browser. |
Visual regression tests passed 😎. Bear in mind that they only run in Chromium on static components – they aren't perfect. |
Visit https://backpack.github.io/storybook-prs/2296 to see this build running in a browser. |
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 a couple of minior checks we should just verify to avoid unexpected crashes going on during the calendar operation
ignoreOutsideDate, | ||
) { | ||
const { startDate, endDate } = selectionConfiguration; | ||
const sameStartDay = isSameDay(date, startDate); |
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 might want to check if startDate
and endDate
are available before calling these functions as it can sometimes throw errors that they are not available when calling the isSameDay functions - can we check it just to make sure?
I know this was something that came up during the original build of the code
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.
good point! I'll check this!
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.
It seems like it should be alright as the function returns false if one or both dates are null 🤔
ignoreOutsideDate && | ||
rangeDates && | ||
isSameMonth(startDate, endDate) && | ||
isWithinRange(date, { start: startDate, end: endDate }) && |
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.
Same query as above here
!isSameMonth(startDate, endDate) && | ||
!isSameMonth(month, date) && | ||
((isSameWeek(date, endDate, { weekStartsOn }) && | ||
isAfter(date, startDate)) || |
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.
Same here
Also sorry I didn't mean to use request changes but comment instead 😂 |
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 is amazing!
Remember to include the following changes:
UNRELEASED.md
(See How to write a good changelog entry)README.md