Skip to content

🎥 Make videos programmatically with React

Keep timeline rows stable through transition wrappers

JonnyBurgerbb88884a8a98
diff --git a/packages/studio/src/components/Timeline/timeline-track-groups.ts b/packages/studio/src/components/Timeline/timeline-track-groups.ts
index 35a14dbe46..52a7457ad7 100644
--- a/packages/studio/src/components/Timeline/timeline-track-groups.ts
+++ b/packages/studio/src/components/Timeline/timeline-track-groups.ts
@@ -58,14 +58,20 @@ export const filterTimelineTrackContents = (
const hiddenSelfReferences = new Set<string>();
if (compactSeries) {
for (const {sequence} of tracks) {
- const parent =
- sequence.parent === null ? null : tracksById.get(sequence.parent);
+ let parent = sequence.parent === null ? null : byId.get(sequence.parent);
+ // Transition presentations insert hidden sequences around the scene.
+ // Its visible parent clip still represents the component's own wrapper.
+ while (parent && !parent.showInTimeline) {
+ parent = parent.parent === null ? undefined : byId.get(parent.parent);
+ }
+
if (
- parent?.sequence.timelineTrack?.role === 'clip' &&
- parent.sequence.showInTimeline &&
+ parent?.timelineTrack?.role === 'clip' &&
+ tracksById.has(parent.id) &&
+ parent.showInTimeline &&
sequence.singleChildComponent !== null &&
sequence.singleChildComponent !== undefined &&
- sequence.singleChildComponent === parent.sequence.singleChildComponent
+ sequence.singleChildComponent === parent.singleChildComponent
) {
// The scene clip already represents this component's own wrapper.
hiddenSelfReferences.add(sequence.id);