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] Fix time picker scrollbar width #16774

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Mar 1, 2025

This one feels like a quick win, so going after it.

You can compare the scrollbar width with:

SCR-20250301-qsdv SCR-20250301-qonl

Help with #9311

On the solution space, Ant Design uses a similar solution, but it's different:

SCR-20250301-qwpk SCR-20250301-qxcu

they also use scrollbar-width: thin but also:

  1. leave more width. It feels great because when we look at [pickers] 5. Time section scroll bar gets in front of section column #9311 (comment), it looks like someone who added a large zoom. So It feels like fixing [pickers] 5. Time section scroll bar gets in front of section column #9311 should also involve a change in this direction. One could argue that to full fix this, we need to have a custom scrollbar handling logic, like one we have on Base UI scroll area component or Material UI tabs component, but I don't know, this feel overkill, the pragmatic approach feels like to try those quick wins, and see if it's good enough. Adding more JS logic will slow the component, so could be a net worse overall.

  2. change the background color to white. Because of point 1 of [scroll area] Style hover + active state base-ui#1283 it makes using the scrollbar harder, but it creates more contrast, it's easier to see the scroll position.
    One could argue that, now, the scrollbar is too small, but honestly, it feels like that scrollbar is not meant to be used: it's more about indicating where the scroll is. If I'm a power user, I don't care, I use my mouse scroll wheel or my trackpad. If I'm a web user noob, I use the keyboard, input field, arrow. So what Ant Design did here isn't stupid, I would default to be lazy, not do changes, unless we feel it's a clear net win.

Preview: https://deploy-preview-16774--material-ui-x.netlify.app/x/react-date-pickers/time-picker/

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component. design This is about UI or UX design, please involve a designer labels Mar 1, 2025
@mui-bot
Copy link

mui-bot commented Mar 1, 2025

Deploy preview: https://deploy-preview-16774--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against dee2310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component. design This is about UI or UX design, please involve a designer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants