-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update TimePicker
component design
#64390
Comments
Possibly related: #60971 |
@christopherabalos absolutely, 100%! I think the first step here is to assess the accessibility of the From there it'll mostly be a case of applying the wp design language to the visuals, as @seifeldinio did above. It's worth keeping date range picking in mind as well (#60971 as pointed out above), with additional shortcuts for things like "Last week", "Month to date", etc. This will be useful for filtering data views (e.g. to show pages published in the last month). |
Might be stupid question, but what is stopping us from just using the native Even for the date range picker case, I find it likely that the easiest way to build that accessibly is to use two native |
@mirka I would push for using the platform for these things every day of the week, for those same reasons. Unless there's a very specific, very critical requirement or constraint to not do that, I feel like these days it's the best option in almost every aspect, at the cost of slightly less design freedom. |
I lean in that direction as well, and had the same thought about combining two native As Dani points out the main drawback is styling; making it blend seamlessly with the broader UI may not be possible. That is arguably an acceptable trade-off though; there are too many benefits to ignore. The mobile experience in particular is really slick... getting all of this for free, without having to worry about the ongoing maintenance feels like a huge win: |
@jameskoster glad to see some agreement! FWIW, there are some ways to still get the design closer to what we want, mainly:
Not sure if they apply to these specific input types though. I would assume they do or, at least, they will at some point. |
Thinking about this use case (filters for DataViews), for dates we'd want a mix of timepicker component + preset dates (today, last week, etc.). Is that a pattern that we'd use in more places than the DataViews filters? How do we see those two things working together (separate components, single one, etc.)? |
@oandregal in addition to the simple |
Extracted from #64267 (comment)
TimePicker
was originally designed with a fairly narrow scope; the date picking UI in the page inspector:In this context (popover) there is room enough for a more elaborate UI with multiple controls. However in a more traditional form setting this design is convoluted and overly prominent. Let's explore a more lightweight design, applicable either as a variant or a full redesign.
Inspiration can be taken from the
datetime-local
input type which condenses everything into a single text field with a built-in calendar/time selection popover:The text was updated successfully, but these errors were encountered: