mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-08 10:46:06 +00:00
fix(studio): keep useGsapTweenCache under the size cap + correct non-sticky drill test (#1770)
- extract deduplicateKeyframes + synthesizeFlatTweenKeyframes into gsapTweenSynth.ts so useGsapTweenCache.ts drops from 628 to 573 lines (600-line cap) - the drilled-into-group selection test asserted the old sticky behavior; the code is intentionally non-sticky (clicking outside exits the group and resolves the clicked element), so the test now asserts that
This commit is contained in:
@@ -154,7 +154,7 @@ describe("resolveDomEditSelection — data-hf-group capture", () => {
|
||||
expect(scoped).not.toContain("outside");
|
||||
});
|
||||
|
||||
it("returns null when clicking outside the group the user is drilled into", async () => {
|
||||
it("exits the drilled-into group and selects the outside element (non-sticky drill)", async () => {
|
||||
const { parent, inner } = buildNestedGroups();
|
||||
const outside = document.createElement("div");
|
||||
outside.id = "outside";
|
||||
@@ -167,6 +167,8 @@ describe("resolveDomEditSelection — data-hf-group capture", () => {
|
||||
document.body.removeChild(parent);
|
||||
document.body.removeChild(outside);
|
||||
|
||||
expect(selection).toBeNull();
|
||||
// Drill-in is non-sticky: clicking outside the active group exits it and
|
||||
// resolves the clicked element normally (rather than selecting nothing).
|
||||
expect(selection?.id).toBe("outside");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user