Skip to content

[DatePicker] Migrate YearPicker to emotion#25928

Merged
mnajdova merged 8 commits intomui:nextfrom
siriwatknp:year-picker-emotion
Apr 28, 2021
Merged

[DatePicker] Migrate YearPicker to emotion#25928
mnajdova merged 8 commits intomui:nextfrom
siriwatknp:year-picker-emotion

Conversation

@siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Apr 24, 2021

One of #24405

},
"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

@siriwatknp siriwatknp Apr 24, 2021

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: DatePicker The React component. label Apr 25, 2021
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: DatePicker The React component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants