feat(web): support cross-zone week event dnd#1868
Draft
tyler-dane wants to merge 5 commits into
Draft
Conversation
- Stop grid smart scroll once a timed drag preview snaps to the all-day row or a sidebar drop zone - Suppress edge week-navigation dwell while hovering sidebar drop zones so the week no longer changes under a sidebar drop - Restore the drag overlay's size when returning to the home surface and keep transform un-eased outside the snapped cross-surface mode - Smart scroll the grid while an all-day drag hovers the timed grid so off-screen times are reachable - Clamp all-day to timed conversions so the event ends within the dropped day - Fix crash on Someday Month drops (wrong column key) and route all calendar-to-someday conversions through a shared helper that sets category date ranges, rewrites recurrence frequency, and defaults priority/user; discard the draft after pointer conversions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dragging a timed or all-day grid event over the Someday sidebar now lights up the Week/Month drop zones (dashed active border, red when the column is full), matching the feedback shown when reordering someday items. Previously the zones stayed inert because their styling keys off sidebar `isDragging` (= isDNDing && sidebar draft), which the separate WeekInteractionAdapter drag path never sets. - Add a dedicated `isCalendarDragActive` sidebar state + a `setCalendarSidebarDropPreview` action, reusing `blockedSomedayDropColumn` for the full-column state. This avoids faking a sidebar draft (which would render a ghost someday list item via isDraftingNew). - SomedayEventsContainer honors the new flag alongside isDragging for the active style, expanded drop height, and hidden add button. - WeekInteractionAdapter emits a deduped onPreviewCalendarToSidebar on each move (the category under the pointer, or null), and clears it on commit and cancel via clearInteractionState. - WeekInteractionCoordinator maps the previewed category to its column and capacity-blocked flag (reusing the limit selectors it already reads) and drives the sidebar action through the shared SidebarDraftProvider context. Styling activates only while the dragged event is over the sidebar and clears on return to the grid, on a normal grid drop, and on Escape/cancel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two follow-up fixes for dragging a grid event into the Someday sidebar: 1. Live reordering. While hovering a grid event over a Someday list, the existing rows now shift with the standard FLIP animation as the pointer moves, instead of only rearranging after the drop. The calendar-drag preview now inserts a someday-shaped placeholder at the hovered index (via setSomedayEvents), mirroring the native sidebar reorder path; the placeholder is excluded from the index math to avoid jitter, and the snapshot is restored on leave/cancel. 2. Nearest-list snap. Dragging into the empty space between (or around) the two lists no longer jumps the event back to the grid. resolveSidebarDrop now treats the whole sidebar column as sidebar territory and snaps to the vertically nearest zone, so moving down from the Week list into the gap lands on the Month list. The preview channel (onPreviewCalendarToSidebar) now carries the hovered index and the dragged event, deduped on category+index so the placeholder follows the pointer without a setState every frame. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
bun test:webbun lintbun type-checkbun test:e2e(50 passed)