-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[DatePicker] Migrate YearPicker to emotion #25928
Conversation
docs/pages/api-docs/year-picker.json
Outdated
@@ -4,12 +4,12 @@ | |||
"shouldDisableYear": { "type": { "name": "func" } } | |||
}, | |||
"name": "YearPicker", | |||
"styles": { "classes": ["root"], "globalClasses": {}, "name": "MuiYearPicker" }, | |||
"styles": { "classes": [], "globalClasses": {}, "name": null }, |
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.
Not sure how to bring the "root" and "name" back 🤔 @oliviertassinari @mnajdova
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.
@material-ui/lab: parsed: +0.09% , gzip: +0.09% |
'componentsProp', | ||
'propsSpread', | ||
'reactTestRenderer', | ||
'themeDefaultProps', |
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.
I need to skip themeDetaultProps because the current implementation does not receive "other" props. I tried to add "other" props to YearPickerRoot
like in other component but then receive picker-related props that leak to DOM (ex, mask, inputFormat, ...) in demos
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.
Looks like propsSpread
is also skipped so it makes sense. Maybe we could introduce testDefaultProps
option where we can specify some prop that exists in the API with specific value and test for it, for example minDate
in this case.
437ae51
to
2058f10
Compare
@@ -14,7 +14,7 @@ import { | |||
import TimelineContext from './TimelineContext'; | |||
import { getTimelineUtilityClass } from './timelineClasses'; | |||
|
|||
export type TimelineClassKey = 'root' | 'alignLeft' | 'alignRight' | 'alignAlternate'; |
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.
Please extract this to a separate PR
'componentsProp', | ||
'propsSpread', | ||
'reactTestRenderer', | ||
'themeDefaultProps', |
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.
Looks like propsSpread
is also skipped so it makes sense. Maybe we could introduce testDefaultProps
option where we can specify some prop that exists in the API with specific value and test for it, for example minDate
in this case.
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.
Looks good, we could probably add testDefaultProps
option where we can specify some prop that exists in the API with a specific value and test for it, for example, minDate in this case, but to be honest, not sure if it is worthed.
One of #24405