Refactors drag and drop to use the original element as the source and introduces edge scrolling.
This change aims to enhance the user experience during drag and drop operations by ensuring the correct element is used as the source, fixing issues, and by automatically scrolling the view when the dragged element reaches the edge of the scrollable area.
Adds edge scrolling to automatically scroll the calendar
when dragging an event near the edges of the view.
This improves the drag-and-drop experience by allowing users
to move events beyond the visible area.
Removes auto-scroll logic from the event renderer, centralizing
the scrolling behavior within the new edge scroll manager.
Streamlines the conversion of all-day events to timed events during drag and drop operations. This change improves the event rendering process by ensuring proper handling of element replacement and position updates.
Removes redundant code and simplifies the logic for updating the dragged clone.
Implements drag-and-drop conversion from all-day events to timed events in day columns. This change introduces a new event type (`drag:mouseenter-column`) and delegates rendering logic to the `DateEventRenderer` to maintain architectural consistency.
Allows users to convert all-day events to timed events by dragging them over a day column.
This implementation adds logic to the DragDropManager to detect when an all-day event is dragged over a column.
It then emits a new event, 'drag:mouseenter-column', carrying the event data and target column information.
The event rendering service handles this event.
Improves event dragging by tracking the source column and using the updated event data for re-rendering affected columns.
Also, enhances event resizing by updating the event data and re-rendering the column to recalculate stacking/grouping.
Uses snap interval as minimum duration when resizing.
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.
Refines drag and drop behavior for all-day events.
Removes unnecessary logging and conditional logic in the
AllDayManager.
Simplifies column change handling in the EventRendererManager.
Ensures that the all-day event overflow indicator updates
correctly when the number of events changes, instead of
creating duplicate indicators.
Removes unused event click handling logic.
Refactors all-day event rendering to use header column data.
This ensures events are rendered based on the actual visible
dates in the header, improving accuracy and responsiveness to view changes.
Removes direct dependency on week dates in `AllDayManager` and
`EventRenderingService`, instead, the all-day manager is instantiated
with event manager.
Updates `HeaderManager` to emit header bounds.
Refactors all-day event layout calculation and rendering for improved accuracy and performance.
Improves drag-and-drop behavior for all-day events, ensuring correct event placement and column detection.
Addresses issues with event overflow display and provides a more responsive user experience.
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.
Improves drag and drop functionality by refactoring column detection to use column bounds instead of dates.
This change enhances the accuracy and efficiency of determining the target column during drag operations.
It also removes redundant code and simplifies the logic in both the DragDropManager and AllDayManager.
Simplifies all-day event rendering by streamlining the layout
calculation and event placement process, using the AllDayLayoutEngine
to determine the grid positions. This removes deprecated methods
and improves overall code clarity.
Refactors drag and drop handling to use a cloned event element,
ensuring correct positioning and styling during drag operations
for both regular timed events and all-day events.
This change streamlines the drag and drop process by:
- Creating a clone of the dragged event at the start of the drag.
- Passing the clone through the drag events.
- Handling all-day events with the AllDayManager
- Handling regular timed events with the EventRendererManager
This resolves issues with event positioning and styling during
drag, especially when moving events across columns or between
all-day and timed sections.
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 all-day event rendering to use a layout engine
for overlap detection and positioning, ensuring events
are placed in available rows and columns.
Removes deprecated method and adds unit tests.
Decouples all-day event rendering, making it reactive to header readiness with period data.
Eliminates explicit DOM element caching, simplifying element access.
Enhances the `header:ready` event payload with `startDate` and `endDate`.
Improves all-day row height animation and calculation.
Event rendering strategies now exclusively handle timed events, while all-day events are managed by a dedicated renderer.
Centralizes calendar header creation within `GridRenderer`, ensuring the header element is always present from initial DOM construction. `HeaderManager` and `ScrollManager` now react to a `header:ready` event, which signifies the header is fully initialized.
Synchronizes all-day event rendering with header readiness, temporarily queuing events until the header is prepared. Emits an `allday:checkHeight` event to prompt all-day container height adjustments after rendering.
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.
Introduces dedicated TypeScript interfaces for all drag-and-drop event payloads, enhancing type safety and developer experience.
Centralizes drag event detection and emission within `DragDropManager`. Refactors `AllDayManager`, `HeaderManager`, and `EventRendererManager` to subscribe to these typed events, improving decoupling and clarifying responsibilities.
Resolves known inconsistencies in drag event payloads, especially for all-day event conversions. Adds a comprehensive analysis document (`docs/EventSystem-Analysis.md`) detailing the event system and planned improvements.
Centralizes drag event listener setup in `EventRendererManager` for better separation of concerns.
Introduces factory and cloning methods in `SwpEventElement` to simplify event cloning and data extraction from DOM elements during drag operations.
Enhances `DragDropManager` to pass the actual dragged element for conversion and accurately detect the drop target (day column or header).
Updates `EventRenderer` to expose drag-handling methods publicly, allowing the `EventRendererManager` to delegate event-specific drag operations based on drop target.
Implements comprehensive drag and drop for all-day events, allowing movement within the header and conversion to timed events when dragged into the calendar grid.
Optimizes column detection with a cached bounding box strategy, improving performance and accuracy. Refactors event conversion logic and renames related event bus events for clarity.
Streamlines calendar configuration by adopting a singleton pattern for consistent access and simplifies event handling.
- Removes direct `CalendarConfig` dependency injection in favor of the `calendarConfig` singleton, reducing code complexity.
- Replaces specific event emissions for grid, date, and resource settings updates with a general `REFRESH_REQUESTED` event.
- Updates event names to be more descriptive and consistent ("NAVIGATION_COMPLETED", "PERIOD_INFO_UPDATE").
- Removes the need to pass the calendar config to renderers since it is now a singleton.
This improves code maintainability and simplifies the event emission process.
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.
Refactors all-day event container handling to improve rendering and event delegation.
Ensures all-day containers are consistently created and managed,
preventing issues with event display and drag-and-drop functionality.
Moves event listener setup into dedicated methods for better
organization and reusability.
Implements a fuzzy search filter system using Fuse.js to enhance event searching.
This system allows users to quickly find events by typing partial matches of event titles or descriptions, providing visual feedback by dimming non-matching events. The filter persists during navigation and includes escape key support for quick clearing. It also includes performance optimizations like requestAnimationFrame debouncing.
Updates the codebase to utilize `CalendarMode` instead of the deprecated `CalendarType`.
Simplifies `CalendarConfig` by removing legacy methods and related type aliases, enhancing code maintainability and clarity.
Improves event rendering by ensuring `GRID_RENDERED` events include explicit start and end dates, preventing errors and ensuring correct data filtering.
Migrates the application to use a new CoreEvents system.
This change removes the legacy EventTypes constant file and updates all managers, renderers, and core components to use the CoreEvents constant file for event emission and subscription.
This improves code maintainability and promotes a consistent eventing strategy across the application. Adds validation to EventBus emit and extractCategory functions.
Refactors the grid management to use a strategy pattern, allowing for different calendar views (week, month, day) to be rendered using separate strategy implementations.
This approach improves code organization, reduces complexity within the main grid manager, and makes it easier to add new view types in the future.
The strategy pattern centralizes view-specific logic, improves testability, and reduces code duplication.
A month view strategy has been added and is now selectable via UI.
Prepares the calendar component for month view implementation
by introducing a strategy pattern for view management,
splitting configuration settings, and consolidating events
into a core set. It also removes dead code and enforces type safety,
improving overall code quality and maintainability.
Addresses critical issues identified in the code review,
laying the groundwork for efficient feature addition.
Centralizes all date calculations into a new `DateCalculator` class for better maintainability and consistency.
Ensures correct ISO week handling (Monday as the first day) throughout the calendar.
Updates `CalendarConfig` to use ISO day numbering (1-7 for Mon-Sun) for work week definitions.
Fixes issue where date calculations were inconsistent.
Enhances event rendering and navigation.
Updates navigation logic to use pre-rendered events.
Removes the need for `CONTAINER_READY_FOR_EVENTS` event.
Implements a factory pattern for manager creation and
initialization, improving dependency management and
extensibility.
This change replaces direct manager instantiation with a
`ManagerFactory` that handles dependency injection. This
enhances code organization and testability. It also includes
an initialization sequence diagram for better understanding
of the calendar's architecture and data flow.