Bug 435667 - Overlapping of events produces gaps in month view
Summary: Overlapping of events produces gaps in month view
Alias: None
Product: korganizer
Classification: Applications
Component: monthview (show other bugs)
Version: 5.15.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
Depends on:
Reported: 2021-04-12 16:59 UTC by pietz
Modified: 2021-09-10 01:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:

Bad gaps between events (105.00 KB, image/png)
2021-04-12 16:59 UTC, pietz
Screenshot (30.81 KB, image/png)
2021-06-22 11:14 UTC, Riccardo Robecchi

Note You need to log in before you can comment on or make changes to this bug.
Description pietz 2021-04-12 16:59:18 UTC
Created attachment 137539 [details]
Bad gaps between events

When you have many events continuing over days the position of all events stays the same in each cell. Sounds complicated but therefore I attached an image which shows up the problem.

The one gap in the picture is not the "real" problem itself. But when you have MANY of those events continuing over days: It happens that you can NEVER see (and edit!) those events because they are beyond the cell of the day (position 7 or higher). The reason is because there is some order of events somewhere in the future (or past) which causes the current view to produce unnecessary gaps.

Also the normal arrow to scroll up/down in a day is completely missing in some constellations because there is no (visible) event on that day!

Do you understand the problem well? It is not so easy to write :-)
Comment 1 gjditchfield 2021-04-12 22:10:12 UTC
Yes, I understand your explanation.  The image makes it quite clear.
Comment 2 Riccardo Robecchi 2021-06-22 09:59:12 UTC
I think the issue is that the events spanning multiple days are not placed on top as they were in previous versions of KOrganizer, but they are placed at a random time during the day, thus creating the gaps.
This is also an issue with events that end after midnight. In that case the event is not placed in chronological order anymore.
In my opinion, the way to fix these issues is:
- multiple-days events: make them the top of the list, so that it is clear from the start that they are there, they don't create gaps and they don't end up hidden in a scrollable list;
- events that end after midnight: divide them visually in two events, one on day X and the other in day X+1.
There are multiple examples of this behaviour in mobile interfaces. This preserves clarity and allows users to get an idea of what's going on at a single glance.
Comment 3 pietz 2021-06-22 10:37:42 UTC
(In reply to Riccardo Robecchi from comment #2)

I would prefer solution 1 (multi-events always on top) because it will look always better to have a wide bar on top and below the top-bar are the single-day-events.

=== === ===
===     ===

looks graphically and structured better than

===     ===
=== === ===
Comment 4 Riccardo Robecchi 2021-06-22 11:14:21 UTC
Created attachment 139590 [details]

(In reply to pietz from comment #3)
The solutions I proposed are not mutually exclusive, they're actually complementary as they solve different problems. See the screenshot attached: the event that crosses the two days starts at 21:55, but it ends after midnight, so it is treated as a multi-day event. Another event that starts *before* it, at 19:15, is shown *after* it because of this.
Splitting the event starting at 21:55 would avoid this confusion. But splitting is not an option for events spanning multiple full days (e.g. the whole of 22nd, 23rd and 24th of June).
Comment 5 Bug Janitor Service 2021-09-03 01:58:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/eventviews/-/merge_requests/40
Comment 6 gjditchfield 2021-09-10 01:13:15 UTC
Git commit a0a3054951109d11b963df5348c40db6131288eb by Glen Ditchfield, on behalf of Laurent Montel.
Committed on 09/09/2021 at 01:18.
Pushed by gditchfield into branch 'release/21.08'.

Avoid vertical gaps around multi-day events in the month view

Given some single-day events and a multi-day event that ends on that day,
the layout heuristic would place the single-day events first, leaving a
gap above the multi-day event.  Placing longer events first tends to
produce more compact layouts.

M  +4    -0    src/CMakeLists.txt
A  +3    -0    src/month/autotests/CMakeLists.txt
A  +89   -0    src/month/autotests/monthitemordertest.cpp     [License: GPL(v2.0+)]
M  +12   -19   src/month/monthitem.cpp
M  +7    -5    src/month/monthitem.h