nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
978 stars 240 forks source link

Automatically adjust slot durations and min/max start/end time based on usage #577

Open AlexandreBonneau opened 7 years ago

AlexandreBonneau commented 7 years ago

Whenever I upgrade nextcloud, I need to manually fiddle in the dist/fullcalendar.js file to modify the not-so-great default values.

Using the info from https://fullcalendar.io/docs/agenda/, I usually modify the start (minTime) and end (maxTime) time of the day (ie. 6:00 and 19:00), and the slotDuration to '00:15:00' instead of '00:30:00'.

In the source, I modify the info located here.

Would it be possible to have a simple GUI to do that?

Context: I use a 15 minutes slot duration because I have lots of appointments and those are set every 15 minutes.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/48623943-automatically-adjust-slot-durations-and-min-max-start-end-time-based-on-usage?utm_campaign=plugin&utm_content=tracker%2F45525646&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F45525646&utm_medium=issues&utm_source=github).
georgehrke commented 7 years ago

cc @jancborchardt about the defaults.

jancborchardt commented 7 years ago

The default of 30min is pretty standard. Introducing a setting for that would obscure more important settings.

Can you provide screenshots of how (if) other widely-used and well-designed software provides an option for that?

(Instead of a visible setting, one thing we could do is notice if there are a lot of <30min appointments, and adjust the default time accordingly.)

AlexandreBonneau commented 7 years ago

The 30 minutes duration is indeed standard when you use the calendar to setup meetings and the like. However, as soon as you use the calendar to set appointments (for instance appointments for a doctor or hospital office), then 15 minutes is mandatory (and I even know a few ophthalmologists who set appointments every 6 minutes!).

This is important for them, but the two other settings (minTime and maxTime) are used quite often too: you really do not need to clutter your view with non-office hours. 00:00 to 06:00 and 19:00 to 23:59 are usually never used in most offices, so why bother showing those (or even the scrollbar)?

About other calendars

Korganizer for instance allows to use ctrl + mousewheel to modify the size of the viewport, which allows to actually see the event titles. This does not change the slotDuration per se, since it already default to 15 minutes (see the blue rectangle on the screenshot ; this is the default when clicking on the view), but only zoom in/out.

Before: korganizer_ss1

After: korganizer_ss2

A real-life usecase: nextcloud_calendar

jancborchardt commented 7 years ago

Right, so by default the day or week view should be scrolled to 6 (or 8) anyway. @georgehrke?

Zooming should be possible using Ctrl +/- or mousewheel in the browser.

About slot duration, again we could check if it's modified a lot, and take the shorter (or longer) time as a new default.

AlexandreBonneau commented 7 years ago

Well, fullcalendar does have an option scrollTime (cf. the doc that determines how far down the scroll pane is initially scrolled down. But that misses the point : why scroll (and have a scroll bar) when you are sure you'll never set an appointment at 2am?

Zooming in the browser also zoom the sidebars, the header, the incidence editor and everything else ; that's not good enough in my opinion.

I still think that in the settings, there should be a simple form with a few <input> element to change the slotDuration,minTime and maxTime settings.

Pretty please ;)

jancborchardt commented 7 years ago

We won't introduce settings for everything like that ;) see this great blog post about it: http://ometer.com/preferences.html

As said, the slot duration could be automatically adjusted.

And about scrolling to the bottom:

why scroll (and have a scroll bar) when you are sure you'll never set an appointment at 2am?

Cause we are not only designing an interface specifically for the usecase you describe. :) Automatically scrolling to 6/8 or so and still leaving the possibility to scroll up is equally helpful while still being versatile.

AlexandreBonneau commented 7 years ago

I have the same concern about UI clutter and creating too many preferences options, but the reality is that currently the settings for the calendar are very, very scarce. Currently the modifiable options are:

  1. Use the simple editor
  2. Display week numbers

That's it. ('Import a calendar' and the caldav urls are not options per se (and should not be displayed here in my opinion, but that's another UX problem)).

So to me the number of preferences here is not the problem.

However, one could imagine that the slotDuration, scrollTime, minTime and maxTime are the core variables that affect the display of any calendar quite a lot. To that I would also add the option to choose if the first day of the week is Sunday or Monday, for easy access, and then you would get the very basic configurability needed for a generic calendar.

georgehrke commented 7 years ago

To that I would also add the option to choose if the first day of the week is Sunday or Monday,

right now thats determined based on your language but we are already working on adding a dedicated locale input to the personal settings page

jancborchardt commented 7 years ago

@georgehrke is there a current scrollTo value set? If not, can we put it to 6?

georgehrke commented 7 years ago

We currently don't set scrollTo, but that's also not necessary because full calendars default is 6 https://fullcalendar.io/docs/agenda/scrollTime/

georgehrke commented 6 years ago

To bring this issue back to life:

What about adapting this automatically depending on the user's events?

Like:

AlexandreBonneau commented 6 years ago

Well, that would need a lot more work to analyze the events (and when you have 600+ each week (think ophthalmologist 'basic' 6 min rendez-vous, so 10 rdv per hour, 10 hours a day, 6 days a week); I'm guessing the calculations could get pretty heavy).

Also, if you go with:

are there multiple hours where there are at least 4 (consecutive) events?

Then you would lose the coherence of a workplace where the hours are always the same, but it's entirely possible that in one particular week, all the events could start later; it would still be logical to set the same 'start hour', even for that particular week.

I still think the 4 to 5 options are not 'cluter', specially since they would be hidden by default and shown only when the user clicks on the settings button.

About @jancborchardt comment:

Automatically scrolling to 6/8 or so and still leaving the possibility to scroll up is equally helpful while still being versatile.

That could only work if there would be a way to directly define the height size of the hours (ie. 1 hours = 50px).

jancborchardt commented 6 years ago

As said above multiple times:

one thing we could do is notice if there are a lot of <30min appointments, and adjust the default time accordingly.

Let’s take small steps, and that’s probably the first one. ;) Simply remembering what was done last.

abate commented 6 years ago

Is this feature still on the pipeline ?

jancborchardt commented 6 years ago

@abate not that I know of, but:

:tada:

fernandoc2021 commented 5 years ago

screenshot at 2018-11-26 12-46-11 @AlexandreBonneau you mean something like this? This is under Open-xchange Calendar Settings

AlexandreBonneau commented 5 years ago

@fernandoc2021 if you are referring to the Interval in minutes, Start of working time and End of working time that could be related to the slotDuration, minTime and maxTime settings, yes, one way of displaying those would be using the combobox like there.

You'd need an additional one for the scrollTime settings too.

fernandoc2021 commented 5 years ago

Once set (Under Open-xchange) the scrollTime setting is assumed by default based on the Start and End of working time.

jancborchardt commented 5 years ago

Sorry, we are not going to introduce settings for every little thing as other open source / open core software does.

This makes everything unnecessarily complicated. Nextcloud is simple and should automatically adjust slot times like that to your recently used ones.

abate commented 5 years ago

I agree with the feeling of not creating interfaces that are too complicated. I'm participating to this discussion because the CEO of my company refuses to use nextcloud just because the calendar does not work exactly as on exchange (?!$#%). every little thing** ok, it's a bit too much, but at least the office hours settings ?

georgehrke commented 5 years ago

There are plans to implement business hours in order to make them available for Free/Busy planning. I would be fine with automatically hiding hours outside the business hours as long as there are no events in there.

slotDuration should automatically be set based on the number of events / their starting time / duration. No need for a setting.

AlexandreBonneau commented 5 years ago

I would be fine with automatically hiding hours outside the business hours as long as there are no events in there.

slotDuration should automatically be set based on the number of events / their starting time / duration. No need for a setting.

Does this means then that if you show only the 6h to 18h interval, then the slotDuration will automatically default to 15 minutes since you would have to display half the number of hours in a given day? If yes, great!

jancborchardt commented 5 years ago

the CEO of my company refuses to use nextcloud just because the calendar does not work exactly as on exchange

@abate does your company already have a Nextcloud enterprise subscription? In that case you could use the support channels offered so we can prioritize this.

georgehrke commented 5 years ago

Summary:

As a later step:

doitux commented 4 years ago

Is there a way to manually adjust slotDuration to '00:30:00' in the productive code of 2.0.1 in between?

georgehrke commented 4 years ago

@doitux Clone the source, adjust this line, run make and make appstore

doitux commented 4 years ago

@georgehrke Thanks for the fast reply.

When i run "make" i get this error:

Test Suites: 50 passed, 50 total
Tests:       163 passed, 163 total
Snapshots:   0 total
Time:        14.382s
Ran all test suites.
phpunit -c phpunit.xml
Could not read "phpunit.xml".
make: *** [Makefile:48: test-php] Fehler 1

Doing "make appstore" build the tarball without problems. Should i ignore the make error? What is the best way to install this tarbal in my productive system? Is there a way to upload and install? Or should i manually unpack and overwrite the apps/Calendar directory?

doitux commented 4 years ago

manually unpacking works fine ;-)

Malspherus commented 4 years ago

Seems you can also search for return"00:15:00" in apps/calendar/js/calendar.js and just change it there (if this is not recommended for some reason please let me know). Thank you for the link @georgehrke!

I have a slightly different reason for wanting to change this default, having slotDuration with one "line" for 15min is wasting a lot of screen-space on my laptop and forces me to scroll all the time. Zooming the whole page causes text to get unreadable before I can reach a proper event-size.

meaz commented 4 years ago

It would be nice to have it as an option.

alexanderdd commented 2 years ago

@tcitworld why was it removed from the milestone?

Slot durations can now be adjusted in settings, that's good, and it wasn't the case when this bug was opened.

But day/week view still starts at 6:00 am, no way to change that, no automatic adjustment. IMO this needs to improve.

tcitworld commented 2 years ago

We removed issues that aren't scheduled from milestones, otherwise it's just frustrating to see the issue being postponed for ever like above.

ChristophWurst commented 2 years ago

@alexanderdd fyi see https://github.com/nextcloud/groupware/blob/main/processes/milestones.md. I tried to formalize this a bit. As @tcitworld said as long as this is not planned we'd just move from one milestone to the next. Hence we unassigned the many tickets that had a milestone.