calendar icon indicating copy to clipboard operation
calendar copied to clipboard

Improve Date/Time selector to be more intuitive.

Open SebastianKrupinski opened this issue 1 year ago • 20 comments

One of the recommendations during the brain storming sessions was the improvement of the time selector. This was one of the top requested items.

Currently, Clicking the Date/Time selector always brings up the time picker if the event is not all day. The time picking part of the selector is also ticky to understand.

image

Possible Improvements,

  1. Leaving the current selection box as is but showing a different drop down depending on if the user clicks the date or time.

  2. Splitting the Date and Time selector in to two parts like the tasks app dose.

image

  1. Also improving the look of the date/time selector to be more understandable. Maybe something like the material design date and time pickers.

image

image

SebastianKrupinski avatar Oct 01 '24 19:10 SebastianKrupinski

This might actually be a duplicate of https://github.com/nextcloud/calendar/issues/6324

ChristophWurst avatar Oct 02 '24 14:10 ChristophWurst

There is also https://github.com/nextcloud/calendar/issues/4626

Before we spend too much time on redesigning the current picker we should re-evaluate if it can actually be made accessible. The last time we checked it was not. Many apps and components switched to a native time picker. We might want to do the same for Calendar.

ChristophWurst avatar Oct 02 '24 14:10 ChristophWurst

The native date/time picker is an option but there are some down side, they can't really be styled and the styling varies between browsers, and the native time pickers are horrible.

You can test them on here... https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local

There are some options for javascript based accessible date/time picker.

https://www.digitala11y.com/accessible-date-pickers-roundup/

The Duet Date picker seems to be a good alternative.

Accessibility guide lines.

https://axesslab.com/accessible-datepickers/ https://whatsock.com/

SebastianKrupinski avatar Oct 02 '24 22:10 SebastianKrupinski

See https://github.com/nextcloud-libraries/nextcloud-vue/issues/1666 as well. We evaluated some pickers in the past.

ChristophWurst avatar Oct 03 '24 05:10 ChristophWurst

My proposal is using PrimeVue's components https://primevue.org/datepicker/#time. There is support for time and date, but not timezone, unfortunately. It's also under the MIT license. My only doubt would be the accessibility as I don't really know how to test for that.

GVodyanov avatar Oct 03 '24 15:10 GVodyanov

@GVodyanov that is a great find, they're stylish and very functional, even has keyboard support. It also supports accessibility according to the link you posted (bottom of the page).

You can test it with a screen reader program. There is a short list here...

https://usabilitygeek.com/10-free-screen-reader-blind-visually-impaired-users/

SebastianKrupinski avatar Oct 03 '24 15:10 SebastianKrupinski

@GVodyanov that is a great find, they're stylish and very functional, even has keyboard support. It also supports accessibility according to the link you posted (bottom of the page).

You can test it with a screen reader program. There is a short list here...

https://usabilitygeek.com/10-free-screen-reader-blind-visually-impaired-users/

Just tested it with Pericles screen reader, and it seems to be able to read everything properly. Not sure what being fully accessible means, though: for instance, it didn't tell me about the arrows I could use to change month.

GVodyanov avatar Oct 04 '24 18:10 GVodyanov

Just tested it with Pericles screen reader, and it seems to be able to read everything properly. Not sure what being fully accessible means, though: for instance, it didn't tell me about the arrows I could use to change month.

From what I have read, I don't think there is a defined standard of what full accessible means, its more just guidelines of best practices. Found a guide that has a summary.

https://blog.hubspot.com/website/web-accessibility-guidelines?hubs_content=blog.hubspot.com/website/web-accessibility&hubs_content-cta=complete%20web%20accessibility%20checklist

Most of the points in the guide are best practices in general. The ones that really apply to accessibility I think are,

    1. Provide alternatives for non-text content. (use text instead of images when possible for visual impaired)
    1. Provide different options for viewing media content.
    1. Make content easy to hear and see. (high contrast color schemes for color blindness)
    1. Make all functions keyboard accessible. (for visual and motor impaired)
    1. Allow users to adjust timing. (for cognitive and motor impaired)
    1. Accommodate various input options. (for visual and motor impaired)

SebastianKrupinski avatar Oct 04 '24 21:10 SebastianKrupinski

Thanks a lot for your research @SebastianKrupinski!

@nimishavijay What is your reckoning about the PrimeVue component? Do you approve and if so, how much would you like to redesign it?

GVodyanov avatar Oct 07 '24 15:10 GVodyanov

Nice! The PrimeVue component visually looks super slick. My main concern is the lack of an option to view a bunch of times at once (to change by even 5 mins you have to click 5 times. To change by half an hour you have to click a LOT). Here's a short competitor review of what the time pickers in the most popular calendar apps + UI kits look like:

GCal, Outlook, Proton calendar, iOS, Calendly, MUI, and Ant Design

Google Calendar

Image

Outlook calendar

Image

Proton Calendar

Image

iOS: Couldn't get a screenshot in this computer but it's basically only possible to type your time in, there is no visual selector

Calendly

Image

MUI

Image

Ant Design

Image

So it seems like the industry standard for picking times in a calendar is just a simple list of times rising incrementally, with some smart defaults (if you select a time directly show ± 4 hours of that time, if you select a day, show ± 4 hours of the current time, etc). So for NC that would mean an action menu with some times. That would look a bit like this: Image

Another option is to stick with the current time picker (it shows up in MUI and Ant Design, so definitely a UI pattern) and make some improvements:

  • [ ] get rid of the "Pick a date" and the date button on top
  • [ ] Show the selected time at the bottom left on the same row as the "OK" button
  • [ ] "OK" --> "Done" or "Save"
  • [ ] Reduce the width of each column
  • [ ] Use regular font size
  • [ ] Use rounded corners and a light bg for the selected times
  • [ ] Use a shadow

Those changes would look something like this: Image

Regardless of which approach is taken for the time picker itself, it makes sense to also make some changes in the event popup

  • [ ] > Splitting the Date and Time selector in to two parts like the tasks app dose: This is great! Also seems like the best idea also for accessibility
  • [ ] Show the time zone picker separately and show only one time zone picker

Something like this:

Image

IMHO I like the second approach (tweaking what we have rn) better even though most calendar apps have list of times (if anything). Many of the complaints about the unintuitive time picker were about the date on top and the lack of a direct entry point into the time picker, so we can try and mitigate those problems. What are your thoughts? @GVodyanov @SebastianKrupinski @ChristophWurst (and @Hyeyoung346 @marcoambrosini )

nimishavijay avatar Oct 08 '24 08:10 nimishavijay

@nimishavijay @ChristophWurst @marcoambrosini

So we just had a chat about this at the groupware meeting:

  • The first most important thing IMO is that the current component being used for NcDateTimePicker is based on a third party component which isn't compatible with Vue 3, and therefore will eventually have to be replaced, so keeping the current implementation isn't really an option
  • Another issue with the old component is the accessibility, however, this isn't super critical seeing as users always have the option to just type in the time and date, and well the rest of the calendar app isn't that accessible anyway.
  • We need to have a timezone picker for both the start and end times, as per the RFC. What the best way to implement this without confusing the user too much is a bit of an issue. We thought of adding the little globe to the side of both of the time pickers (so have a third column), but that's up to you design guys.
  • Dividing time and date is something everyone is super on board with

GVodyanov avatar Oct 08 '24 15:10 GVodyanov

@nimishavijay Forgot to mention that yeah, I guess the PrimeVue component not having the list of times is pretty bad, so that excludes it at least for time picking, but if we are going to be separating the two components for time and date anyway, maybe we could use PrimeVue for the date and something else for the time?

GVodyanov avatar Oct 08 '24 15:10 GVodyanov

Ah thanks for the clarification.

maybe we could use PrimeVue for the date and something else for the time? Do you approve and if so, how much would you like to redesign it?

The date part of the PrimeVue component looks pretty sweet. Just wanted to confirm that it is possible to show a pre configured date with PrimeVue, right? I didn't see it in any of the examples, all of them were empty date fields, while in a calendar the date field should be prefilled with the date you clicked on to create the event.

As for visual design, there's https://github.com/nextcloud/calendar/issues/6324 anyway so trying to get as close as possible to that should work. Structurally it's pretty much the same, it's sizes and colors that are different. We could do a design review at the end to iron out any kinks.

Another issue with the old component is the accessibility, however, this isn't super critical seeing as users always have the option to just type in the time and date, and well the rest of the calendar app isn't that accessible anyway.

That's fair. I noticed that for Google and Outlook the expected way for people to enter the time regardless is by keyboard. When you click on the date field the entire text gets selected and a menu opens up with a list of times. Does that sound like something we could do? Otherwise there could be an icon on the side, and clicking on that would open the list of times while clicking on the time in the field would let you type the time.

Ref google for interaction.

https://github.com/user-attachments/assets/ff6c6c1d-a015-4821-b76b-88274c24fc17

We need to have a timezone picker for both the start and end times, as per the RFC. What the best way to implement this without confusing the user too much is a bit of an issue. We thought of adding the little globe to the side of both of the time pickers (so have a third column), but that's up to you design guys.

Oh I see, alright. I would vote for more visibility of which time zone is selected up front (for example, for people who travel frequently). so we could show it at the bottom and make it an extra step to edit the time zones.

Nice-to-have: the first time someone edits a time zone, the change is reflected across both the input fields (because it most likely that you want to change the timezone for both the start and end time)

Altogether it would look like:

https://github.com/user-attachments/assets/b8b3f1ae-fa9b-463d-a690-369068c7bfb4

What do you think? :)

nimishavijay avatar Oct 09 '24 00:10 nimishavijay

@nimishavijay It think that looks good and should be easy to make accessible also.

SebastianKrupinski avatar Oct 09 '24 13:10 SebastianKrupinski

@nimishavijay That looks amazing! Thanks a lot for your help :)

GVodyanov avatar Oct 10 '24 14:10 GVodyanov

Hi @nimishavijay, wouldn't be enough to have only one timezone dropdown? Maybe it could stay on a new line without making the dialog wider?

marcoambrosini avatar Oct 11 '24 07:10 marcoambrosini

@marcoambrosini that was my initial idea as well, but as @GVodyanov said

We need to have a timezone picker for both the start and end times, as per the RFC. What the best way to implement this without confusing the user too much is a bit of an issue.

Any ideas from your side for setting 2 separate time zones for start and end? Gcal has a whole modal for setting the time zone (bit of an overkill IMO), and Outlook and Protonmail do it similar to the mockups.

nimishavijay avatar Oct 11 '24 23:10 nimishavijay

Just tested it with Pericles screen reader, and it seems to be able to read everything properly. Not sure what being fully accessible means, though: for instance, it didn't tell me about the arrows I could use to change month.

From what I have read, I don't think there is a defined standard of what full accessible means, its more just guidelines of best practices. Found a guide that has a summary.

Nextcloud is following the German BITV standard v2.0: https://docs.nextcloud.com/server/latest/user_manual/en/universal_access.html#universal-access. Julia or Grigorii are candidates who could help you test what is considered accessible for this standard.

Another issue with the old component is the accessibility, however, this isn't super critical seeing as users always have the option to just type in the time and date, and well the rest of the calendar app isn't that accessible anyway.

If we are changing the time picker then we should definitely make sure it's accessible. Accessibility is not optional. The Calendar app will very likely have to be fully accessible at some point.

ChristophWurst avatar Oct 15 '24 06:10 ChristophWurst

Please make sure to read https://github.com/nextcloud-libraries/nextcloud-vue/issues/1666 and the earlier findings to avoid double research/work.

ChristophWurst avatar Oct 15 '24 06:10 ChristophWurst

I talked with @jancborchardt about this and we think it's best to go with https://github.com/nextcloud/calendar/issues/4626 for now. The acceptable tradeoff is that Firefox does not have a time picker. Other browsers have one and this is a fully accessible solution.

ChristophWurst avatar Oct 17 '24 08:10 ChristophWurst

What we can do in addition to what @ChristophWurst said is if we detect Firefox as browser, provide an accessible time picker so people have the ability to pick time on Firefox with mouse only as well.

This would however be a 2nd step, and the timepicker has to be fully accessible in this case as well.

jancborchardt avatar Oct 23 '24 14:10 jancborchardt

On the Firefox side, the bug about a time picker is tracked as https://bugzilla.mozilla.org/show_bug.cgi?id=1811581 and/or https://bugzilla.mozilla.org/show_bug.cgi?id=451832

So I would say we indeed just accept the tradeoff that Firefox does not have a visual time picker. The keyboard-only input is accessible at least, and then hopefully they will soon activate the visual timepicker.

And as written in the issue, they actually have a timepicker interface, but it unfortunately is hidden behind the about:config switch dom.forms.datetime.timepicker. If set to true, you see the picker, e.g. on https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time Image

jancborchardt avatar Oct 23 '24 14:10 jancborchardt

I suggest to let edit the date or pick another date just by clicking the date itself, but not a special button to pick the date. Image

oleua avatar Oct 30 '24 17:10 oleua

I suggest to let edit the date or pick another date just by clicking the date itself, but not a special button to pick the date. Image

@ostasevych Yep, we are aware that this isn't great too. We won't have a picker like that when this gets done.

GVodyanov avatar Nov 04 '24 14:11 GVodyanov