Skip to content

Commit 1b386e6

Browse files
committed
chore(studio): remove fully rolled-out studio feature flags
Six default-true studio feature flags, each reachable under two env names (12 VITE_STUDIO_* vars total), all shipped default-on 7+ weeks ago: - VITE_STUDIO_ENABLE_PREVIEW_MANUAL_DRAGGING / _PREVIEW_MANUAL_EDITING_ENABLED - VITE_STUDIO_ENABLE_INSPECTOR_PANELS / _INSPECTOR_PANELS_ENABLED - VITE_STUDIO_ENABLE_BLOCKS_PANEL / _BLOCKS_PANEL_ENABLED - VITE_STUDIO_ENABLE_GSAP_PANEL / _GSAP_PANEL_ENABLED - VITE_STUDIO_ENABLE_KEYFRAMES / _KEYFRAMES_ENABLED - VITE_STUDIO_ENABLE_RAZOR_TOOL / _RAZOR_TOOL_ENABLED Each flag was left at its default, so the off branch was unreachable. The disabled-state code it kept alive goes with it: the greyed-out Inspector button, the inspector-off reset effect in useDomSelection, the three selection kill-switch early-returns, and the tab redirect in normalizeStudioUrlPanelTab (whose options param had no real caller). No behavior change.
1 parent 87791fd commit 1b386e6

25 files changed

Lines changed: 236 additions & 427 deletions

