refactor: address review — rename activateSiblingTimelines, opts arg, FIXME tracking

- Rename activateNestedChildTimelines → activateSiblingTimelines (matches player.ts)
- Use tl.play() instead of tl.paused(false) for consistency
- Convert positional activateChildren boolean to { activateChildren } opts
- Add FIXME(#969) to divergence test with tracking issue link
- Add [id="intro"] no-rewrite boundary test
- Add comment about deliberate no-restore behavior in render-seek path
This commit is contained in:
Miguel Ángel
2026-05-19 16:02:33 -04:00
parent e2f7f6a58a
commit 26450c1a27
3 changed files with 29 additions and 17 deletions
@@ -513,6 +513,17 @@ window.__afterTimeline = window.__timelines.scene;
expect(scoped).not.toMatch(/#intro\b/);
});
it('does not rewrite [id="intro"] attribute selectors', () => {
// The function only targets #intro hash selectors, not [id="intro"] attribute selectors
const result = scopeCssToComposition(
'[id="intro"] .title { color: red; }',
"intro",
undefined,
"intro",
);
expect(result).toContain('[id="intro"]');
});
it("wraps scripts with authored root id normalization for #id GSAP selectors", () => {
const { document } = parseHTML(`
<div data-composition-id="intro">
@@ -147,6 +147,8 @@ describe("inlineSubCompositions #ID selector scoping divergence", () => {
* Proper fix (follow-up): make the producer path add data-hf-authored-id
* to the host element when the inner root has an id attribute.
*/
// FIXME(#969): flip these assertions once the producer path adds
// data-hf-authored-id to the host element. See PR #965 "Proper fix (follow-up)".
it("documents the divergence: producer path lacks data-hf-authored-id element", () => {
const document = makeHostDocument("intro");
const host = document.querySelector('[data-composition-src="intro.html"]')!;