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

Empty "todo list" calendars shown too presently #904

Closed
benyanke opened this issue Sep 10, 2018 · 26 comments
Closed

Empty "todo list" calendars shown too presently #904

benyanke opened this issue Sep 10, 2018 · 26 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature request
Milestone

Comments

@benyanke
Copy link

benyanke commented Sep 10, 2018

It would be awesome to be able to hide calendars from view in the sidebar.

A significant portion of my calendars exist only to house named todo lists, and in my usecase, make no sense to show next to the calendar.

It would be nice to be able to move some of the calendars into a collapsed section which would effectively "hide" them.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@georgehrke
Copy link
Member

It would be awesome to be able to hide calendars from view in the sidebar.

Are you asking for a way to hide the sidebar altogether or just the calendars inside the sidebar?

@benyanke
Copy link
Author

benyanke commented Oct 8, 2018

Hide specific items in the sidebar. I realize this is a bit of a hack with the way caldav works, but I end up with many calendars due to lists being shared.

For example: I have my personal todo on my main calendar, but I also have another calendar I created solely for the todo list called ShoppingList which I share with my wife. This - of course, makes no sense to show in the sidebar of the calendar app.

I know I can't be the only one using it this way.

@georgehrke
Copy link
Member

@benyanke In that case I would vote against implementing this feature.
Calendars have certain component types. You can configure, whether they can store events, todos and journals.

The current default (in the calendar app) is events and todos: https://github.com/nextcloud/calendar/blob/master/js/app/service/calendarService.js#L289

We should probably change this, so that calendars created in the calendar app can only store events, and calendars created in the tasks app can only store todos. (cc @jancborchardt @tcitworld @raimund-schluessler @skjnldsv)

If the component type of a calendar does not contain events, it also won't show up in the left sidebar.

(If you want to change the component type of a calendar after creating it, you will have to edit the components column in the oc_calendars table of the calendar in question. Please be aware that changing the component type is not allowed per specification, so it might result in unexpected behavior in certain clients. There will be no unexpected behavior in the Nextcloud calendar / tasks app though)

@benyanke
Copy link
Author

benyanke commented Oct 8, 2018

We should probably change this, so that calendars created in the calendar app can only store events, and calendars created in the tasks app can only store todos.

Perhaps it would be ideal to make it more configurable, and simply ask the user on calendar creation?

Something like:

"This calendar can store:
[ ] Events
[ ] Tasks
[ ] Notes
"

I agree it would better to solve the root cause here (which I didn't know CalDAV supported in this way!).

@tcitworld
Copy link
Member

We should probably change this, so that calendars created in the calendar app can only store events, and calendars created in the tasks app can only store todos

Hmm, so there wouldn't be any way to create a calendar which can also save todos from Nextcloud then ? And since the specification doesn't allow you to change the component allowed types, it also won't be changeable through 3rd party clients. So... I guess 👎 .

Allowing to choose at creation will result in friction for something 99% of users don't need to pick.

My opinion - based on my own usage of both Calendar & Tasks apps - would be that calendars created in the task app would only allow todos, and calendars created from the calendar app would allow both. The Calendar app wouldn't show calendars which support only todos.

@benyanke
Copy link
Author

benyanke commented Oct 8, 2018

My opinion - based on my own usage of both Calendar & Tasks apps - would be that calendars created in the task app would only allow todos, and calendars created from the calendar app would allow both. The Calendar app wouldn't show calendars which support only todos.

Why not just allow the user to select which they want on calendar creation?

@tcitworld
Copy link
Member

Allowing to choose at creation will result in friction for something 99% of users don't need to pick.

@benyanke
Copy link
Author

benyanke commented Oct 8, 2018

Not if it's hidden by default under 'more options' or something, with sane defaults. Especially since many users of nextcloud (more than other tools) lean harder down the power-user spectrum.

@jancborchardt
Copy link
Member

How about just having a section for "Show all calendars" which includes calendars without any events in it?

We do this similarly in the mail app, where only the important folders are listed directly, and the others are behind a "Show all folders" toggle:
nextcloud mail show all folders

@tcitworld
Copy link
Member

calendars without any events in it?

It will be more like "without any events currently shown" (in the current event cache), since we don't want load all events.

@georgehrke
Copy link
Member

@jancborchardt @tcitworld Since we are already talking about the calendar list, not showing all calendars by default, etc...

Right now we have two lists. The Calendar list, which contains all writeable calendars, both my own and calendars shared with me, and the subscription list, which contains all read-only calendars.

Lately i have noticed that we are the only calendar application doing it like this.

  1. iCloud / macOS calendar simply has one list of calendars. It doesn't distinguish whether they are your own or not nor whether they are writable or not.
  2. Google Calendar has two lists. "My calendars" and "Other calendars". "My calendars" includes all my own calendars, both writeable and readable like the birthday calendar. "Other calendars" includes all shared ones and system calendars like public holidays. Both lists can be collapsed and extended individually.
  3. Outlook does it like Google

Additionally Google Calendar offers a "Display this only" on every calendar, which is especially useful when having many calendars shared with you.

kapture 2018-12-04 at 20 23 13

Should we reconsider our "Calendar list" / "Subscription list" model and replace it with "My calendars" / "Other calendars"?

@jancborchardt
Copy link
Member

I would say we should do it like iCloud / macOS, simply having one list of calendars. Ones which are not your own or have no events could be hidden behind the "Show all calendars" toggle I mentioned we have in Mail.

@georgehrke
Copy link
Member

@jancborchardt I think that would conflict with #9. If you have your own calendars and calendars shared with you mixed in one list, clicking "Show all calendars" might not only expand the list on the bottom but also add shared calendars in between your own calendars.

Also I'm not sure you can really compare Mail and Calendar in this case. With mail, it's obvious that "Inbox", "Favourites" and "Sent" are the most important. With calendar, there might be a group calendar that's used by everyone.

@jancborchardt
Copy link
Member

@georgehrke ok, I’m also fine with what you proposed – you have the better overview here. :)