packages/studio/src/App.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import {
4343
import type { DomEditSelection } from "./components/editor/domEditing";
4444
import { StudioHeader } from "./components/StudioHeader";
4545
import { useGestureCommit } from "./hooks/useGestureCommit";
46-
import { STUDIO_KEYFRAMES_ENABLED } from "./components/editor/manualEditingAvailability";
4746
import { GestureTrailOverlay } from "./components/editor/GestureTrailOverlay";
4847
import { StudioLeftSidebar } from "./components/StudioLeftSidebar";
4948
import { EditorShell } from "./components/EditorShell";
@@ -263,9 +262,7 @@ export function StudioApp() {
263262
onUngroupSelection: () => domEditSessionRef.current.handleUngroupSelection(),
264263
activeCompPath,
265264
forceReloadSdkSession: sdkHandle.forceReload,
266-
onToggleRecording: STUDIO_KEYFRAMES_ENABLED
267-
? () => handleToggleRecordingRef.current()
268-
: undefined,
265+
onToggleRecording: () => handleToggleRecordingRef.current(),
269266
});
270267
const sidebarTabRef = useRef({
271268
select: (t: SidebarTab) => leftSidebarRef.current?.selectTab(t),
@@ -367,7 +364,7 @@ export function StudioApp() {
367364
isGestureRecordingRef,
368365
});
369366
handleToggleRecordingRef.current = handleToggleRecording;
370-
const recordingToggle = STUDIO_KEYFRAMES_ENABLED ? handleToggleRecording : undefined;
367+
const recordingToggle = handleToggleRecording;
371368
const canvasRectRef = useRef<DOMRect | null>(null);
372369
useLayoutEffect(() => {
373370
if (gestureState !== "recording" || !previewIframe) {

packages/studio/src/components/StudioHeader.tsx

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { useRef, type MouseEvent } from "react";
22
import { RotateCcw, RotateCw, Camera } from "../icons/SystemIcons";
3-
import {
4-
STUDIO_INSPECTOR_PANELS_ENABLED,
5-
STUDIO_MANUAL_EDITING_DISABLED_TITLE,
6-
} from "./editor/manualEditingAvailability";
73
import { getHistoryShortcutLabel } from "../utils/studioHelpers";
84
import { useStudioShellContext } from "../contexts/StudioContext";
95
import { usePanelLayoutContext } from "../contexts/PanelLayoutContext";
@@ -328,16 +324,10 @@ export function StudioHeader({
328324
<span>{capturing ? "Capturing…" : "Capture"}</span>
329325
</a>
330326
</Tooltip>
331-
<Tooltip
332-
label={
333-
STUDIO_INSPECTOR_PANELS_ENABLED ? "Inspector" : STUDIO_MANUAL_EDITING_DISABLED_TITLE
334-
}
335-
side="bottom"
336-
>
327+
<Tooltip label="Inspector" side="bottom">
337328
<button
338329
type="button"
339330
onClick={() => {
340-
if (!STUDIO_INSPECTOR_PANELS_ENABLED) return;
341331
if (rightCollapsed || !inspectorPanelActive) {
342332
trackStudioEvent("panel_toggle", { panel: "inspector", collapsed: false });
343333
setRightPanelTab("design");
@@ -349,18 +339,13 @@ export function StudioHeader({
349339
// the panel shouldn't deselect the element.
350340
setRightCollapsed(true);
351341
}}
352-
disabled={!STUDIO_INSPECTOR_PANELS_ENABLED}
353342
aria-pressed={inspectorButtonActive}
354343
className={`h-7 flex items-center gap-1.5 px-2.5 rounded-md text-[11px] font-medium border transition-colors active:scale-[0.98] ${
355344
inspectorButtonActive
356345
? "text-studio-accent bg-studio-accent/10 border-studio-accent/30"
357-
: STUDIO_INSPECTOR_PANELS_ENABLED
358-
? "text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800 border-transparent"
359-
: "cursor-not-allowed border-transparent text-neutral-700"
346+
: "text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800 border-transparent"
360347
}`}
361-
aria-label={
362-
STUDIO_INSPECTOR_PANELS_ENABLED ? "Inspector" : STUDIO_MANUAL_EDITING_DISABLED_TITLE
363-
}
348+
aria-label="Inspector"
364349
>
365350
<svg
366351
width="12"

packages/studio/src/components/StudioRightPanel.tsx

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ import { PanelTabButton } from "./PanelTabButton";
1010
import { usePreviewVariablesStore } from "../hooks/previewVariablesStore";
1111
import type { RenderJob } from "./renders/useRenderQueue";
1212
import type { BlockParam } from "@hyperframes/core/registry";
13-
import {
14-
STUDIO_FLAT_INSPECTOR_ENABLED,
15-
STUDIO_INSPECTOR_PANELS_ENABLED,
16-
} from "./editor/manualEditingAvailability";
13+
import { STUDIO_FLAT_INSPECTOR_ENABLED } from "./editor/manualEditingAvailability";
1714
import type { Composition } from "@hyperframes/sdk";
1815
import type { EditHistoryKind } from "../utils/editHistory";
1916
import { useSlideshowPersist, type UseSlideshowPersistParams } from "../hooks/useSlideshowPersist";
@@ -229,8 +226,7 @@ export function StudioRightPanel({
229226
setRightPanelTab,
230227
});
231228
const designPaneOpen = inspectorTabActive && rightInspectorPanes.design && designPanelActive;
232-
const layersPaneOpen =
233-
inspectorTabActive && rightInspectorPanes.layers && STUDIO_INSPECTOR_PANELS_ENABLED;
229+
const layersPaneOpen = inspectorTabActive && rightInspectorPanes.layers;
234230

235231
const handleInspectorPaneButtonClick = (pane: "design" | "layers") => {
236232
if (!inspectorTabActive) {
@@ -483,22 +479,18 @@ export function StudioRightPanel({
483479
) : (
484480
<>
485481
<div className="flex min-w-0 items-center gap-1 overflow-hidden border-b border-neutral-800 px-3 py-2">
486-
{STUDIO_INSPECTOR_PANELS_ENABLED && (
487-
<>
488-
<PanelTabButton
489-
label="Design"
490-
tooltip="Element styles and properties"
491-
active={designPaneOpen}
492-
onClick={() => handleInspectorPaneButtonClick("design")}
493-
/>
494-
<PanelTabButton
495-
label="Layers"
496-
tooltip="Composition layer stack"
497-
active={layersPaneOpen}
498-
onClick={() => handleInspectorPaneButtonClick("layers")}
499-
/>
500-
</>
501-
)}
482+
<PanelTabButton
483+
label="Design"
484+
tooltip="Element styles and properties"
485+
active={designPaneOpen}
486+
onClick={() => handleInspectorPaneButtonClick("design")}
487+
/>
488+
<PanelTabButton
489+
label="Layers"
490+
tooltip="Composition layer stack"
491+
active={layersPaneOpen}
492+
onClick={() => handleInspectorPaneButtonClick("layers")}
493+
/>
502494
<PanelTabButton
503495
label={renderJobs.length > 0 ? `Renders (${renderJobs.length})` : "Renders"}
504496
tooltip="Render queue and exports"

0 commit comments

Comments
 (0)