Improves calendar event rendering and UX

Refactors calendar rendering for improved user experience and performance.

- Removes unused function for rendering week content directly, streamlining the rendering process.
- Updates mock events to better reflect realistic all-day events.
- Adds file system search permission to claude settings.
- Removes console logs in scroll and navigation managers.
This commit is contained in:
Janus Knudsen 2025-08-17 22:09:50 +02:00
parent a03f314c4a
commit 6026d28e6f
4 changed files with 7 additions and 81 deletions

View file

@ -16,7 +16,6 @@ export class ScrollManager {
private resizeObserver: ResizeObserver | null = null;
constructor() {
console.log('📜 ScrollManager: Constructor called');
this.init();
}
@ -28,14 +27,12 @@ export class ScrollManager {
* Public method to initialize scroll after grid is rendered
*/
public initialize(): void {
console.log('ScrollManager: Initialize called, setting up scrolling');
this.setupScrolling();
}
private subscribeToEvents(): void {
// Handle navigation animation completion - sync time axis position
eventBus.on(EventTypes.NAVIGATION_ANIMATION_COMPLETE, () => {
console.log('ScrollManager: Navigation animation complete');
this.syncTimeAxisPosition();
this.setupScrolling();
});
@ -110,7 +107,6 @@ export class ScrollManager {
this.resizeObserver = new ResizeObserver((entries) => {
for (const entry of entries) {
console.log('ScrollManager: Container resized', entry.contentRect);
this.updateScrollableHeight();
}
});
@ -141,13 +137,6 @@ export class ScrollManager {
// Calculate available width (container width minus time-axis)
const availableWidth = containerRect.width - 60; // 60px time-axis
console.log('ScrollManager: Dynamic height calculation');
console.log('- Container height:', containerRect.height);
console.log('- Navigation height:', navHeight);
console.log('- Header height:', headerHeight);
console.log('- Available height:', availableHeight);
console.log('- Available width:', availableWidth);
// Set the height and width on scrollable content
if (availableHeight > 0) {
this.scrollableContent.style.height = `${availableHeight}px`;
@ -163,8 +152,6 @@ export class ScrollManager {
private setupScrollSynchronization(): void {
if (!this.scrollableContent || !this.timeAxis) return;
console.log('ScrollManager: Setting up scroll synchronization');
// Throttle scroll events for better performance
let scrollTimeout: number | null = null;
@ -194,7 +181,6 @@ export class ScrollManager {
// Debug logging (can be removed later)
if (scrollTop % 100 === 0) { // Only log every 100px to avoid spam
console.log(`ScrollManager: Synced time-axis to scrollTop: ${scrollTop}px`);
}
}
}
@ -205,7 +191,6 @@ export class ScrollManager {
private setupHorizontalScrollSynchronization(): void {
if (!this.scrollableContent || !this.calendarHeader) return;
console.log('ScrollManager: Setting up horizontal scroll synchronization');
// Listen to horizontal scroll events
this.scrollableContent.addEventListener('scroll', () => {
@ -226,7 +211,6 @@ export class ScrollManager {
// Debug logging (can be removed later)
if (scrollLeft % 100 === 0) { // Only log every 100px to avoid spam
console.log(`ScrollManager: Synced calendar-header to scrollLeft: ${scrollLeft}px`);
}
}