@@ -2730,6 +2730,27 @@ const RundownViewContent = translateWithTracker<IPropsWithReady, IState, ITracke
27302730 const isLastSegment =
27312731 rundownIndex === rundownArray . length - 1 && segmentIndex === segmentArray . length - 1
27322732
2733+ // Calculate placeholder height based on segment properties
2734+ const calculatePlaceholderHeight = ( segment : DBSegment ) : number => {
2735+ // Base height for a normal segment timeline
2736+ const BASE_SEGMENT_HEIGHT = 260
2737+ // Approximate height for dashboard panel (mini-shelf) when displayed
2738+ const DASHBOARD_PANEL_HEIGHT = 200
2739+ // Minimum height for hidden segments to prevent layout issues
2740+ const HIDDEN_SEGMENT_MIN_HEIGHT = 10
2741+
2742+ if ( segment . isHidden ) {
2743+ // Hidden segments don't render the timeline at all
2744+ // They only render the dashboard panel if showShelf is true
2745+ return segment . showShelf ? DASHBOARD_PANEL_HEIGHT : HIDDEN_SEGMENT_MIN_HEIGHT
2746+ }
2747+
2748+ // Normal segment: base timeline height + optional dashboard panel
2749+ return segment . showShelf ? BASE_SEGMENT_HEIGHT + DASHBOARD_PANEL_HEIGHT : BASE_SEGMENT_HEIGHT
2750+ }
2751+
2752+ const segmentPlaceholderHeight = calculatePlaceholderHeight ( segment )
2753+
27332754 return (
27342755 < ErrorBoundary key = { unprotectString ( segment . _id ) } >
27352756 < VirtualElement
@@ -2739,8 +2760,8 @@ const RundownViewContent = translateWithTracker<IPropsWithReady, IState, ITracke
27392760 } ) }
27402761 id = { SEGMENT_TIMELINE_ELEMENT_ID + segment . _id }
27412762 margin = { '100% 0px 100% 0px' }
2742- initialShow = { globalIndex ++ < window . innerHeight / 260 }
2743- placeholderHeight = { 260 }
2763+ initialShow = { globalIndex ++ < window . innerHeight / segmentPlaceholderHeight }
2764+ placeholderHeight = { segmentPlaceholderHeight }
27442765 placeholderClassName = "placeholder-shimmer-element segment-timeline-placeholder"
27452766 width = "auto"
27462767 >
0 commit comments