Skip to content

feat(object): alt-drag on object number and wave type parameter - #296

Merged
heypoom merged 1 commit into
mainfrom
alt-drag-object-number
Sep 16, 2026
Merged

heypoom merged 1 commit into
mainfrom
alt-drag-object-number

Conversation

@heypoom

@heypoom heypoom commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Adds an ability to alt-drag on object's integer, float and waveform type parameter to alternate between them.

Summary by CodeRabbit

  • New Features
    • Added Alt-drag controls for adjusting numeric object parameters directly in the editor.
    • Added Alt-drag waveform cycling for oscillator objects between sine, square, sawtooth, and triangle.
    • Added tooltip hints describing available drag interactions.
    • Drag operations support bounds, valid options, precision, and undo as a single edit.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 6f68b6d1-f4c0-484e-8a31-794979c91d10

📥 Commits

Reviewing files that changed from the base of the PR and between 4f1ca46 and 2ce575f.

📒 Files selected for processing (5)
  • docs/design-docs/specs/20-object-nodes.md
  • ui/src/objects/object/ObjectNode.svelte
  • ui/src/objects/object/parameter-drag.test.ts
  • ui/src/objects/object/parameter-drag.ts
  • ui/src/objects/object/useObjectParameterDrag.svelte.ts

📝 Walkthrough

Walkthrough

Adds Alt-drag editing for numeric object parameters and osc~ waveforms. The implementation validates calculated values, updates locked object nodes, records one undoable edit per drag, blocks native node dragging, and displays tooltip hints.

Changes

Object parameter dragging

Layer / File(s) Summary
Drag rules and validation
docs/design-docs/specs/20-object-nodes.md, ui/src/objects/object/parameter-drag.ts, ui/src/objects/object/parameter-drag.test.ts
Defines numeric stepping and oscillator waveform cycling. Applies bounds, precision, options, validators, and finite-value checks. Tests numeric and waveform behavior.
Object node drag flow
ui/src/objects/object/useObjectParameterDrag.svelte.ts, ui/src/objects/object/ObjectNode.svelte
Handles Alt-pointer dragging, live updates, pointer cancellation, undo commits, native drag suppression, cleanup, and tooltip hints. Wires the composable to locked object nodes.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Pointer
  participant ObjectNode
  participant useObjectParameterDrag
  participant parameter-drag
  participant objectDataTracker
  Pointer->>ObjectNode: Alt-drag indexed parameter
  ObjectNode->>useObjectParameterDrag: Handle pointer movement
  useObjectParameterDrag->>parameter-drag: Calculate validated value
  parameter-drag-->>useObjectParameterDrag: Return numeric value or waveform
  useObjectParameterDrag->>ObjectNode: Apply live update
  useObjectParameterDrag->>objectDataTracker: Commit one undoable edit
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alt-drag-object-number

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@heypoom
heypoom force-pushed the alt-drag-object-number branch from c6a1883 to 0ff9b0d Compare September 16, 2026 17:05
@heypoom
heypoom force-pushed the alt-drag-object-number branch from 0ff9b0d to 2ce575f Compare September 16, 2026 17:07
@heypoom
heypoom merged commit cbabd8b into main Sep 16, 2026
1 of 2 checks passed
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