@georgehrke
Copy link
Member

georgehrke commented Dec 4, 2018

Talking about #9, one option could be to have one list, make it completely sortable, only show the top 10 and hide everything else behind "Show all calendars"

@jancborchardt
Copy link
Member

And default sorting simply by most recent activity. (Although if activity inside of the same day, their sorting should be alphabetic to not move around so much.) That way the most relevant calendars are simply always there.

@georgehrke
Copy link
Member

Current solution:

@georgehrke georgehrke changed the title Feature: Hide Calendars from Sidebar Restrict number of calendars in sidebar Sep 13, 2019
@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of enhancement New feature request and removed enhancement-proposed needs info labels Sep 13, 2019
@georgehrke georgehrke added this to the 2.2.0 milestone Sep 13, 2019
@jancborchardt
Copy link
Member

Somehow this seems to create more problems than there were before.

  • Why limit the calendar list? It’s a scrolling list and it’s fine to have a bunch of entries in there.
  • Why make it sortable? If it’s intelligently sorted, e.g. by most used (most events?) then the relevant stuff is always there.
  • The calendars with no events would then be at the bottom automatically. Ta-da, problem solved. ;)

@tcitworld
Copy link
Member

tcitworld commented Sep 14, 2019

Why make it sortable? If it’s intelligently sorted, e.g. by most used (most events?) then the relevant stuff is always there.
The calendars with no events would then be at the bottom automatically. Ta-da, problem solved. ;)

Unfortunately we don't fetch all the events for a calendar, just those appropriate for the current view, therefore if we wanted to calculate which calendar has the most events for the current view it would probably be different at each view change.

I though LAST-MODIFIED on calendar objects from RFC7986 might have helped us but it only

specifies the date and time that the information associated with the calendar was last revised

not the date of latest events added to it, which would be a poor criteria to sort calendars anyway.

Anyway, so there's currently no way to sort calendars intelligently.

@georgehrke
Copy link
Member

I can only second what @tcitworld said. We don't (and we really really don't want to) fetch all events of a calendar.

macOS calendar / iCloud allows sorting.
Google puts your default calendar on top and sorts all the other calendars alphabetically.

@jancborchardt jancborchardt changed the title Restrict number of calendars in sidebar Empty "todo list" calendars shown too presently Sep 16, 2019
@jancborchardt
Copy link
Member

Adjusted the title of the issue to reflect the problem instead of a proposal. :)

@benyanke
Copy link
Author

benyanke commented Jan 30, 2020

To add more info to this, if you create a calendar from within the TODO app, it creates a "calendar" which only stores VTODO objects, not VEVENT. This can be found in the oc_calendars table in the components field (transparent also seems to play into this?).

However, this is one case, and at create time.

I'd like to be able to, at any time, change the settings on a given calendar to implement VEVENT, VTODO, or both. Toggling on and off the capability. Toggling off would, I assume, lose the data, but you wouldn't turn it off unless you didn't want the data, so this would be doable with a warning.

If this was implemented, it would then properly hide from the correct places.

@benyanke
Copy link
Author

benyanke commented Jan 30, 2020

Note: I believe this can already be accomplished with SQL, for those finding this in google and wanting a solution now:

; find your calendar IDs in  oc_calendars, put in the () list

; CHANGE TO TODO ONLY

update oc_calendars set components="VTODO",transparent="1" where id in (12,13,14);
delete from oc_calendarobjects where componenttype='VEVENT' and calendarid in (12,13,14);


; CHANGE TO EVENT ONLY


update oc_calendars set components="VEVENT",transparent="0" where id in (12,13,14);
delete from oc_calendarobjects where componenttype='VTODO' and calendarid in (12,13,14);

This will properly update each's properties. Event only calendars will not appear in TODO lists, and todo only calendars won't show up in calendar listings.

Perhaps someone could add this feature and wrap up these simple SQL queries in a frontend which would allow the user to update the calendar properties?

@raimund-schluessler
Copy link
Member

I'd like to be able to, at any time, change the settings on a given calendar to implement VEVENT, VTODO, or both. Toggling on and off the capability.

Changing the calendar components after the creation of a calendar is not allowed by the iCalendar specification, so this won't be implemented by the Calendar or Tasks apps. Please use the above code at your own risk.

@ChristophWurst ChristophWurst modified the milestones: 2.2.0, 2.3.0 Mar 24, 2021
@ChristophWurst ChristophWurst modified the milestones: v2.3.0, v2.4.0 Jun 24, 2021
@alexanderdd
Copy link

Isn't this fixed already? In calendar 2.3.1 in the settings at the bottom left I can toggle "show tasks" (German "Aufgaben im Kalender anzeigen"), which seems to accomplish what this issue is about.

@devvythelopper
Copy link

Isn't this fixed already? In calendar 2.3.1 in the settings at the bottom left I can toggle "show tasks" (German "Aufgaben im Kalender anzeigen"), which seems to accomplish what this issue is about.

It would be nice if this was the default (tasks not shown in the calendar view) and you'd have to go to settings to show them anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature request
Projects
None yet
Development

No branches or pull requests

8 participants