fix(studio): remove motion tab from right panel (#1391)

The motion panel was behind a feature flag defaulting to false and never
shipped. Remove the tab button, MotionPanel component, feature flag,
and all associated wiring (EaseCurveEditor, SpringEaseEditor,
MotionPanelFields, MotionPathOverlay). The underlying motion data
infrastructure (studioMotion, studioMotionOps) remains intact for the
GSAP panel.

Co-authored-by: Miguel Ángel <miguelangelsisi098@gmail.com>
This commit is contained in:
Miguel Ángel
2026-06-12 16:37:05 -04:00
committed by GitHub
co-authored by Miguel Ángel
parent ad5229af83
commit d0a7f7d839
16 changed files with 9 additions and 1244 deletions
@@ -27,15 +27,7 @@ import {
buildClearPathOffsetPatches,
buildClearBoxSizePatches,
buildClearRotationPatches,
buildMotionPatches,
buildClearMotionPatches,
} from "../components/editor/manualEditsDom";
import {
writeStudioMotionToElement,
clearStudioMotionFromElement,
applyStudioMotionFromDom,
type StudioGsapMotion,
} from "../components/editor/studioMotion";
import { fontFamilyFromAssetPath, type ImportedFontAsset } from "../components/editor/fontAssets";
import type { DomEditGroupPathOffsetCommit } from "../components/editor/DomEditOverlay";
import type { EditHistoryKind } from "../utils/editHistory";
@@ -400,64 +392,6 @@ export function useDomEditCommits({
[commitPositionPatchToHtml],
);
// ── Motion commits (HTML-attributebacked) ──
// fallow-ignore-next-line complexity
const handleDomMotionCommit = useCallback(
(
selection: DomEditSelection,
motion: Omit<StudioGsapMotion, "kind" | "target" | "updatedAt">,
) => {
// 1. Write motion data as JSON attribute on the element
writeStudioMotionToElement(selection.element, motion);
// 2. Apply the GSAP timeline from DOM attributes
let doc: Document | null = null;
try {
doc = previewIframeRef.current?.contentDocument ?? null;
} catch {
// cross-origin guard
}
if (doc) applyStudioMotionFromDom(doc);
// 3. Build patches and persist to HTML
const patches = buildMotionPatches(selection.element);
commitPositionPatchToHtml(selection, patches, {
label: "Set GSAP motion",
coalesceKey: `motion:${getDomEditTargetKey(selection)}`,
});
refreshDomEditSelectionFromPreview(selection);
},
[commitPositionPatchToHtml, previewIframeRef, refreshDomEditSelectionFromPreview],
);
// fallow-ignore-next-line complexity
const handleDomMotionClear = useCallback(
(selection: DomEditSelection) => {
const clearPatches = buildClearMotionPatches(selection.element);
// Get gsap from the preview window for proper cleanup
let gsap: { set?: (target: HTMLElement, vars: Record<string, unknown>) => void } | undefined;
try {
gsap = (previewIframeRef.current?.contentWindow as { gsap?: typeof gsap })?.gsap;
} catch {
// cross-origin guard
}
clearStudioMotionFromElement(selection.element, gsap);
let doc: Document | null = null;
try {
doc = previewIframeRef.current?.contentDocument ?? null;
} catch {
// cross-origin guard
}
if (doc) applyStudioMotionFromDom(doc);
commitPositionPatchToHtml(selection, clearPatches, {
label: "Clear GSAP motion",
coalesceKey: `motion:${getDomEditTargetKey(selection)}`,
skipRefresh: false,
});
refreshDomEditSelectionFromPreview(selection);
},
[commitPositionPatchToHtml, previewIframeRef, refreshDomEditSelectionFromPreview],
);
// fallow-ignore-next-line complexity
const handleDomEditElementDelete = useCallback(
// fallow-ignore-next-line complexity
@@ -592,8 +526,6 @@ export function useDomEditCommits({
handleDomBoxSizeCommit,
handleDomRotationCommit,
handleDomManualEditsReset,
handleDomMotionCommit,
handleDomMotionClear,
handleDomEditElementDelete,
handleDomZIndexReorderCommit,
};