Skip to content
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

refactor: upgrade react-day-picker to v9 #398

Merged
merged 3 commits into from
Aug 1, 2024
Merged

Conversation

SeanCassiere
Copy link
Owner

@SeanCassiere SeanCassiere commented Aug 1, 2024

Upgrades the react-day-picker to v9 and resolves the breaking changes introduced with the version bump.

@SeanCassiere SeanCassiere self-assigned this Aug 1, 2024
Copy link

vercel bot commented Aug 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rentall-clone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2024 2:50pm

@SeanCassiere SeanCassiere marked this pull request as ready for review August 1, 2024 14:51
Copy link
Owner Author

@SeanCassiere SeanCassiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼


const oldestYear = fromYear ?? DEFAULT_FROM_YEAR;
const newestYear = toYear ?? currentYear + 15;
const calendarHiddenOptions: Matcher[] = [
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relying on the react-compiler to perform auto memoizations here for better perf.

@@ -212,8 +221,9 @@ function CalendarDropdown(props: DropdownProps) {
);
}

return null;
return <div>dropdown</div>;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, dropdown is only ever used for the selection of months and year. Ofc, we'll have to revisit this later should there be a need to use it for more than the aforementioned options.

@@ -76,13 +76,13 @@ function InputDatePicker({
{children}
<PopoverContent
align={align}
className="max-w-[300px] px-0 pb-1.5 pt-1"
className="w-full max-w-[400px] px-0 pb-1.5 pt-1"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The width change doesn't seem to do anything 🤔.

@SeanCassiere SeanCassiere merged commit 639d0c5 into master Aug 1, 2024
3 checks passed
@SeanCassiere SeanCassiere deleted the react-day-picker-v9 branch August 1, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant