mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 22:20:14 +00:00
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:
co-authored by
Miguel Ángel
parent
ad5229af83
commit
d0a7f7d839
@@ -1,11 +1,6 @@
|
||||
import { useCallback, useMemo, useRef, useState, type DragEvent } from "react";
|
||||
import {
|
||||
STUDIO_INSPECTOR_PANELS_ENABLED,
|
||||
STUDIO_MOTION_PANEL_ENABLED,
|
||||
} from "../components/editor/manualEditingAvailability";
|
||||
import { readStudioMotionFromElement } from "../components/editor/studioMotion";
|
||||
import { STUDIO_INSPECTOR_PANELS_ENABLED } from "../components/editor/manualEditingAvailability";
|
||||
import type { StudioContextValue } from "../contexts/StudioContext";
|
||||
import type { DomEditSelection } from "../components/editor/domEditing";
|
||||
|
||||
interface StudioContextInput {
|
||||
projectId: string;
|
||||
@@ -66,10 +61,8 @@ export function buildStudioContextValue(input: StudioContextInput): StudioContex
|
||||
}
|
||||
|
||||
export interface InspectorState {
|
||||
selectedStudioMotion: ReturnType<typeof readStudioMotionFromElement> | null;
|
||||
layersPanelActive: boolean;
|
||||
designPanelActive: boolean;
|
||||
motionPanelActive: boolean;
|
||||
inspectorPanelActive: boolean;
|
||||
inspectorButtonActive: boolean;
|
||||
shouldShowSelectedDomBounds: boolean;
|
||||
@@ -79,32 +72,23 @@ export function useInspectorState(
|
||||
rightPanelTab: string,
|
||||
rightCollapsed: boolean,
|
||||
isPlaying: boolean,
|
||||
domEditSelection: DomEditSelection | null,
|
||||
isGestureRecording?: boolean,
|
||||
): InspectorState {
|
||||
// fallow-ignore-next-line complexity
|
||||
return useMemo(() => {
|
||||
const selectedStudioMotion =
|
||||
STUDIO_INSPECTOR_PANELS_ENABLED && domEditSelection
|
||||
? readStudioMotionFromElement(domEditSelection.element)
|
||||
: null;
|
||||
const layersPanelActive = STUDIO_INSPECTOR_PANELS_ENABLED && rightPanelTab === "layers";
|
||||
const designPanelActive = STUDIO_INSPECTOR_PANELS_ENABLED && rightPanelTab === "design";
|
||||
const motionPanelActive =
|
||||
STUDIO_INSPECTOR_PANELS_ENABLED && STUDIO_MOTION_PANEL_ENABLED && rightPanelTab === "motion";
|
||||
const inspectorPanelActive = layersPanelActive || designPanelActive || motionPanelActive;
|
||||
const inspectorPanelActive = layersPanelActive || designPanelActive;
|
||||
return {
|
||||
selectedStudioMotion,
|
||||
layersPanelActive,
|
||||
designPanelActive,
|
||||
motionPanelActive,
|
||||
inspectorPanelActive,
|
||||
inspectorButtonActive:
|
||||
STUDIO_INSPECTOR_PANELS_ENABLED && !rightCollapsed && inspectorPanelActive,
|
||||
shouldShowSelectedDomBounds:
|
||||
inspectorPanelActive && !rightCollapsed && !isPlaying && !isGestureRecording,
|
||||
};
|
||||
}, [rightPanelTab, rightCollapsed, isPlaying, domEditSelection, isGestureRecording]);
|
||||
}, [rightPanelTab, rightCollapsed, isPlaying, isGestureRecording]);
|
||||
}
|
||||
|
||||
// fallow-ignore-next-line complexity
|
||||
|
||||
Reference in New Issue
Block a user