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

[DatePicker] Migrate YearPicker to emotion #25928

Merged
merged 8 commits into from
Apr 28, 2021

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Apr 24, 2021

One of #24405

@@ -4,12 +4,12 @@
"shouldDisableYear": { "type": { "name": "func" } }
},
"name": "YearPicker",
"styles": { "classes": ["root"], "globalClasses": {}, "name": "MuiYearPicker" },
"styles": { "classes": [], "globalClasses": {}, "name": null },
Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

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

I have fixed this in 2058f10. @eps1lon is working on reversing the approach in #25754

@mui-pr-bot
Copy link

mui-pr-bot commented Apr 24, 2021

Details of bundle changes

@material-ui/lab: parsed: +0.09% , gzip: +0.09%

Generated by 🚫 dangerJS against 8ba37a8

'componentsProp',
'propsSpread',
'reactTestRenderer',
'themeDefaultProps',
Copy link
Member Author

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

Copy link
Member

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.

@oliviertassinari oliviertassinari added the component: date picker This is the name of the generic UI component, not the React module! label Apr 25, 2021
@@ -14,7 +14,7 @@ import {
import TimelineContext from './TimelineContext';
import { getTimelineUtilityClass } from './timelineClasses';

export type TimelineClassKey = 'root' | 'alignLeft' | 'alignRight' | 'alignAlternate';
Copy link
Member

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',
Copy link
Member

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.

Copy link
Member

@mnajdova mnajdova left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: date picker This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants