🎥 Make videos programmatically with React
timeline arrows
Jonny Burger91da8a25194e
diff --git a/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx b/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsxindex 899cbdd5ec..91c2e2a072 100644--- a/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx+++ b/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx@@ -25,22 +25,19 @@ export const TimelineExpandArrowButton: React.FC<{readonly isExpanded: boolean;readonly onClick: () => void;readonly label: string;- readonly hasExpandableContent: boolean;-}> = ({isExpanded, onClick, label, hasExpandableContent}) => {+}> = ({isExpanded, onClick, label}) => {const style: React.CSSProperties = useMemo(() => {return {...arrowButton,transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)',- opacity: hasExpandableContent ? 1 : 0.2,};- }, [isExpanded, hasExpandableContent]);+ }, [isExpanded]);return (<buttontype="button"style={style}onClick={onClick}- disabled={!hasExpandableContent}aria-expanded={isExpanded}aria-label={`${isExpanded ? 'Collapse' : 'Expand'} ${label}`}>diff --git a/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx b/packages/studio/src/components/Timeline/TimelineExpandedRow.tsxindex 86333bd402..765e92f80d 100644--- a/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx+++ b/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx@@ -79,7 +79,6 @@ export const TimelineExpandedRow: React.FC<{isExpanded={isExpanded}onClick={() => toggleTrack(node.id)}label={`${node.label} section`}- hasExpandableContent/><span style={rowLabel}>{node.label}</span></div>diff --git a/packages/studio/src/components/Timeline/TimelineListItem.tsx b/packages/studio/src/components/Timeline/TimelineListItem.tsxindex a869345837..f8dad907bf 100644--- a/packages/studio/src/components/Timeline/TimelineListItem.tsx+++ b/packages/studio/src/components/Timeline/TimelineListItem.tsx@@ -14,7 +14,10 @@ import {ExpandedTracksContext} from '../ExpandedTracksProvider';import type {ComboboxValue} from '../NewComposition/ComboBox';import {showNotification} from '../Notifications/NotificationCenter';import {Padder} from './Padder';-import {TimelineExpandArrowButton} from './TimelineExpandArrowButton';+import {+ TimelineExpandArrowButton,+ TimelineExpandArrowSpacer,+} from './TimelineExpandArrowButton';import {TimelineExpandedSection} from './TimelineExpandedSection';import {TimelineLayerEye} from './TimelineLayerEye';import {TimelineStack} from './TimelineStack';@@ -229,12 +232,15 @@ export const TimelineListItem: React.FC<{/><Padder depth={nestedDepth} />{visualModeActive ? (- <TimelineExpandArrowButton- isExpanded={isExpanded}- onClick={onToggleExpand}- label="track properties"- hasExpandableContent={hasExpandableContent}- />+ hasExpandableContent ? (+ <TimelineExpandArrowButton+ isExpanded={isExpanded}+ onClick={onToggleExpand}+ label="track properties"+ />+ ) : (+ <TimelineExpandArrowSpacer />+ )) : null}<TimelineStacksequence={sequence}