Skip to content

feat: add timeline snap guides#515

Draft
AbhinRustagi wants to merge 1 commit intosiddharthvaddem:mainfrom
AbhinRustagi:feature/timeline-handle-snap
Draft

feat: add timeline snap guides#515
AbhinRustagi wants to merge 1 commit intosiddharthvaddem:mainfrom
AbhinRustagi:feature/timeline-handle-snap

Conversation

@AbhinRustagi
Copy link
Copy Markdown

@AbhinRustagi AbhinRustagi commented May 1, 2026

Pull Request Template

Description

Adds magnetic snap behavior to timeline handles. When dragging or resizing a trim, zoom, speed, annotation, or blur region, its edges snap to nearby region edges, the playhead, keyframes, and timeline bounds. A live amber guideline shows the active snap target during interaction; the drag tooltip previews the snapped values; on release, the region commits to the snapped position.

Motivation

Aligning two regions on the timeline is eyeball work right now

Type of Change

  • New Feature
  • Bug Fix
  • Refactor / Code Cleanup
  • Documentation Update
  • Other (please specify)

Related Issue(s)

Closes #514 and partially #511

Screenshots / Video

Screenshot (if applicable):

![Screenshot Description](path/to/screenshot.png)

Video (if applicable):

<video src="path/to/video.mp4" controls width="600"></video>

Testing

  1. Load a video into the editor.
  2. Add two zoom regions. Drag one near the edge of the other → its edge should snap to a perfect match, with an amber guideline appearing during the drag.
  3. Resize a zoom's left edge near the right edge of an adjacent trim → snap engages on the resized edge only; the other edge stays put.
  4. Drag any region near the playhead → snaps to the current time. (Guide line auto-hides when the snap target coincides with the
    playhead, so the green playback cursor isn't doubled.)
  5. Add a keyframe (default shortcut), then drag a region near it → snaps to the keyframe.
  6. Drag a region toward 0:00 or the video's end → snaps to the timeline bounds.
  7. Drag/resize an annotation or blur near another region's edge → snaps. Then drag two annotations onto each other → they still overlap freely (annotations/blurs are snap targets but not overlap constraints).
  8. Zoom the timeline in to the millisecond level and out to the full video → snap threshold scales with zoom (max(50ms, 1% of visible range)), so it stays usable at any zoom.

Checklist

  • I have performed a self-review of my code.
  • I have added any necessary screenshots or videos.
  • I have linked related issue(s) and updated the changelog if applicable.

Thank you for contributing!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 15ae117f-3d15-42d8-97e4-3c15a82ac8bd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 and usage tips.

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.

[Feature]: Add Snap Guides when resizing any of the rows in the timeline

1 participant