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

[RFC] Rework Day, Year components #1943

Closed
oliviertassinari opened this issue Jun 28, 2020 · 2 comments
Closed

[RFC] Rework Day, Year components #1943

oliviertassinari opened this issue Jun 28, 2020 · 2 comments
Milestone

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 28, 2020

The material design specification has recently introduced a new guideline around how states should be handled: https://material.io/design/interaction/states.html. We have been iterating on the Pagination and TreeView component around this specification. This involves mui/material-ui#5186 and mui/material-ui#10870.

In our case, I would propose that we apply it to the Day and Year components at least, and maybe the Month component too (why is the style different?). It's also an opportunity to improve on #1674:

  • Apply the exact state style approach as TreeView and Pagination.
  • Give up on ButtonBase, it's too slow for displaying 100 days (date range with 3 months)
  • Have one DOM node, no more.

The day we decide to prioritize this breaking change, we might as well solve #1680, #1845, #1285, and #1648 not too later after to minimize context switching cost.

@dmtrKovalenko
Copy link
Member

What's wrong with <Day /> and <Year /> components? It follows https://material.io/components/pickers#specs, isn't it?

@oliviertassinari
Copy link
Member Author

@dmtrKovalenko You can find the answer to this question in the links that are in the description of the issue :). The immediate concern of this issue is about using the same CSS output structure for hover, focus, and the theme value used. Examples I can notice in the deviation:

  • Use '@media (hover: none)': { to avoid sticky focused style on touch (mobile)
  • Use focusVisible to avoid the focused style when only clicking.
  • Remove willChange: 'background-color',, this CSS property is meant for being set right before (a few ms) the change will happen.
  • background required here to prevent collides with the other days when animating with transition group it doesn't seem to be true anymore, I can't reproduce the problem without.

@oliviertassinari oliviertassinari added this to the v5 milestone Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants