Skip to content

🎥 Make videos programmatically with React

`@remotion/studio`: Release Studio interactivity (#8271)

Jonny Burger08761c3e4738
diff --git a/packages/studio/src/components/PreviewToolbar.tsx b/packages/studio/src/components/PreviewToolbar.tsx
index 9138e72da3..8265e080e7 100644
--- a/packages/studio/src/components/PreviewToolbar.tsx
+++ b/packages/studio/src/components/PreviewToolbar.tsx
@@ -28,7 +28,6 @@ import {PlaybackRateSelector} from './PlaybackRateSelector';
import {PlayPause} from './PlayPause';
import {RenderButton} from './RenderButton';
import {SizeSelector} from './SizeSelector';
-import {ENABLE_OUTLINES} from './Timeline/TimelineSelection';
import {TimelineZoomControls} from './Timeline/TimelineZoomControls';
import {TimelineInOutPointToggle} from './TimelineInOutToggle';
@@ -239,11 +238,9 @@ export const PreviewToolbar: React.FC<{
<PreviewToolbarControl>
<CheckboardToggle />
</PreviewToolbarControl>
- {ENABLE_OUTLINES ? (
- <PreviewToolbarControl>
- <OutlineToggle />
- </PreviewToolbarControl>
- ) : null}
+ <PreviewToolbarControl>
+ <OutlineToggle />
+ </PreviewToolbarControl>
</>
) : null}
<Spacing x={1} />
diff --git a/packages/studio/src/components/SelectedOutlineOverlay.tsx b/packages/studio/src/components/SelectedOutlineOverlay.tsx
index 17c296b096..8ddbea84af 100644
--- a/packages/studio/src/components/SelectedOutlineOverlay.tsx
+++ b/packages/studio/src/components/SelectedOutlineOverlay.tsx
@@ -70,7 +70,6 @@ import {
} from './Timeline/timeline-translate-utils';
import {getLinkedScale} from './Timeline/TimelineScaleField';
import {
- ENABLE_OUTLINES,
getTimelineSequenceSelectionKey,
useTimelineSelection,
type TimelineSelection,
@@ -2448,7 +2447,7 @@ export const SelectedOutlineOverlay: React.FC<{
}, []);
const outlineTargets = useMemo((): SelectedOutlineTarget[] => {
- if (!ENABLE_OUTLINES || !editorShowOutlines) {
+ if (!editorShowOutlines) {
return [];
}
diff --git a/packages/studio/src/components/Timeline/TimelineDragHandler.tsx b/packages/studio/src/components/Timeline/TimelineDragHandler.tsx
index fb3c4b1ce3..fac28eb9be 100644
--- a/packages/studio/src/components/Timeline/TimelineDragHandler.tsx
+++ b/packages/studio/src/components/Timeline/TimelineDragHandler.tsx
@@ -26,11 +26,7 @@ import {
getScrollPositionForCursorOnRightEdge,
scrollToTimelineXOffset,
} from './timeline-scroll-logic';
-import {
- TIMELINE_SCRUBBER_ATTR,
- TIMELINE_TOP_DRAG,
- useTimelineSelection,
-} from './TimelineSelection';
+import {TIMELINE_SCRUBBER_ATTR} from './TimelineSelection';
import {redrawTimelineSliderFast} from './TimelineSlider';
import {TIMELINE_TIME_INDICATOR_HEIGHT} from './TimelineTimeIndicators';
@@ -64,7 +60,6 @@ export const TimelineDragHandler: React.FC = () => {
const {zoom: zoomMap} = useContext(TimelineZoomCtx);
const {canvasContent} = useContext(Internals.CompositionManager);
- const {canSelect, canSelectEasing} = useTimelineSelection();
const containerStyle: React.CSSProperties = useMemo(() => {
if (!canvasContent || canvasContent.type !== 'composition') {
@@ -75,11 +70,9 @@ export const TimelineDragHandler: React.FC = () => {
return {
...container,
width: 100 * zoom + '%',
- ...(TIMELINE_TOP_DRAG || canSelect || canSelectEasing
- ? {height: TIMELINE_TIME_INDICATOR_HEIGHT}
- : {}),
+ height: TIMELINE_TIME_INDICATOR_HEIGHT,
};
- }, [canSelect, canSelectEasing, canvasContent, zoomMap]);
+ }, [canvasContent, zoomMap]);
if (!canvasContent || canvasContent.type !== 'composition') {
return null;
diff --git a/packages/studio/src/components/Timeline/TimelineEffectItem.tsx b/packages/studio/src/components/Timeline/TimelineEffectItem.tsx
index 5a620cf33d..eaa22d4da6 100644
--- a/packages/studio/src/components/Timeline/TimelineEffectItem.tsx
+++ b/packages/studio/src/components/Timeline/TimelineEffectItem.tsx
@@ -20,7 +20,6 @@ import {TimelineRowChrome} from './TimelineRowChrome';
import {
getTimelineColor,
getTimelineSelectedLabelStyle,
- SELECTION_ENABLED,
useTimelineRowSelection,
} from './TimelineSelection';
@@ -162,7 +161,6 @@ export const TimelineEffectItem: React.FC<{
!validatedLocation.source;
const canReorder =
- SELECTION_ENABLED &&
previewConnected &&
effectStatus.type === 'can-update-effect' &&
Boolean(validatedLocation.source);
diff --git a/packages/studio/src/components/Timeline/TimelineExpandedKeyframeRow.tsx b/packages/studio/src/components/Timeline/TimelineExpandedKeyframeRow.tsx
index 89ebe29a72..38bec3eb2d 100644
--- a/packages/studio/src/components/Timeline/TimelineExpandedKeyframeRow.tsx
+++ b/packages/studio/src/components/Timeline/TimelineExpandedKeyframeRow.tsx
@@ -6,8 +6,6 @@ import type {getTimelineKeyframes} from './get-timeline-keyframes';
import {TimelineKeyframeDiamond} from './TimelineKeyframeDiamond';
import {TimelineKeyframeEasingLine} from './TimelineKeyframeEasingLine';
import {
- EASING_SELECTION_ENABLED,
- ENABLE_OUTLINES,
getTimelineSelectedTrackHighlightStyle,
useTimelineRowSelection,
} from './TimelineSelection';
@@ -30,10 +28,9 @@ const TimelineExpandedKeyframeRowUnmemoized: React.FC<{
}> = ({height, keyframes, canEditEasing, nodePathInfo, showSeparator}) => {
const timelineWidth = useContext(TimelineWidthContext);
const {selected: rowSelected} = useTimelineRowSelection(nodePathInfo);
- const easingSegments =
- (ENABLE_OUTLINES || EASING_SELECTION_ENABLED) && canEditEasing
- ? getTimelineEasingSegments(keyframes)
- : [];
+ const easingSegments = canEditEasing
+ ? getTimelineEasingSegments(keyframes)
+ : [];
return (
<>
diff --git a/packages/studio/src/components/Timeline/TimelineItemStack.tsx b/packages/studio/src/components/Timeline/TimelineItemStack.tsx
index f08cad05f5..2a5c514755 100644
--- a/packages/studio/src/components/Timeline/TimelineItemStack.tsx
+++ b/packages/studio/src/components/Timeline/TimelineItemStack.tsx
@@ -1,81 +1,15 @@
-import type {GitSource} from '@remotion/studio-shared';
-import React, {useCallback, useContext, useMemo, useState} from 'react';
+import React, {useMemo} from 'react';
import type {OriginalPosition} from '../../error-overlay/react-overlay/utils/get-source-map';
-import {StudioServerConnectionCtx} from '../../helpers/client-id';
-import {LIGHT_TEXT, VERY_LIGHT_TEXT} from '../../helpers/colors';
-import {getGitRefUrl} from '../../helpers/get-git-menu-item';
-import {openOriginalPositionInEditor} from '../../helpers/open-in-editor';
-import {Spacing} from '../layout';
-import {showNotification} from '../Notifications/NotificationCenter';
-import {Spinner} from '../Spinner';
-import {SELECTION_ENABLED} from './TimelineSelection';
+import {VERY_LIGHT_TEXT} from '../../helpers/colors';
import {getOriginalSourceAttribution} from './TimelineStack/source-attribution';
export const TimelineItemStack: React.FC<{
readonly originalLocation: OriginalPosition | null;
}> = ({originalLocation}) => {
- const [hovered, setHovered] = useState(false);
- const [opening, setOpening] = useState(false);
-
- const connectionStatus = useContext(StudioServerConnectionCtx)
- .previewServerState.type;
-
- const openEditor = useCallback(async (location: OriginalPosition) => {
- if (!window.remotion_editorName) {
- return;
- }
-
- setOpening(true);
- try {
- await openOriginalPositionInEditor(location);
- } catch (err) {
- showNotification((err as Error).message, 2000);
- } finally {
- setOpening(false);
- }
- }, []);
-
- const canOpenInEditor = Boolean(
- window.remotion_editorName &&
- connectionStatus === 'connected' &&
- originalLocation,
- );
-
- const canOpenInGitHub = Boolean(
- window.remotion_gitSource && originalLocation,
- );
- const hoverable = !SELECTION_ENABLED && (canOpenInEditor || canOpenInGitHub);
-
- const onClick = useCallback(() => {
- if (!originalLocation) {
- return;
- }
-
- if (canOpenInEditor) {
- openEditor(originalLocation);
- return;
- }
-
- if (canOpenInGitHub) {
- window.open(
- getGitRefUrl(window.remotion_gitSource as GitSource, originalLocation),
- '_blank',
- );
- }
- }, [canOpenInEditor, canOpenInGitHub, openEditor, originalLocation]);
-
- const onPointerEnter = useCallback(() => setHovered(true), []);
- const onPointerLeave = useCallback(() => setHovered(false), []);
-
const style = useMemo((): React.CSSProperties => {
return {
fontSize: 12,
- color: opening
- ? VERY_LIGHT_TEXT
- : hovered && hoverable
- ? LIGHT_TEXT
- : VERY_LIGHT_TEXT,
- cursor: hoverable ? 'pointer' : undefined,
+ color: VERY_LIGHT_TEXT,
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
@@ -86,28 +20,13 @@ export const TimelineItemStack: React.FC<{
userSelect: 'none',
WebkitUserSelect: 'none',
};
- }, [opening, hovered, hoverable]);
+ }, []);
if (!originalLocation) {
return null;
}
return (
- <>
- <div
- onPointerEnter={hoverable ? onPointerEnter : undefined}
- onPointerLeave={hoverable ? onPointerLeave : undefined}
- onClick={hoverable ? onClick : undefined}
- style={style}
- >
- {getOriginalSourceAttribution(originalLocation)}
- </div>
- {opening ? (
- <>
- <Spacing x={0.5} />
- <Spinner duration={0.5} size={12} />
- </>
- ) : null}
- </>
+ <div style={style}>{getOriginalSourceAttribution(originalLocation)}</div>
);
};
diff --git a/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx b/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
index 8eb9c818c4..c233ff9b53 100644
--- a/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
+++ b/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
@@ -43,9 +43,8 @@ import {useTimelineKeyframeTracks} from './TimelineKeyframeTracksContext';
import {
getTimelineSelectionFromNodePathInfo,
getTimelineSelectionKey,
- SELECTION_ENABLED,
- type TimelineSelection,
useTimelineSelection,
+ type TimelineSelection,
} from './TimelineSelection';
const controlsContainerStyle: React.CSSProperties = {
@@ -425,7 +424,7 @@ export const shouldShowTimelineKeyframeControls = ({
return true;
}
- return SELECTION_ENABLED && isKeyframedStatus(propStatus);
+ return isKeyframedStatus(propStatus);
};
export const TimelineKeyframeControls: React.FC<{
diff --git a/packages/studio/src/components/Timeline/TimelineMediaInfo.tsx b/packages/studio/src/components/Timeline/TimelineMediaInfo.tsx
index f202f702f2..437964b870 100644
--- a/packages/studio/src/components/Timeline/TimelineMediaInfo.tsx
+++ b/packages/studio/src/components/Timeline/TimelineMediaInfo.tsx
@@ -1,12 +1,7 @@
-import React, {useCallback, useMemo, useState} from 'react';
+import React, {useMemo} from 'react';
import {Internals} from 'remotion';
-import {LIGHT_TEXT, VERY_LIGHT_TEXT} from '../../helpers/colors';
-import {useSelectAsset} from '../use-select-asset';
-import {
- getTimelineAssetLinkInfo,
- openTimelineAssetLink,
-} from './timeline-asset-link';
-import {SELECTION_ENABLED} from './TimelineSelection';
+import {VERY_LIGHT_TEXT} from '../../helpers/colors';
+import {getTimelineAssetLinkInfo} from './timeline-asset-link';
const lineStyle: React.CSSProperties = {
whiteSpace: 'nowrap',
@@ -19,34 +14,12 @@ const lineStyle: React.CSSProperties = {
};
const useAssetLink = (src: string) => {
- const selectAsset = useSelectAsset();
- const [hovered, setHovered] = useState(false);
-
const linkInfo = useMemo(() => getTimelineAssetLinkInfo(src), [src]);
- const interactive = !SELECTION_ENABLED && linkInfo !== null;
-
- const onClick = useCallback(
- (e: React.MouseEvent) => {
- if (!linkInfo) {
- return;
- }
-
- e.preventDefault();
- e.stopPropagation();
-
- openTimelineAssetLink(linkInfo, selectAsset);
- },
- [linkInfo, selectAsset],
- );
-
- const onPointerEnter = useCallback(() => setHovered(true), []);
- const onPointerLeave = useCallback(() => setHovered(false), []);
const fileNameStyle: React.CSSProperties = useMemo(
() => ({
...lineStyle,
- color: interactive && hovered ? LIGHT_TEXT : VERY_LIGHT_TEXT,
- cursor: interactive ? 'pointer' : undefined,
+ color: VERY_LIGHT_TEXT,
textDecoration: 'none',
display: 'inline-block',
overflow: 'hidden',
@@ -55,15 +28,11 @@ const useAssetLink = (src: string) => {
userSelect: 'none',
WebkitUserSelect: 'none',
}),
- [interactive, hovered],
+ [],
);
return {
linkInfo,
- interactive,
- onClick,
- onPointerEnter,
- onPointerLeave,
fileNameStyle,
};
};
@@ -73,23 +42,10 @@ export const TimelineMediaInfo: React.FC<{
}> = ({src}) => {
const fileName = useMemo(() => Internals.getAssetDisplayName(src), [src]);
- const {
- linkInfo,
- interactive,
- onClick,
- onPointerEnter,
- onPointerLeave,
- fileNameStyle,
- } = useAssetLink(src);
+ const {linkInfo, fileNameStyle} = useAssetLink(src);
return (
- <div
- style={fileNameStyle}
- title={linkInfo ? linkInfo.title : fileName}
- onClick={interactive ? onClick : undefined}
- onPointerEnter={interactive ? onPointerEnter : undefined}
- onPointerLeave={interactive ? onPointerLeave : undefined}
- >
+ <div style={fileNameStyle} title={linkInfo ? linkInfo.title : fileName}>
{fileName}
</div>
);
diff --git a/packages/studio/src/components/Timeline/TimelineSelection.tsx b/packages/studio/src/components/Timeline/TimelineSelection.tsx
index f13fedb127..0a645a7d90 100644
--- a/packages/studio/src/components/Timeline/TimelineSelection.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSelection.tsx
@@ -18,6 +18,7 @@ import type {
import {TIMELINE_PADDING} from '../../helpers/timeline-layout';
import {timelineNodePathInfoToKey} from '../../helpers/timeline-node-path-key';
import {useKeybinding} from '../../helpers/use-keybinding';
+import {useZIndex} from '../../state/z-index';
import {TimelineClipboardKeybindings} from './TimelineClipboardKeybindings';
import {TimelineDeleteKeybindings} from './TimelineDeleteKeybindings';
@@ -61,14 +62,8 @@ export const getTimelineSelectedTrackHighlightStyle = (
width: timelineWidth,
});
-export const SELECTION_ENABLED = false;
-export const TIMELINE_TOP_DRAG = false;
-export const ENABLE_OUTLINES = false;
-export const TIMELINE_BACKGROUND = ENABLE_OUTLINES ? '#0F1113' : '#111';
-export const TIMELINE_TICKS_BACKGROUND = ENABLE_OUTLINES
- ? BACKGROUND
- : TIMELINE_BACKGROUND;
-export const EASING_SELECTION_ENABLED = false;
+export const TIMELINE_BACKGROUND = '#0F1113';
+export const TIMELINE_TICKS_BACKGROUND = BACKGROUND;
type TimelineSelectionBase = {
readonly nodePathInfo: SequenceNodePathInfo;
@@ -655,11 +650,9 @@ export const TimelineSelectionProvider: React.FC<{
}> = ({children}) => {
const {previewServerState} = useContext(StudioServerConnectionCtx);
const canSelect =
- (SELECTION_ENABLED || ENABLE_OUTLINES) &&
previewServerState.type === 'connected' &&
!window.remotion_isReadOnlyStudio;
const canSelectEasing =
- EASING_SELECTION_ENABLED &&
previewServerState.type === 'connected' &&
!window.remotion_isReadOnlyStudio;
const [selectedItems, setSelectedItems] = useState<
@@ -902,12 +895,17 @@ export const useCurrentTimelineSelectionStateAsRef = () => {
export const useTimelineMarqueeSelection = () => {
const {canSelect, canSelectEasing, getMarqueeSelection, selectItems} =
useTimelineSelection();
+ const {isHighestContext} = useZIndex();
const [marqueeRect, setMarqueeRect] = useState<TimelineMarqueeRect | null>(
null,
);
const onPointerDownCapture = useCallback(
(event: React.PointerEvent<HTMLDivElement>) => {
+ if (!isHighestContext) {
+ return;
+ }
+
if (event.button !== 0 || (!canSelect && !canSelectEasing)) {
return;
}
@@ -1011,7 +1009,13 @@ export const useTimelineMarqueeSelection = () => {
window.addEventListener('pointerup', onPointerUp);
window.addEventListener('pointercancel', onPointerCancel);
},
- [canSelect, canSelectEasing, getMarqueeSelection, selectItems],
+ [
+ canSelect,
+ canSelectEasing,
+ getMarqueeSelection,
+ isHighestContext,
+ selectItems,
+ ],
);
return {marqueeRect, onPointerDownCapture};
diff --git a/packages/studio/src/components/Timeline/TimelineSequence.tsx b/packages/studio/src/components/Timeline/TimelineSequence.tsx
index 655d1d14a1..88a5005dbb 100644
--- a/packages/studio/src/components/Timeline/TimelineSequence.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequence.tsx
@@ -16,9 +16,8 @@ import {AudioWaveform} from '../AudioWaveform';
import {LoopedTimelineIndicator} from './LoopedTimelineIndicators';
import {TimelineImageInfo} from './TimelineImageInfo';
import {
- TIMELINE_MARQUEE_ITEM_ATTR,
- TIMELINE_TOP_DRAG,
shouldSelectTimelineRowOnPointerDown,
+ TIMELINE_MARQUEE_ITEM_ATTR,
useTimelineMarqueeSelectableItem,
useTimelineRowSelection,
} from './TimelineSelection';
@@ -104,7 +103,7 @@ const TimelineSequenceCurrentFrame: React.FC<{
});
}
- if (TIMELINE_TOP_DRAG && fromCanUpdate) {
+ if (fromCanUpdate) {
onMoveDragPointerDown(e);
}
}
@@ -309,7 +308,6 @@ const TimelineSequenceInner: React.FC<{
}, [marginLeft, s.type, width]);
const showRightEdgeDragHandle =
- TIMELINE_TOP_DRAG &&
(s.type === 'sequence' || s.type === 'image') &&
!s.loopDisplay &&
!s.isInsideSeries &&
diff --git a/packages/studio/src/components/Timeline/TimelineSequenceItem.tsx b/packages/studio/src/components/Timeline/TimelineSequenceItem.tsx
index 00852463b9..0df05bd94a 100644
--- a/packages/studio/src/components/Timeline/TimelineSequenceItem.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequenceItem.tsx
@@ -17,8 +17,8 @@ import {ContextMenu} from '../ContextMenu';
import {
addEffectFromDragData,
getEffectDragData,
- hasExplicitEffectDragType,
hasEffectDragType,
+ hasExplicitEffectDragType,
} from '../effect-drag-and-drop';
import {
ExpandedTracksGetterContext,
@@ -45,7 +45,6 @@ import {TimelineMediaInfo} from './TimelineMediaInfo';
import {TimelineRowChrome} from './TimelineRowChrome';
import {
isTimelineSelectionModifierEvent,
- SELECTION_ENABLED,
useTimelineRowContainsSelection,
useTimelineRowSelection,
} from './TimelineSelection';
@@ -236,11 +235,10 @@ export const TimelineSequenceItem: React.FC<{
);
const parentId = sequence.parent ?? null;
const canReorderSequence =
- SELECTION_ENABLED &&
previewConnected &&
Boolean(nodePath && nodePathKey && validatedLocation?.source) &&
nodePathInfo?.numberOfSequencesWithThisNodePath === 1;
- const canHandleSequenceDrag = SELECTION_ENABLED && previewConnected;
+ const canHandleSequenceDrag = previewConnected;
const confirm = useConfirmationDialog();
const deleteDisabled = useMemo(
@@ -671,7 +669,7 @@ export const TimelineSequenceItem: React.FC<{
const onShowInEditorDoubleClick = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => {
- if (!SELECTION_ENABLED || !canOpenInEditor) {
+ if (!canOpenInEditor) {
return;
}
@@ -913,11 +911,7 @@ export const TimelineSequenceItem: React.FC<{
onDragLeave={canDropEffect ? onEffectDragLeave : undefined}
onDragOver={canDropEffect ? onEffectDragOver : undefined}
onDrop={canDropEffect ? onEffectDrop : undefined}
- onDoubleClick={
- SELECTION_ENABLED && canOpenInEditor
- ? onShowInEditorDoubleClick
- : undefined
- }
+ onDoubleClick={canOpenInEditor ? onShowInEditorDoubleClick : undefined}
>
<div style={labelContainerStyle}>
<TimelineSequenceName
diff --git a/packages/studio/src/components/Timeline/TimelineSequenceName.tsx b/packages/studio/src/components/Timeline/TimelineSequenceName.tsx
index c23ce0062f..26124d5fc7 100644
--- a/packages/studio/src/components/Timeline/TimelineSequenceName.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequenceName.tsx
@@ -1,9 +1,8 @@
-import React, {useCallback, useMemo, useState} from 'react';
+import React, {useMemo} from 'react';
import type {TSequence} from 'remotion';
import {
getTimelineColor,
getTimelineSelectedLabelStyle,
- SELECTION_ENABLED,
TIMELINE_SELECTED_LABEL_BACKGROUND,
} from './TimelineSelection';
@@ -22,23 +21,7 @@ export const TimelineSequenceName: React.FC<{
readonly selected: boolean;
readonly containsSelection: boolean;
}> = ({sequence, selected, containsSelection}) => {
- const [hovered, setHovered] = useState(false);
- const {documentationLink} = sequence;
- const hoverable = !SELECTION_ENABLED && documentationLink !== null;
-
- const onClick = useCallback(() => {
- if (documentationLink === null) {
- return;
- }
-
- window.open(documentationLink, '_blank', 'noopener,noreferrer');
- }, [documentationLink]);
-
- const onPointerEnter = useCallback(() => setHovered(true), []);
- const onPointerLeave = useCallback(() => setHovered(false), []);
-
const style = useMemo((): React.CSSProperties => {
- const hoverEffect = hovered && hoverable;
return {
alignItems: 'center',
alignSelf: 'stretch',
@@ -50,27 +33,18 @@ export const TimelineSequenceName: React.FC<{
color: getTimelineColor(selected, false),
userSelect: 'none',
WebkitUserSelect: 'none',
- textDecoration: hoverEffect ? 'underline' : 'none',
- cursor: hoverEffect ? 'pointer' : undefined,
+ textDecoration: 'none',
boxShadow:
containsSelection && !selected
? `inset 0 0 0 2px ${TIMELINE_SELECTED_LABEL_BACKGROUND}`
: undefined,
};
- }, [hovered, hoverable, selected, containsSelection]);
+ }, [selected, containsSelection]);
const text = getTruncatedDisplayName(sequence.displayName) || '<Sequence>';
return (
- <div
- onPointerEnter={hoverable ? onPointerEnter : undefined}
- onPointerLeave={hoverable ? onPointerLeave : undefined}
- title={
- documentationLink ? `Open documentation: ${documentationLink}` : text
- }
- style={style}
- onClick={hoverable ? onClick : undefined}
- >
+ <div title={text} style={style}>
{text}
</div>
);
diff --git a/packages/studio/src/components/Timeline/TimelineTimeIndicators.tsx b/packages/studio/src/components/Timeline/TimelineTimeIndicators.tsx
index 5970e525f2..781a0a7f4d 100644
--- a/packages/studio/src/components/Timeline/TimelineTimeIndicators.tsx
+++ b/packages/studio/src/components/Timeline/TimelineTimeIndicators.tsx
@@ -13,7 +13,7 @@ import {renderFrame} from '../../state/render-frame';
import {TimeValue} from '../TimeValue';
import {timelineVerticalScroll} from './timeline-refs';
import {getFrameIncrementFromWidth} from './timeline-scroll-logic';
-import {ENABLE_OUTLINES, TIMELINE_TICKS_BACKGROUND} from './TimelineSelection';
+import {TIMELINE_TICKS_BACKGROUND} from './TimelineSelection';
import {TimelineWidthContext} from './TimelineWidthProvider';
export const TIMELINE_TIME_INDICATOR_HEIGHT = 39;
@@ -23,9 +23,7 @@ const container: React.CSSProperties = {
position: 'absolute',
backgroundColor: TIMELINE_TICKS_BACKGROUND,
top: 0,
- borderBottom: ENABLE_OUTLINES
- ? `${TIMELINE_ITEM_BORDER_BOTTOM}px solid ${TIMELINE_TRACK_SEPARATOR}`
- : undefined,
+ borderBottom: `${TIMELINE_ITEM_BORDER_BOTTOM}px solid ${TIMELINE_TRACK_SEPARATOR}`,
};
const tick: React.CSSProperties = {
diff --git a/packages/studio/src/test/timeline-selection.test.ts b/packages/studio/src/test/timeline-selection.test.ts
index 8fccd9a0e5..7236449224 100644
--- a/packages/studio/src/test/timeline-selection.test.ts
+++ b/packages/studio/src/test/timeline-selection.test.ts
@@ -18,6 +18,7 @@ import {
} from '../components/selected-outline-uv';
import {
applySelectedOutlineDragAxisLock,
+ compensateTranslateForTransformOrigin,
getOutlineSelectionInteraction,
getSelectedEffectFieldsBySequenceKey,
getSelectedOutlineDragChanges,
@@ -31,7 +32,6 @@ import {
getSelectedOutlineScaleEdgeInfo,
getSelectedSequenceKeys,
getSequencesWithSelectableOutlines,
- compensateTranslateForTransformOrigin,
type SelectedOutlineDragState,
type SelectedOutlineRotationDragState,
type SelectedOutlineScaleDragState,
@@ -49,7 +49,6 @@ import {
} from '../components/Timeline/TimelineClipboardKeybindings';
import {getSelectedKeyframeControlNodePathInfos} from '../components/Timeline/TimelineKeyframeControls';
import {
- ENABLE_OUTLINES,
getClampedTimelineMarqueePoint,
getSelectableTimelineSequenceSelections,
getTimelineMarqueeSelection,
@@ -57,11 +56,9 @@ import {
getTimelineSelectionFromNodePathInfo,
getTimelineSequenceSelectionKey,
isTimelineSelectionModifierEvent,
- SELECTION_ENABLED,
shouldSelectTimelineRowOnPointerDown,
TIMELINE_BACKGROUND,
TIMELINE_TICKS_BACKGROUND,
- TIMELINE_TOP_DRAG,
timelineMarqueeRectsIntersect,
} from '../components/Timeline/TimelineSelection';
import {
@@ -73,8 +70,8 @@ import {
getTimelineSequenceFromDragValue,
} from '../components/Timeline/TimelineSequenceRightEdgeDragHandle';
import {
- parseTransformOrigin,
parsedTransformOriginToUv,
+ parseTransformOrigin,
serializeTransformOrigin,
} from '../components/Timeline/transform-origin-utils';
import type {SequenceNodePathInfo} from '../helpers/get-timeline-sequence-sort-key';
@@ -220,10 +217,6 @@ const makeFromPropStatuses = (
return propStatuses;
};
-test('Timeline selection should stay disabled until released publicly', () => {
- expect(SELECTION_ENABLED).toBe(false);
-});
-
test('timeline marquee rectangle intersection detects overlapping targets', () => {
expect(
timelineMarqueeRectsIntersect(
@@ -757,10 +750,6 @@ test('pasting an effect prop requires the same effect type and prop key', () =>
).toEqual({type: 'effect-type-mismatch'} satisfies PasteEffectPropTarget);
});
-test('Timeline top drag should not be enabled', () => {
- expect(TIMELINE_TOP_DRAG).toBe(false);
-});
-
test('Timeline duration drag applies the same delta to selected sequences', () => {
const schema = {} satisfies SequenceSchema;
const firstNodePathInfo = makeNodePathInfo(['body', 0], []);
@@ -1178,13 +1167,9 @@ test('Timeline from drag removes the prop at the default value', () => {
});
});
-test('Timeline outlines should not be enabled', () => {
- expect(ENABLE_OUTLINES).toBe(false);
-});
-
-test('Timeline colors should use the old palette when outlines are disabled', () => {
- expect(TIMELINE_BACKGROUND).toBe('#111');
- expect(TIMELINE_TICKS_BACKGROUND).toBe('#111');
+test('Timeline colors use the outlines palette', () => {
+ expect(TIMELINE_BACKGROUND).toBe('#0F1113');
+ expect(TIMELINE_TICKS_BACKGROUND).not.toBe(TIMELINE_BACKGROUND);
});
test('Timeline outlines visibility is enabled by default and persisted', () => {