wip
This commit is contained in:
parent
ce82b5286b
commit
42901212da
3 changed files with 23 additions and 2 deletions
|
|
@ -263,6 +263,24 @@ export class GridManager {
|
||||||
const headerSectionRight = document.createElement('swp-header-section-right');
|
const headerSectionRight = document.createElement('swp-header-section-right');
|
||||||
headerSectionRight.textContent = 'Right Section';
|
headerSectionRight.textContent = 'Right Section';
|
||||||
weekHeader.appendChild(headerSectionRight);
|
weekHeader.appendChild(headerSectionRight);
|
||||||
|
|
||||||
|
// Update spacer heights based on all-day events
|
||||||
|
this.updateSpacerHeights();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update spacer heights based on all-day events presence
|
||||||
|
*/
|
||||||
|
private updateSpacerHeights(): void {
|
||||||
|
// TODO: Check for actual all-day events in current week
|
||||||
|
// For now, simulate having all-day events with 30px height
|
||||||
|
const hasAllDayEvents = true; // This should be determined from actual event data
|
||||||
|
const allDayHeight = hasAllDayEvents ? 30 : 0;
|
||||||
|
|
||||||
|
// Set CSS variable for dynamic spacer height
|
||||||
|
document.documentElement.style.setProperty('--all-day-row-height', `${allDayHeight}px`);
|
||||||
|
|
||||||
|
console.log('GridManager: Updated --all-day-row-height to', `${allDayHeight}px`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
--day-column-min-width: 250px;
|
--day-column-min-width: 250px;
|
||||||
--week-days: 7;
|
--week-days: 7;
|
||||||
--header-height: 80px;
|
--header-height: 80px;
|
||||||
|
--all-day-row-height: 0px; /* Default height for all-day events row */
|
||||||
|
|
||||||
/* Time boundaries - Default fallback values */
|
/* Time boundaries - Default fallback values */
|
||||||
--day-start-hour: 0;
|
--day-start-hour: 0;
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,13 @@ swp-calendar-container {
|
||||||
swp-header-spacer {
|
swp-header-spacer {
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
height: var(--header-height); /* Use CSS variable for consistent height */
|
height: calc(var(--header-height) + var(--all-day-row-height)); /* Dynamic height including all-day events */
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
border-right: 1px solid var(--color-border);
|
border-right: 1px solid var(--color-border);
|
||||||
border-bottom: 1px solid var(--color-border);
|
border-bottom: 1px solid var(--color-border);
|
||||||
z-index: 5; /* Higher than time-axis to cover it when scrolling */
|
z-index: 5; /* Higher than time-axis to cover it when scrolling */
|
||||||
position: relative;
|
position: relative;
|
||||||
|
transition: height 300ms ease; /* Smooth height transitions */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -63,12 +64,13 @@ swp-header-spacer {
|
||||||
swp-right-header-spacer {
|
swp-right-header-spacer {
|
||||||
grid-column: 3;
|
grid-column: 3;
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
height: var(--header-height); /* Use CSS variable for consistent height */
|
height: calc(var(--header-height) + var(--all-day-row-height)); /* Dynamic height including all-day events */
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
border-left: 1px solid var(--color-border);
|
border-left: 1px solid var(--color-border);
|
||||||
border-bottom: 1px solid var(--color-border);
|
border-bottom: 1px solid var(--color-border);
|
||||||
z-index: 5; /* Higher than time-axis to cover it when scrolling */
|
z-index: 5; /* Higher than time-axis to cover it when scrolling */
|
||||||
position: relative;
|
position: relative;
|
||||||
|
transition: height 300ms ease; /* Smooth height transitions */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Week container for sliding */
|
/* Week container for sliding */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue