@@ -1006,6 +1006,27 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
10061006 const isLastSegment =
10071007 rundownIndex === rundownArray . length - 1 && segmentIndex === segmentArray . length - 1
10081008
1009+ // Calculate placeholder height based on segment properties
1010+ const calculatePlaceholderHeight = ( segment : DBSegment ) : number => {
1011+ // Base height for a normal segment timeline
1012+ const BASE_SEGMENT_HEIGHT = 260
1013+ // Approximate height for dashboard panel (mini-shelf) when displayed
1014+ const DASHBOARD_PANEL_HEIGHT = 200
1015+ // Minimum height for hidden segments to prevent layout issues
1016+ const HIDDEN_SEGMENT_MIN_HEIGHT = 10
1017+
1018+ if ( segment . isHidden ) {
1019+ // Hidden segments don't render the timeline at all
1020+ // They only render the dashboard panel if showShelf is true
1021+ return segment . showShelf ? DASHBOARD_PANEL_HEIGHT : HIDDEN_SEGMENT_MIN_HEIGHT
1022+ }
1023+
1024+ // Normal segment: base timeline height + optional dashboard panel
1025+ return segment . showShelf ? BASE_SEGMENT_HEIGHT + DASHBOARD_PANEL_HEIGHT : BASE_SEGMENT_HEIGHT
1026+ }
1027+
1028+ const segmentPlaceholderHeight = calculatePlaceholderHeight ( segment )
1029+
10091030 return (
10101031 < ErrorBoundary key = { unprotectString ( segment . _id ) } >
10111032 < VirtualElement
@@ -1015,8 +1036,8 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
10151036 } ) }
10161037 id = { SEGMENT_TIMELINE_ELEMENT_ID + segment . _id }
10171038 margin = { '100% 0px 100% 0px' }
1018- initialShow = { globalIndex ++ < window . innerHeight / 260 }
1019- placeholderHeight = { 260 }
1039+ initialShow = { globalIndex ++ < window . innerHeight / segmentPlaceholderHeight }
1040+ placeholderHeight = { segmentPlaceholderHeight }
10201041 placeholderClassName = "placeholder-shimmer-element segment-timeline-placeholder"
10211042 width = "auto"
10221043 >
0 commit comments