Removes excessive logging statements
Cleans up the codebase by removing unnecessary console log statements. These logs were primarily used for debugging and are no longer needed in the production code. This reduces noise in the console and improves overall performance.
This commit is contained in:
parent
383eab7524
commit
fafad16926
24 changed files with 4 additions and 275 deletions
|
|
@ -18,7 +18,6 @@ export class NavigationManager {
|
|||
private animationQueue: number = 0;
|
||||
|
||||
constructor(eventBus: IEventBus, eventRenderer: EventRenderingService) {
|
||||
console.log('🧭 NavigationManager: Constructor called');
|
||||
this.eventBus = eventBus;
|
||||
this.dateCalculator = new DateCalculator(calendarConfig);
|
||||
this.navigationRenderer = new NavigationRenderer(eventBus, calendarConfig, eventRenderer);
|
||||
|
|
@ -30,13 +29,11 @@ export class NavigationManager {
|
|||
private init(): void {
|
||||
this.setupEventListeners();
|
||||
// Don't update week info immediately - wait for DOM to be ready
|
||||
console.log('NavigationManager: Waiting for CALENDAR_INITIALIZED before updating DOM');
|
||||
}
|
||||
|
||||
private setupEventListeners(): void {
|
||||
// Initial DOM update when calendar is initialized
|
||||
this.eventBus.on(CoreEvents.INITIALIZED, () => {
|
||||
console.log('NavigationManager: Received CALENDAR_INITIALIZED, updating week info');
|
||||
this.updateWeekInfo();
|
||||
});
|
||||
|
||||
|
|
@ -75,13 +72,11 @@ export class NavigationManager {
|
|||
|
||||
// Validate date before processing
|
||||
if (!dateFromEvent) {
|
||||
console.warn('NavigationManager: No currentDate provided in DATE_CHANGED event', customEvent.detail);
|
||||
return;
|
||||
}
|
||||
|
||||
const targetDate = new Date(dateFromEvent);
|
||||
if (isNaN(targetDate.getTime())) {
|
||||
console.warn('NavigationManager: Invalid currentDate in DATE_CHANGED event', dateFromEvent);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -146,19 +141,15 @@ export class NavigationManager {
|
|||
const currentGrid = container?.querySelector('swp-grid-container:not([data-prerendered])');
|
||||
|
||||
if (!container || !currentGrid) {
|
||||
console.warn('NavigationManager: Required DOM elements not found');
|
||||
return;
|
||||
}
|
||||
|
||||
console.group(`🎬 NAVIGATION ANIMATION: ${direction} to ${targetWeek.toDateString()}`);
|
||||
console.log('1. Creating new container with events...');
|
||||
|
||||
let newGrid: HTMLElement;
|
||||
|
||||
// Always create a fresh container for consistent behavior
|
||||
newGrid = this.navigationRenderer.renderContainer(container as HTMLElement, targetWeek);
|
||||
|
||||
console.log('2. Starting slide animation...');
|
||||
|
||||
// Clear any existing transforms before animation
|
||||
newGrid.style.transform = '';
|
||||
|
|
@ -185,7 +176,6 @@ export class NavigationManager {
|
|||
|
||||
// Handle animation completion
|
||||
slideInAnimation.addEventListener('finish', () => {
|
||||
console.log('3. Animation finished, cleaning up...');
|
||||
|
||||
// Cleanup: Remove all old grids except the new one
|
||||
const allGrids = container.querySelectorAll('swp-grid-container');
|
||||
|
|
@ -215,8 +205,6 @@ export class NavigationManager {
|
|||
weekStart: this.currentWeek
|
||||
});
|
||||
|
||||
console.log('✅ Animation completed successfully');
|
||||
console.groupEnd();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue