Skip to content

feat: LEAP-1924: Allow to edit Timeline span by drag-n-drop #7251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 21, 2025

Conversation

hlomzik
Copy link
Collaborator

@hlomzik hlomzik commented Mar 19, 2025

Allows smooth intuitive interaction to easily edit spans on timeline.

The biggest effort here was to fix undo/redo stack to keep UX convenient and predictable. Only one item in history is created with final state for these actions:

  • new region is drawn
  • existing region was edited by drag-n-drop
  • existing region was edited in info panel:
    • in input and the focus was moved away
    • in input by clicking on up/down arrows

Video#startDrawing(), Video#finishDrawing() and TimelineRegion#setRange() (former less correct setRanges()) were edited to accept mode to distinguish actions needed and region to find current region to edit it instead of creating a new one.

The main entry point is still Timeline/Views/Frames#onFrameScrub() — now extended to handle drawing new region, editing existing region and updating current position in a Video tag.

Smooth intuitive interaction to easily edit spans on timeline.

The biggest effort here was to fix undo/redo stack to keep UX convenient and predictable.
Only one item in history is created with final state for these actions:
- new region is drawn
- existing region was edited by drag-n-drop
- existing region was edited in info panel:
  - in input and the focus was moved away
  - in input by clicking on up/down arrows
@github-actions github-actions bot added the feat label Mar 19, 2025
Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 8bcc5b2
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/67dd1284519d68000870380d

Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 8bcc5b2
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/67dd12840ed3970008f59141

@hlomzik hlomzik requested review from bmartel and Gondragos March 19, 2025 02:32
@Gondragos
Copy link
Collaborator

Gondragos commented Mar 20, 2025

/fm sync

Workflow run

@hlomzik hlomzik requested a review from nick-skriabin March 20, 2025 10:57
@MihajloHoma
Copy link
Contributor

MihajloHoma commented Mar 21, 2025

/fm sync

Workflow run

@hlomzik hlomzik merged commit c0dab3b into develop Mar 21, 2025
34 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-leap-1924/edit-timeline-spans branch March 21, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants