Repository navigation
fix(core): a timeline set that hides a timed clip hides it in preview and render - #6351
Conversation
There was a problem hiding this comment.
Verdict: REQUEST CHANGES · 1 blocker · 0 important · 0 nits · head 443152a8
A script-hidden clip with timed children now renders half-hidden: the clip hides, but its timed descendants stay visible. Details ↓ inline.
Scope
Read the full diff, plus clipChainVisibleAt, unchangedSincePlayedFrom, clipReveal.ts, and the other code that writes clip visibility (engine screenshotService mask/restore keeps the priority; shader-transitions writes only visible; [style*="visibility: hidden"] selectors still match with !important). Ran the new tests (4/4 pass). Ran jsdom probes against this head and against the PR's base for: a nested timed child, an autoAlpha fade-out, and an autoAlpha from(). The fade cases behave correctly. CI was still running when I posted; no prior reviews.
Edit accuracy: accurate 271 (base branch 271), smooth 141 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
A
tl.set(clip, { visibility: 'hidden' }, 2.67)on a timed clip (data-start/data-duration) is overwritten by the runtime's per-seek visibility pass, which writesvisibleon every clip inside its window. In a render the pass runs after the timeline, so the clip stayed visible after 2.67; in preview the result depended on the order of the pass and the timeline within each seek. A render that starts mid-timeline (a chunk of a split render) hit it on its first frame.The pass now hides a clip with
visibility: hidden !important. A script's write replaces the declaration and drops the priority, so a plainhiddenon a clip inside its window is the script's and is left alone. This does not depend on earlier seeks. A clip authored with inlinevisibility: hiddenis still revealed by the pass, as before. Clips with no script involved are decided exactly as before.Checked on a fixture (one clip with a set at 2.67, one starting at 1 s): render snapshots at 2.6 s show both visible and at 2.7 s both hidden; before the change both stayed visible. New runtime tests cover the preview seek path and the render seek path, including a first seek past 2.67; they fail without the change. The 102 runtime test files pass.
Known gaps, left for a follow-up because both come from the runtime hiding clips through the same property the script writes:
hidden, and GSAP does not re-render a set it already passed.data-startstraight past the set leaves a clip with a later start visible: GSAP reads the runtime's ownhiddenas the set's start value, so hidden to hidden is skipped (trace in a render seek to 3 s: inlinevisibility: visibleafter the pass, timeline time 3).