Refactors header and scroll management logic

Updates ScrollManager to dynamically sync header spacer height using ResizeObserver

Removes explicit spacer animation from HeaderDrawerManager
Simplifies header and scroll interaction by moving height synchronization logic to ScrollManager
This commit is contained in:
Janus C. H. Knudsen 2025-12-07 23:25:02 +01:00
parent 899c600e44
commit dee977d4df
3 changed files with 32 additions and 7 deletions

View file

@ -5,6 +5,7 @@
--day-column-min-width: 200px;
--day-start-hour: 6;
--day-end-hour: 18;
--header-height: 70px;
--color-border: #e0e0e0;
--color-surface: #fff;
--color-text-secondary: #666;
@ -81,12 +82,16 @@ swp-time-axis {
grid-column: 1;
grid-row: 1 / 3;
display: grid;
grid-template-rows: subgrid;
grid-template-rows: auto 1fr;
border-right: 1px solid var(--color-border);
background: var(--color-surface);
overflow: hidden;
}
swp-header-spacer {
border-bottom: 1px solid var(--color-border);
}
swp-header-drawer {
display: block;
height: 0;
@ -96,9 +101,9 @@ swp-header-drawer {
}
swp-time-axis-content {
display: grid;
grid-auto-rows: var(--hour-height);
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
swp-hour-marker {
@ -118,6 +123,10 @@ swp-hour-marker {
height: 1px;
background: var(--color-hour-line);
}
&:first-child::after {
display: none;
}
}
/* Grid container */