-
Notifications
You must be signed in to change notification settings - Fork 240
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
Fix calendar lists not being orderable any more #6536
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Grigory V <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6536 +/- ##
============================================
- Coverage 23.33% 23.21% -0.12%
Complexity 453 453
============================================
Files 248 249 +1
Lines 11777 11835 +58
Branches 2257 2268 +11
============================================
Hits 2748 2748
- Misses 8705 8763 +58
Partials 324 324
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Grigory Vodyanov <[email protected]>
I'd say ignore hidden calendars for ordering. Just sort them alphabetically all the time. For own vs shared calendars vs deck I'd find it OK to split the drag area into three, because you can't drag from owned calendars to shared etc.
That's a bonus, but I'd support that for feature discoverability 👍 |
@ChristophWurst The issue with ignoring hidden calendars is that even though they are hidden, they still make up the "order" of the calendars. So if you have:
With the order [1, 2, 3, 4] The draggable list would show:
Now imagine you move Calendar ID 4 to the second position, resulting in:
The order could either be [1, 2, 4, 3] or [1, 4, 2, 3] seeing as the hidden calendar, even if not displayed in the UI, still is part of the list. This causes draggable to give weird results. There are a few ways that come to mind to solve this: show the hidden calendars when dragging (jarring because they appear out of nowhere), append hidden calendars to the end (messing up the order when u want to hide a calendar), etc. The modal is also one. |
This :) See hidden list as extension of the visible calendars list. In your example, the order will be [ 1 4 3 2 ]. When you unhide the calendar it will be at the bottom of the visible calendars, which seems acceptable to me. |
Fix #6501
So the problem with this bug is that the way that dragging the calendars previously worked is conceptually incompatible with the division of calendars into different sections, mostly because of the hidden calendars. The hidden calendars being part of the order, but being in a different place from all the others, causes the order coming from
vue-draggable
to be wrong. Another issue discussed with Christoph is the drag to reorder feature is pretty hard to discover.Here are a few things I thought about:
In the end to make this happen I thought of adding a button which opens a modal with the three sections: personal, shared, and deck, and WITHOUT the hidden calendars section.