Skip to content

feat(web): support cross-zone week event dnd#1868

Draft
tyler-dane wants to merge 5 commits into
mainfrom
feat/dnd-between-zones
Draft

feat(web): support cross-zone week event dnd#1868
tyler-dane wants to merge 5 commits into
mainfrom
feat/dnd-between-zones

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Summary

  • Adds cross-surface Week event dragging between timed grid and all-day row.
  • Adds calendar-event drops into Someday Week/Month sidebar zones using the existing Someday drop target registry.
  • Adds keyboard parity for active Week drafts: convert timed/all-day and move to Someday Week/Month through existing shortcuts.

Validation

  • bun test:web
  • bun lint
  • bun type-check
  • bun test:e2e (50 passed)

tyler-dane and others added 5 commits June 12, 2026 16:20
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant