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

[pickers] Do not require date-fns in @mui/x-date-pickers-pro #5941

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Aug 29, 2022

Fixes #5916

@flaviendelangle flaviendelangle added regression A bug, but worse component: pickers This is the name of the generic UI component, not the React module! labels Aug 29, 2022
@flaviendelangle flaviendelangle self-assigned this Aug 29, 2022
@mui-bot
Copy link

mui-bot commented Aug 29, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 332.4 580.9 549.4 474.16 110.967
Sort 100k rows ms 549.7 879.6 653.3 718.28 128.383
Select 100k rows ms 198 303 205.9 228.26 39.524
Deselect 100k rows ms 157.4 260.8 179.6 188.78 37.345

Generated by 🚫 dangerJS against 73096a3

Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

That's an unexpected consequence of the experiment 🤯

I confirm the regression is fixed by this PR
issue reproduction: https://codesandbox.io/s/admiring-bird-djug44?file=/index.tsx
issue reproduction with the fix: https://codesandbox.io/s/bold-germain-jt0dsl?file=/demo.tsx:133-170

@flaviendelangle flaviendelangle merged commit 2ae6979 into mui:master Aug 29, 2022
@flaviendelangle flaviendelangle deleted the date-fns-pro-bundle branch August 29, 2022 07:47
// We don't add those exports to the regular `@mui/x-date-pickers/internals`,
// Because they rely on date-fns, which is not used by all applications.
export {
useField,
Copy link
Member

Choose a reason for hiding this comment

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

I'd say that we should still look into removing the direct dependency of date-fns from useField.utls going forward 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I think we all agree on that
I requires new methods in the adapter so it was not feasable for a simple POC
But the components can't be stable with hardcoded date-fns stuff

alexfauquette pushed a commit to alexfauquette/mui-x that referenced this pull request Sep 20, 2022
…#5941)

[pickers] Do not require date-fns in @mui/x-date-pickers-pro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pickers] Export of parseNonNullablePickerDate is missing
4 participants