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] Remove openPickerIcon prop in favor of components.OpenPickerIcon #26223

Merged
merged 13 commits into from
Jun 7, 2021

Conversation

vedadeepta
Copy link
Contributor

@vedadeepta vedadeepta commented May 9, 2021

Breaking changes

  • [pickers] Uniformize customization, replace openPickerIcon prop with the components prop.
<DateTimePicker
  components={{
    LeftArrowIcon: AlarmIcon,
    RightArrowIcon: SnoozeIcon,
+   OpenPickerIcon: ClockIcon,
  }}
- openPickerIcon={<ClockIcon />}

Related to #21453 and #24511

@mui-pr-bot
Copy link

mui-pr-bot commented May 9, 2021

Details of bundle changes (experimental)

Generated by 🚫 dangerJS against b98a7d1

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label May 10, 2021
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label May 10, 2021
@vedadeepta vedadeepta changed the title [DatePicker, DesktopDatePicker]: add openPickerIcon key to components prop [DatePicker, DesktopDatePicker]: Add openPickerIcon option to components prop May 11, 2021
@oliviertassinari oliviertassinari changed the title [DatePicker, DesktopDatePicker]: Add openPickerIcon option to components prop [DatePicker] Add OpenPickerIcon key to components prop May 11, 2021
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

I think that we should drop the openPickerIcon prop too. It seems to be enough to have it inside the components prop

packages/material-ui-lab/src/DatePicker/DatePicker.tsx Outdated Show resolved Hide resolved
packages/material-ui-lab/src/DatePicker/DatePicker.tsx Outdated Show resolved Hide resolved
@oliviertassinari oliviertassinari requested a review from eps1lon May 11, 2021 17:12
@oliviertassinari oliviertassinari added the component: date picker This is the name of the generic UI component, not the React module! label May 11, 2021
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Let's discuss this customization approach first: #24511 (comment)

It doesn't seem like we need this customization option.

@vedadeepta
Copy link
Contributor Author

Thanks for the feedback, i will make the changes over the weekend.

@oliviertassinari oliviertassinari force-pushed the fix-components-openPickerIcon-DatePicker branch 3 times, most recently from 56448a2 to b03572a Compare May 23, 2021 18:49
@oliviertassinari oliviertassinari force-pushed the fix-components-openPickerIcon-DatePicker branch from b03572a to b98a7d1 Compare May 23, 2021 22:29
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

I have pushed the PR one step forward. The diff in the first custom date time picker example is interesting:

<DateTimePicker
  components={{
    LeftArrowIcon: AlarmIcon,
    RightArrowIcon: SnoozeIcon,
+   OpenPickerIcon: ClockIcon,
  }}
- openPickerIcon={<ClockIcon />}

This seems more predictable.

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

We don't need this prop: #24511 (comment)

@oliviertassinari oliviertassinari changed the title [DatePicker] Add OpenPickerIcon key to components prop [DatePicker] Extend components prop with OpenPickerIcon key May 24, 2021
@oliviertassinari oliviertassinari added component: pickers This is the name of the generic UI component, not the React module! and removed component: date picker This is the name of the generic UI component, not the React module! labels May 24, 2021
@oliviertassinari oliviertassinari changed the title [DatePicker] Extend components prop with OpenPickerIcon key [pickers] Uniformize customization, replace openPickerIcon prop with components May 24, 2021
@oliviertassinari oliviertassinari changed the title [pickers] Uniformize customization, replace openPickerIcon prop with components [pickers] Uniformize customization, replace openPickerIcon prop May 24, 2021
@oliviertassinari
Copy link
Member

oliviertassinari commented May 24, 2021

@eps1lon Ok, fair enough, I have changed the lens/framing, isolating the issues and their solutions.

@oliviertassinari oliviertassinari requested a review from eps1lon May 31, 2021 22:20
@eps1lon eps1lon removed their request for review June 1, 2021 06:04
@oliviertassinari oliviertassinari dismissed eps1lon’s stale review June 5, 2021 19:11

We are no focusing on a differnt problem, previous review was focused on #24511

@eps1lon eps1lon added the new feature New feature or request label Jun 7, 2021
@eps1lon eps1lon changed the title [pickers] Uniformize customization, replace openPickerIcon prop [pickers] Remove openPickerIcon prop in favor of components.OpenPickerIcon Jun 7, 2021
@eps1lon eps1lon merged commit 0584d02 into mui:next Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: pickers This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants