Improves event description display using modern CSS container queries
- Adds responsive layout techniques for event descriptions
- Implements dynamic hiding/showing of description based on event height
- Adds fade-out effect for long descriptions
Enables more flexible and adaptive calendar event rendering
Extends event model to include optional description field
Enhances event rendering with:
- New description getter/setter in base event element
- Updated CSS grid layout for description display
- Dynamic description handling in event rendering
- Updated mock event data with descriptions
Improves visual information density and event context in calendar view
Removes redundant state tracking for all-day event layouts
Shifts from maintaining internal layout state to reading directly from DOM elements
Simplifies event handling and updates by using DOM as the source of truth
Improves performance by reducing unnecessary state management
Introduces ViewSelectorManager to handle view state and UI interactions
Separates view logic from configuration management
Adds explicit tracking of current calendar view
Enhances view selection and state management
Improves modularity and separation of concerns
Enhances event resizing functionality with smoother animation and more robust handling
Removes complex resize zone tracking in favor of simplified resize mechanism
Improves performance and simplifies event resize interactions
Cleans up unnecessary complexity in pointer and animation management
Converts CalendarConfig to a pure static configuration management class with improved initialization and dependency handling
Removes event bus dependencies and simplifies configuration loading
Adds static methods for config management and initialization
Improves flexibility and reduces class complexity
Adds locale support to the date header renderer and date service.
This change ensures that the day names are displayed correctly based on the user's configured locale.
The date header now uses the configured locale to display the day name in the correct language.
The day name is now displayed in uppercase.
Additionally, styles the date header to highlight today's date.
Enhances the visual feedback during and after event drag and drop operations in the calendar.
- Preserves the full opacity of the dragged event clone during the drag operation for better visibility.
- Applies a highlight class to the event after it's dropped to visually indicate the new location.
- Adds specific styling for the highlighted state based on event type.
Enhances the event drag and drop functionality by setting the initial position of the dragged event to prevent it from jumping to the top of the column.
Also adjust event transition for a smoother user experience.
Removes unused resize logic.
Replaces the previous rough event resizing implementation with a smooth, animated approach.
Uses pointer events for accurate tracking and adds a visual resize handle
for better user interaction.
Also refactors drag and drop to exclude resize handle.
Uses CSS classes for event hover highlighting,
instead of directly manipulating the background color.
This allows for more flexible and maintainable styling.
Re-enables resize handle manager.
Removes console logs.
Removes `pointer-events: none` from various calendar elements.
This ensures that the elements are correctly interactive,
allowing the user to click on them as intended.
Enhances the visual design of the resize handle for calendar events, making it more prominent and user-friendly.
- Updates the handle's styling with a darker background, increased size, and refined shadow.
- Replaces grip dots with grip lines for a cleaner look.
Enhances the resize handle indicator for calendar events by using cached event elements for efficiency.
This eliminates the need to constantly query the DOM, and only refreshes the cache on relevant event changes.
Additionally updates the resize indicator style for improved visual clarity and user experience.
Adds a resize handle manager to handle mouse hover
effects on calendar events and display a resize indicator.
This allows users to visually identify and initiate
event resizing by hovering near the bottom edge of an event.
Introduces a 3-phase algorithm in `EventStackManager` for dynamic event positioning. Groups events by start time proximity to determine optimal layout.
Optimizes horizontal space by using side-by-side grid columns for simultaneous events and allowing non-overlapping events to share stack levels. Supports nested stacking for late-arriving events within grid columns.
Includes comprehensive documentation (`STACKING_CONCEPT.md`) and a visual demonstration (`stacking-visualization.html`) to explain the new layout logic. Updates event rendering to utilize the new manager and adds extensive test coverage.
Introduces web components for event elements, separating timed and all-day events into distinct components for better organization and reusability.
This change also simplifies event rendering and drag-and-drop operations by leveraging the properties and lifecycle methods of web components.
Enhances date validation and timezone handling using DateService, ensuring data integrity and consistency.
Refactors event rendering and dragging to correctly handle date transformations.
Adds a test plan for event stacking and z-index management.
Fixes edge cases in navigation and date calculations for week/year boundaries and DST transitions.
Ensures correct display of all-day events when collapsed or expanded.
Improves the transition between collapsed and expanded states by
adjusting the overflow event visibility.
Improves the visual appearance of all-day events
by adjusting padding and margins.
Reduces padding in the all-day container and adds
margins to individual events for better spacing.
Ensures consistent all-day event row height calculation across CSS and TypeScript.
The all-day event row height calculation is adjusted by removing redundant container padding from the TypeScript constant and synchronizing the CSS variable with the event height.
Additionally, the layout engine is directly tested in the test file for better coverage.
Enhances the all-day event display when collapsed by showing four rows (three events plus an overflow indicator).
Updates the overflow indicator logic to dynamically display the number of hidden events and allow the user to expand the view.
Adds functionality to collapse the all-day event rows when the number of rows exceeds a limit.
This improves the layout by preventing the all-day section from taking up too much space. A chevron button is added to allow users to expand/collapse the section.
Refactors drag and drop logic to use the dragged clone consistently, fixing issues with event handling and element manipulation during drag operations.
Also includes a fix where the original element is removed after a drag is completed.
Adds column bounds cache update after drag operations for improved column detection.
Refactors all-day event conversion during drag and drop to
use the event payload, improving code clarity and reducing
redundancy.
Removes unnecessary style settings and fixes column detection
logic. Addresses an issue where event removal occurred before
successful placement.
Refactors all-day event drag and drop handling for improved accuracy and performance.
Introduces a shared `ColumnDetectionUtils` for consistent column detection.
Simplifies all-day conversion during drag, placing events in row 1 and calculating the column from the target date.
Implements differential updates during drag end, updating only changed events for smoother transitions.
Refactors drag-to-all-day functionality to apply CSS styling and reposition the existing drag clone within the all-day container, rather than creating a new event element.
Centralizes all-day container creation in HeaderManager. Introduces `drag:mouseleave-header` to handle transitions from all-day back to timed events.
Ensures consistent styling and robust cleanup of drag clones for a smoother user experience.
Removes the `swp-allday-event` custom element, using `swp-event` for all-day events instead. All-day events are now distinguished by their parent `swp-allday-container`. Simplifies element management and CSS selectors.
Enhances the all-day event selection by creating transparent, full-height columns for each day, which enables more accurate and reliable hover detection across all-day events.
Now selects all-day events by hovering on the entire column, not just day headers.
Refactors drag and drop logic for better event handling and code clarity.
- Moves drag styling to CSS class for cleaner code.
- Emits a 'drag:convert-from-allday' event to handle the conversion of all-day events back to day events.
- Adds logging for debugging purposes.
Refactors drag and drop logic to dynamically find the dragged element, ensuring correct behavior even when the DOM changes during the drag operation.
Creates all-day container if it doesn't exist.
This resolves issues where drag and drop operations would fail if the original element was no longer present in the DOM or if the container didn't exist.
Improves code organization and maintainability by separating concerns related to all-day event rendering, header management, and event resizing.
Moves all-day event rendering logic into a dedicated `AllDayEventRenderer` class, utilizing the factory pattern for event element creation.
Refactors `AllDayManager` to handle all-day row height animations, separated from `HeaderManager`.
Removes the `ResizeManager` and related functionality.
These changes aim to reduce code duplication, improve testability, and enhance the overall architecture of the calendar component.
Updates the event overlap detection to accurately determine when events overlap in time, fixing incorrect stacking behavior.
Implements column sharing for events starting within 30 minutes of each other.
Applies stacking only when events truly overlap in time but start times differ by more than 30 minutes.
Removes unnecessary data attributes and simplifies styling for stacked events, improving code cleanliness and performance.
Adds logic to handle event overlaps in the calendar view. It introduces two patterns: column sharing for events with the same start time (rendered using flexbox) and stacking for events with a >30 min difference (rendered with reduced width and z-index).
It also introduces deep linking to specific events via URL parameters.
Enhances drag and drop behavior by introducing free positioning during auto-scroll and snapping to grid intervals.
- Introduces a `calculateFreePosition` method to allow events to follow the mouse exactly during auto-scroll.
- Modifies the drag move event to emit the snapped position during normal drag behavior.
- Updates event rendering to use grid settings for snap intervals.
- Updates grid styles to configure CSS variables dynamically.
Refactors the header animation to animate the calendar header's height instead of just the all-day container.
This change improves the perceived performance of the animation. It also reduces animation duration.
Simplifies header animation logic by leveraging CSS Grid for height transitions.
This change removes the direct height animation of the calendar header and relies on CSS Grid's auto row feature to manage the header expansion.
It also removes the manual spacer height calculations in Typescript, and relies on CSS variables to control this.
This results in a smoother and more efficient animation, especially when all-day events are present.