Skip to content
Source
Sign inSign up
TanStack/time

Drag-resize module #31

Openbart-krakowski(GitHub profile, opens in a new tab) opened this issue 0 comments

Parent

https://github.com/TanStack/time/issues/25

What to build

Extract drag and resize interaction into a proper module. The module translates pointer events into logical time deltas (minutes), validates the proposed change against availability and dependency constraints, and commits atomically on release.

The kernel never sees pixels. The consumer supplies a `pxPerMinute` (or equivalent) to the `ResizeController` at the adapter edge; the controller converts pointer delta → `deltaMinutes` and hands only logical values to the pipeline.

Acceptance criteria

  • `DragResizeModule` plugs into the kernel via the module API (#28)
  • `createResizeController()` returns a controller that accepts pointer events and emits `deltaMinutes` updates
  • `validateResize()` returns `{ valid, error? }` in logical units (minutes, not pixels) before the write commits
  • Resize operations respect availability windows and dependency constraints when those modules are also registered
  • Snapping (round to nearest N minutes) is configurable on the controller, not hardcoded
  • A resize that crosses a dependency constraint is blocked with a descriptive error
  • Removing the `DragResizeModule` causes drag-resize code to tree-shake out of the bundle

Blocked by

https://github.com/TanStack/time/issues/28

  1. bart-krakowski(GitHub profile, opens in a new tab) added labelsenhancement

Sign in to join this conversation.