feat(timeline): proportional stretch of multi-block selections - #175
Merged
boidushya merged 8 commits intoAug 26, 2026
Merged
Conversation
boidushya
approved these changes
Aug 26, 2026
boidushya
left a comment
Member
There was a problem hiding this comment.
Thanks for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dragging the boundary edge of a multi-block selection now performs a proportional stretch anchored at the opposite side of the selection, instead of resizing a single word:
Syllable groups are deliberately NOT expanded for stretch (unlike nudge).
Behaviour details
updateLinesWithHistorywithpropagateToSiblings: false, mirroring the nudge gesture — ensuring undo restores in a single step.minWordDurationand the audio bounds; growth lands flush against the blocking neighbour instead of crossing it. Cross-line selections are clamped independently per line (consistent with nudge semantics).Implementation
stretch-targets.ts(new)newX = A + (x−A)·k(five clamp categories, NaN guard)stretch-drag.ts(new)planStretchDragqualification: ≥2 blocks, dragged block must be selected and at selection extreme edgestretch-selection.ts(new)stretchSelectionspure mapping (anchor: "start" | "end")use-selection-stretch.ts(new)word-track.tsxhandleResizeStarttries the stretch first (+18 net lines), falls back to plain resizelines-slice.ts/types.tssetTransientLinesexplicit entry: dedicated for gesture preview, JSDoc declares contract "no history/dirty mutation, preserves array reference, caller responsible for restore and external write validation"