-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[fields] Play with the Base UI DX #14679
base: master
Are you sure you want to change the base?
Conversation
Deploy preview: https://deploy-preview-14679--material-ui-x.netlify.app/ Updated pages: |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
55d5828
to
130a287
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Not planning to merge this one before a long long time.
The will likely be released after v8 stable (we need Base UI to be stable).
Exploration of #14496 (comment)
Goals of the POC
enableAccessibleFieldDOMStructure
will help us simplify the typing and the logic of the fields.TypeScript
I'm exploring some improvements in this PR, they would be extracted to a standalone PR if we decide to apply them.
Move some basic pro interfaces in the community package (
DateRange
,RangePosition
andRangeFieldSection
to allow interfaces to inferTValue
andTSection
fromTDate
. A lot of our interfaces have tons of generics, which is a pain, it would simplify a lot of things if we could infer those:Not entirely sure how much it improves the logic. It feels good to remove the need for people to import
FieldSection
,RangeFieldSection
andDateRange
and instead rely on aTIsRange extends boolean
that they will easily understand how to use. I'll keep playing with this change, this is clearly something we could extract and apply v8 if we decide to.Questions
Package structures
@mui/x-date-pickers/base/PickersField
=> require to handle depth 2 imports@mui/x-date-pickers/PickersField
=> no way to know which components are using material and which one are not (unless we add a@mui/x-date-pickers/material
endpoint and everything outside of it is unstyled).@base-ui/x-date-pickers/PickersField