@remotion/studio: Internal rename for timeline items#7866
Merged
Conversation
Co-authored-by: Jonny Burger <hi@jonny.io>
@remotion/studio: Rename timeline items@remotion/studio: Internal rename for timeline items
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — rename timeline row components to canonical *Item names and refactor the TimelineSelection discriminated union from a single row variant into explicit sequence*, sequence-prop, sequence-all-effects, sequence-effect, and sequence-effect-prop variants.
- Rename timeline components —
TimelineEffectGroupRow→TimelineEffectItem,TimelineEffectFieldRow→TimelineEffectPropItem,TimelineListItem→TimelineSequenceItem,TimelineSequenceFieldRow→TimelineSequencePropItem; all imports and call sites updated consistently. - Introduce explicit selection variants — replaces opaque
type: 'row'with a discriminated union where each variant corresponds to a knownauxiliaryKeyspattern frombuildTimelineTree, making the selection model self-documenting. - Add
getTimelineSelectionFromNodePathInfo— centralizes parsing ofSequenceNodePathInfointo the correctTimelineSelectionvariant; correctly handles all validauxiliaryKeysshapes ([],['controls', key],['effects'],['effects', index],['effects', index, key]) and returnsnullfor unrecognized patterns. - Update selection key generation —
getTimelineSelectionKeynow encodes the explicit variant type into the key string, which is safe because selection state is purely in-memory (SELECTION_ENABLEDis stillfalse). - Update delete/duplicate guards —
delete-selected-timeline-item.tsandduplicate-selected-timeline-item.tsnow match on the explicit union instead of inspectingauxiliaryKeysinline; behavior is preserved (sequenceandsequence-effectare deletable, props/groups are not). - Expand test coverage —
timeline-selection.test.tscovers all fivegetTimelineSelectionFromNodePathInfovariants plus the malformed-effect-index fallback tonull.
Kimi K2 | 𝕏
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — rename timeline row components to canonical *Item names and refactor the TimelineSelection discriminated union from a single row variant into explicit sequence*, sequence-prop, sequence-all-effects, sequence-effect, and sequence-effect-prop variants.
- Rename timeline components —
TimelineEffectGroupRow→TimelineEffectItem,TimelineEffectFieldRow→TimelineEffectPropItem,TimelineListItem→TimelineSequenceItem,TimelineSequenceFieldRow→TimelineSequencePropItem; all imports and call sites updated consistently. - Introduce explicit selection variants — replaces opaque
type: 'row'with a discriminated union where each variant corresponds to a knownauxiliaryKeyspattern frombuildTimelineTree, making the selection model self-documenting. - Add
getTimelineSelectionFromNodePathInfo— centralizes parsing ofSequenceNodePathInfointo the correctTimelineSelectionvariant; correctly handles all validauxiliaryKeysshapes ([],['controls', key],['effects'],['effects', index],['effects', index, key]) and returnsnullfor unrecognized patterns. - Update selection key generation —
getTimelineSelectionKeynow encodes the explicit variant type into the key string, which is safe because selection state is purely in-memory (SELECTION_ENABLEDis stillfalse). - Update delete/duplicate guards —
delete-selected-timeline-item.tsandduplicate-selected-timeline-item.tsnow match on the explicit union instead of inspectingauxiliaryKeysinline; behavior is preserved (sequenceandsequence-effectare deletable, props/groups are not). - Expand test coverage —
timeline-selection.test.tscovers all fivegetTimelineSelectionFromNodePathInfovariants plus the malformed-effect-index fallback tonull.
Kimi K2 | 𝕏
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.

Fixes #7858.
Summary
*Itemnames.sequence,sequence-prop,sequence-all-effects,sequence-effect, andsequence-effect-propvariants.Testing
bun test src/test/timeline-selection.test.tsbun run formattingfrompackages/studiobunx turbo run make --filter='@remotion/studio'bun run buildbunx turbo run lint formatting --filter='@remotion/studio'(passes with pre-existing Studio lint warnings)bun run stylecheck(blocked by known@remotion/lambda-goGo 1.22.2 environment limitation; package-specific Studio stylecheck passes)