feat(schedule): right-click menu + drag-to-resize on EPG event blocks #25
No reviewers
Labels
No labels
bug
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: WildDragonLLC/dragonflight#25
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/epg-resize-and-ctxmenu"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two interactions added to the EPG event blocks on Schedule:
Right-click context menu
Right-click any event block to open a menu (Edit, Cancel, Copy schedule ID, Delete). Per-status filtering mirrors the buttons rendered in the List view so the two surfaces stay consistent:
Menu is viewport-clamped (won't fall off the right/bottom edges) and dismisses on outside click, right-click elsewhere, or scroll. Same dismissal pattern as
AssetContextMenuin the Library.Drag-to-resize event blocks
Pending blocks gain three drag affordances:
start_atend_atBehaviour:
9:00 AM → 10:30 AM) and the block lifts with a project-tinted shadowPUT /schedules/:idwith just{ start_at, end_at }; refetch reconcilesImplementation notes
_EventBlockswapped from<button>to<div>hosting three zones (.epg-block-handle.left/.epg-block-body/.epg-block-handle.right)pointerdown/pointermove/pointerupwithsetPointerCaptureso drags survive losing the cursor over the element_ScheduleContextMenucomponent, same shape asAssetContextMenuSchedulegainsctxMenustate,openCtx,copyId,handleResize(optimistic PUT).epg-rowswitched fromonClicktoonPointerUpwith ane.target !== e.currentTargetguard so empty-row clicks still create-on-click but the tail of a block drag doesn't spawn a phantom modalTest plan
end_at - 5minor before midnightstart → endpreview🤖 Generated with Claude Code
Right-click any event block to open a context menu (Edit, Cancel, Copy schedule ID, Delete) — actions per status mirror the List view so the two surfaces stay in lockstep. Menu is viewport-clamped and dismisses on outside click / scroll, same pattern as the asset menu in the Library. Drag-to-resize works for pending schedules only (the schedules PUT rejects edits to running rows, and terminal statuses are read-only): - Drag the left edge to move the start time - Drag the right edge to move the end time - Drag the body to shift the whole block in time All gestures snap to 15-minute increments to match the new-schedule click snap. Minimum duration is clamped to 5 minutes; the block clamps to the visible day on both edges. While dragging the title shows the preview range ("Start time → end time") and the block lifts with a project-tinted shadow. A short pointer click (< 4px travel) still opens the edit modal — the click and drag share the same pointerdown so the operator never has to know which gesture they made first. Implementation: replaces the <button> block with a <div> hosting three zones (left handle / body / right handle). Pointer events with setPointerCapture so drags survive losing the cursor over the block, and pointerup demotes back to click if travel was below threshold. Optimistic local update on resize, PUT /schedules/:id with just the two changed time fields, refetch to reconcile. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>