Improves all-day event layout calculation

Updates the all-day event layout engine for better event
rendering, especially when dealing with partial week views.

The layout engine now correctly clips events that start
before or end after the visible date range, ensuring that
only relevant portions of events are displayed.

It also fixes event ordering.

Includes new unit tests to validate date range filtering and
clipping logic.
This commit is contained in:
Janus C. H. Knudsen 2025-09-26 17:47:02 +02:00
parent a551bc59ff
commit 41d078e2e8
4 changed files with 277 additions and 265 deletions

View file

@ -223,7 +223,7 @@
"id": "23",
"title": "Summer Team Event",
"start": "2025-07-18T00:00:00",
"end": "2025-07-18T23:59:59",
"end": "2025-07-19T00:00:00",
"type": "meeting",
"allDay": true,
"syncStatus": "synced",
@ -463,7 +463,7 @@
"id": "47",
"title": "Company Holiday",
"start": "2025-08-04T00:00:00",
"end": "2025-08-05T23:59:59",
"end": "2025-08-06T00:00:00",
"type": "milestone",
"allDay": true,
"syncStatus": "synced",
@ -523,7 +523,7 @@
"id": "53",
"title": "Team Building Event",
"start": "2025-08-06T00:00:00",
"end": "2025-08-06T23:59:59",
"end": "2025-08-07T00:00:00",
"type": "meeting",
"allDay": true,
"syncStatus": "synced",
@ -693,7 +693,7 @@
"id": "70",
"title": "Summer Festival",
"start": "2025-08-14T00:00:00",
"end": "2025-08-16T23:59:59",
"end": "2025-08-17T00:00:00",
"type": "milestone",
"allDay": true,
"syncStatus": "synced",
@ -1113,7 +1113,7 @@
"id": "112",
"title": "Autumn Equinox",
"start": "2025-09-23T00:00:00",
"end": "2025-09-23T23:59:59",
"end": "2025-09-24T00:00:00",
"type": "milestone",
"allDay": true,
"syncStatus": "synced",
@ -1213,7 +1213,7 @@
"id": "122",
"title": "Multi-Day Conference",
"start": "2025-09-22T00:00:00",
"end": "2025-09-24T23:59:59",
"end": "2025-09-25T00:00:00",
"type": "meeting",
"allDay": true,
"syncStatus": "synced",
@ -1223,7 +1223,7 @@
"id": "123",
"title": "Project Sprint",
"start": "2025-09-23T00:00:00",
"end": "2025-09-25T23:59:59",
"end": "2025-09-26T00:00:00",
"type": "work",
"allDay": true,
"syncStatus": "synced",
@ -1233,7 +1233,7 @@
"id": "124",
"title": "Training Week",
"start": "2025-09-29T00:00:00",
"end": "2025-10-03T23:59:59",
"end": "2025-10-04T00:00:00",
"type": "meeting",
"allDay": true,
"syncStatus": "synced",
@ -1243,7 +1243,7 @@
"id": "125",
"title": "Holiday Weekend",
"start": "2025-10-04T00:00:00",
"end": "2025-10-06T23:59:59",
"end": "2025-10-07T00:00:00",
"type": "milestone",
"allDay": true,
"syncStatus": "synced",
@ -1253,7 +1253,7 @@
"id": "126",
"title": "Client Visit",
"start": "2025-10-07T00:00:00",
"end": "2025-10-09T23:59:59",
"end": "2025-10-10T00:00:00",
"type": "meeting",
"allDay": true,
"syncStatus": "synced",
@ -1263,7 +1263,7 @@
"id": "127",
"title": "Development Marathon",
"start": "2025-10-13T00:00:00",
"end": "2025-10-15T23:59:59",
"end": "2025-10-16T00:00:00",
"type": "work",
"allDay": true,
"syncStatus": "synced",
@ -1423,7 +1423,7 @@
"id": "143",
"title": "Weekend Hackathon",
"start": "2025-09-27T00:00:00",
"end": "2025-09-28T23:59:59",
"end": "2025-09-29T00:00:00",
"type": "work",
"allDay": true,
"syncStatus": "synced",
@ -1603,7 +1603,7 @@
"id": "161",
"title": "Teknisk Workshop",
"start": "2025-09-24T00:00:00",
"end": "2025-09-26T23:59:59",
"end": "2025-09-27T00:00:00",
"type": "meeting",
"allDay": true,
"syncStatus": "synced",
@ -1613,7 +1613,7 @@
"id": "162",
"title": "Produktudvikling Sprint",
"start": "2025-10-01T00:00:00",
"end": "2025-10-03T23:59:59",
"end": "2025-10-04T00:00:00",
"type": "work",
"allDay": true,
"syncStatus": "synced",