Optimizes animation speed and event flow

Reduces the duration of a UI height animation for a snappier feel.
Disables a specific `header:ready` event emission during navigation rendering.
This commit is contained in:
Janus C. H. Knudsen 2025-09-23 09:46:47 +02:00
parent 6498b0ba8e
commit ffa0bcafc3
3 changed files with 38 additions and 2 deletions

View file

@ -137,6 +137,19 @@ export class NavigationRenderer {
</swp-scrollable-content>
`;
// Set header to base height for slide-in animation - will be reset after animation completes
const header = newGrid.querySelector('swp-calendar-header') as HTMLElement;
if (header) {
// Get base header height (without all-day rows)
const root = document.documentElement;
const baseHeaderHeight = getComputedStyle(root).getPropertyValue('--header-height');
header.style.height = baseHeaderHeight;
console.log('🔄 NavigationRenderer: Set header height to base height for slide-in', {
baseHeaderHeight,
weekStart: weekStart.toISOString()
});
}
// Position new grid - NO transform here, let Animation API handle it
newGrid.style.position = 'absolute';
newGrid.style.top = '0';
@ -214,7 +227,7 @@ export class NavigationRenderer {
endDate: weekEnd,
isNavigation: true
};
this.eventBus.emit('header:ready', payload);
//this.eventBus.emit('header:ready', payload);
}
/**