elementary / calendar

Desktop calendar app designed for elementary OS
https://elementary.io
GNU General Public License v3.0
130 stars 39 forks source link

Deleting default calendar does not change default setting #726

Open mcclurgm opened 2 years ago

mcclurgm commented 2 years ago

What Happened?

Originally reported in #553.

It's possible to delete the current default calendar. We don't account for that deletion and keep a reference to the newly deleted calendar as the default setting. So the calendar lists still show it by default, and it's possible to complete editing an event with a deleted calendar as the current calendar that the event will be saved into. When you do save the event, Calendar will still close the editor dialog but is unable to save the event.

Steps to Reproduce

  1. Create a new calendar (local is sufficient) and mark it as default.
  2. Delete the newly created calendar.
  3. Create a new event.

You will now see that the currently selected calendar is the event you just deleted. This is already a symptom of the bug.

You may also save the event, and see that it silently fails to be created. You should also see the debug message I pasted above.

Expected Behavior

When deleting the default calendar, we should set a new default calendar out of the available ones (if there are any).

I'm not sure how to determine which calendar should be the new default. Any design guidance would be appreciated. (Paging @elementary/ux)

OS Version

6.x (Odin)

Software Version

Compiled from git

Log Output

When saving an event to the deleted calendar, it prints the following to the debug log. I assume this is the app capturing the error, but this is not propagated to the GUI:
`
** (io.elementary.calendar:22807): CRITICAL **: 17:57:55.197: EventStore.vala:155: No calendar was found, event not added
`

Hardware Info

Dell XPS 13 9370

mcclurgm commented 2 years ago

So a design question here is, how do we want to choose a new calendar in this case?

I can think of a few options:

We could also try to pick another calendar from the same account/group (if possible), using any of the above methods, rather than polling the entire set of calendars.

The only prior art that I know is Fantasical/iOS Calendar (not sure which is responsible), which silently picks a new calendar. It appears to be alphabetical, although of course I don't know for sure.

KaiTebay commented 2 years ago

Hi there - I'm new to contributing here but I noticed this issue because I experienced the same thing! I really like @mcclurgm's outline of options.

I'm of two minds regarding the UX:

  1. Discreet: Alphabetical default sounds like an streamlined option to me, particularly since it doesn't draw the user's attention unless they want to alter the default calendar. A consideration I had was whether it would be an expected behaviour, though. My intuition is that defaulting to Personal (local) from Evolution might seem more logical, but I take @mcclurgm's point about backend feasibility.

  2. Dialogue: I threw together a quick flow for what a dialogue might look like (note that the LoFi mock-ups don't conform to the HIG since it's mainly to illustrate the idea). Ideation - 2021 12 06 - Default Calendar Deletion

zeebok commented 1 year ago

Peaking at this bug, it is definitely still present. Seeing as Personal can't be deleted it is certainly the safest choice to change the default to.