Implements event layout coordinator

Introduces a coordinator to manage event layout calculations,
separating this logic from rendering.
It calculates stack levels and allocates event columns for
improved visual organization of calendar events.
This commit is contained in:
Janus C. H. Knudsen 2025-10-06 17:53:25 +02:00
parent 6b8c5d4673
commit 06356df2a3
4 changed files with 545 additions and 56 deletions

View file

@ -2246,5 +2246,434 @@
"duration": 240,
"color": "#2196f3"
}
},
{
"id": "S1A",
"title": "Scenario 1: Event A",
"start": "2025-10-06T05:00:00Z",
"end": "2025-10-06T10:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 300,
"color": "#ff6b6b"
}
},
{
"id": "S1B",
"title": "Scenario 1: Event B",
"start": "2025-10-06T06:00:00Z",
"end": "2025-10-06T08:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 120,
"color": "#4ecdc4"
}
},
{
"id": "S1C",
"title": "Scenario 1: Event C",
"start": "2025-10-06T08:30:00Z",
"end": "2025-10-06T09:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 30,
"color": "#ffe66d"
}
},
{
"id": "S2A",
"title": "Scenario 2: Event A",
"start": "2025-10-06T11:00:00Z",
"end": "2025-10-06T17:00:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 360,
"color": "#ff6b6b"
}
},
{
"id": "S2B",
"title": "Scenario 2: Event B",
"start": "2025-10-06T12:00:00Z",
"end": "2025-10-06T13:00:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#4ecdc4"
}
},
{
"id": "S2C",
"title": "Scenario 2: Event C",
"start": "2025-10-06T13:30:00Z",
"end": "2025-10-06T14:30:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#ffe66d"
}
},
{
"id": "S2D",
"title": "Scenario 2: Event D",
"start": "2025-10-06T15:00:00Z",
"end": "2025-10-06T16:00:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#a8e6cf"
}
},
{
"id": "S3A",
"title": "Scenario 3: Event A",
"start": "2025-10-07T07:00:00Z",
"end": "2025-10-07T13:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 360,
"color": "#ff6b6b"
}
},
{
"id": "S3B",
"title": "Scenario 3: Event B",
"start": "2025-10-07T08:00:00Z",
"end": "2025-10-07T11:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 180,
"color": "#4ecdc4"
}
},
{
"id": "S3C",
"title": "Scenario 3: Event C",
"start": "2025-10-07T09:00:00Z",
"end": "2025-10-07T10:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#ffe66d"
}
},
{
"id": "S3D",
"title": "Scenario 3: Event D",
"start": "2025-10-07T10:30:00Z",
"end": "2025-10-07T11:30:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#a8e6cf"
}
},
{
"id": "S4A",
"title": "Scenario 4: Event A",
"start": "2025-10-07T14:00:00Z",
"end": "2025-10-07T20:00:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 360,
"color": "#ff6b6b"
}
},
{
"id": "S4B",
"title": "Scenario 4: Event B",
"start": "2025-10-07T15:00:00Z",
"end": "2025-10-07T19:00:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 240,
"color": "#4ecdc4"
}
},
{
"id": "S4C",
"title": "Scenario 4: Event C",
"start": "2025-10-07T16:00:00Z",
"end": "2025-10-07T18:00:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 120,
"color": "#ffe66d"
}
},
{
"id": "S5A",
"title": "Scenario 5: Event A",
"start": "2025-10-08T05:00:00Z",
"end": "2025-10-08T08:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 180,
"color": "#ff6b6b"
}
},
{
"id": "S5B",
"title": "Scenario 5: Event B",
"start": "2025-10-08T06:00:00Z",
"end": "2025-10-08T07:30:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 90,
"color": "#4ecdc4"
}
},
{
"id": "S5C",
"title": "Scenario 5: Event C",
"start": "2025-10-08T06:00:00Z",
"end": "2025-10-08T07:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#ffe66d"
}
},
{
"id": "S6A",
"title": "Scenario 6: Event A",
"start": "2025-10-08T09:00:00Z",
"end": "2025-10-08T12:00:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 180,
"color": "#ff6b6b"
}
},
{
"id": "S6B",
"title": "Scenario 6: Event B",
"start": "2025-10-08T10:00:00Z",
"end": "2025-10-08T11:30:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 90,
"color": "#4ecdc4"
}
},
{
"id": "S6C",
"title": "Scenario 6: Event C",
"start": "2025-10-08T10:00:00Z",
"end": "2025-10-08T11:00:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#ffe66d"
}
},
{
"id": "S6D",
"title": "Scenario 6: Event D",
"start": "2025-10-08T10:30:00Z",
"end": "2025-10-08T10:45:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 15,
"color": "#a8e6cf"
}
},
{
"id": "S7A",
"title": "Scenario 7: Event A",
"start": "2025-10-09T05:00:00Z",
"end": "2025-10-09T07:30:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 150,
"color": "#009688"
}
},
{
"id": "S7B",
"title": "Scenario 7: Event B",
"start": "2025-10-09T05:00:00Z",
"end": "2025-10-09T07:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 120,
"color": "#ff5722"
}
},
{
"id": "S8A",
"title": "Scenario 8: Event A",
"start": "2025-10-09T08:00:00Z",
"end": "2025-10-09T09:00:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#ff6b6b"
}
},
{
"id": "S8B",
"title": "Scenario 8: Event B",
"start": "2025-10-09T08:15:00Z",
"end": "2025-10-09T09:30:00Z",
"type": "meeting",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 75,
"color": "#4ecdc4"
}
},
{
"id": "S9A",
"title": "Scenario 9: Event A",
"start": "2025-10-09T10:00:00Z",
"end": "2025-10-09T11:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#ff6b6b"
}
},
{
"id": "S9B",
"title": "Scenario 9: Event B",
"start": "2025-10-09T10:30:00Z",
"end": "2025-10-09T11:30:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#4ecdc4"
}
},
{
"id": "S9C",
"title": "Scenario 9: Event C",
"start": "2025-10-09T11:15:00Z",
"end": "2025-10-09T13:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 105,
"color": "#ffe66d"
}
},
{
"id": "S10A",
"title": "Scenario 10: Event A",
"start": "2025-10-10T10:00:00Z",
"end": "2025-10-10T13:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 180,
"color": "#ff6b6b"
}
},
{
"id": "S10B",
"title": "Scenario 10: Event B",
"start": "2025-10-10T10:30:00Z",
"end": "2025-10-10T11:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 30,
"color": "#4ecdc4"
}
},
{
"id": "S10C",
"title": "Scenario 10: Event C",
"start": "2025-10-10T11:30:00Z",
"end": "2025-10-10T12:30:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#ffe66d"
}
},
{
"id": "S10D",
"title": "Scenario 10: Event D",
"start": "2025-10-10T12:00:00Z",
"end": "2025-10-10T13:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#a8e6cf"
}
},
{
"id": "S10E",
"title": "Scenario 10: Event E",
"start": "2025-10-10T12:00:00Z",
"end": "2025-10-10T13:00:00Z",
"type": "work",
"allDay": false,
"syncStatus": "synced",
"metadata": {
"duration": 60,
"color": "#dda15e"
}
}
]