Skip to content

🎥 Make videos programmatically with React

Merge pull request #11635 from remotion-dev/codex/fix-timeline-chevron-label-shift

Jonny Burgera23640393fa3
diff --cc packages/studio/src/components/Timeline/TimelineSequenceName.tsx
index 2c9c937d23,9d92ed82d0..f7403cb60e
--- a/packages/studio/src/components/Timeline/TimelineSequenceName.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequenceName.tsx
@@@ -151,8 -157,50 +157,50 @@@ export const TimelineSequenceName: Reac
);
}
+ if (chevronSlot !== 'none') {
+ // Keep the name's flex width fixed while its visible text uses the empty slot.
+ return (
+ <div
+ className="remotion-timeline-sequence-name-measure"
+ data-name={text}
+ title={text}
+ style={{
+ ...style,
+ backgroundColor: undefined,
+ boxShadow: undefined,
+ clipPath: chevronSlot === 'occupied' ? 'inset(0)' : undefined,
+ }}
+ >
+ <div
+ style={{
+ ...getTimelineSelectedLabelStyle(selected, false),
+ alignItems: 'center',
+ boxShadow: style.boxShadow,
+ boxSizing: 'border-box',
+ color: getTimelineColor(selected, false),
+ display: 'inline-flex',
+ fontFamily: LABEL_FONT_FAMILY,
+ fontSize: 12,
+ height: '100%',
+ left: 0,
+ lineHeight: 'normal',
+ maxWidth: `calc(100% + ${CHEVRON_SLOT_WIDTH}px)`,
+ overflow: 'hidden',
+ position: 'absolute',
+ textOverflow: 'ellipsis',
+ top: 0,
+ whiteSpace: 'nowrap',
+ width: 'max-content',
+ }}
+ >
+ {text}
+ </div>
+ </div>
+ );
+ }
+
return (
- <div title={text} style={style}>
+ <div role="group" aria-label={text} style={style}>
{text}
</div>
);