Skip to content

Commit eeff788

Browse files
authored
Merge pull request #1398 from bbc/upstream/minishelf-in-all-views
feat: mini shelfview
2 parents da2bae0 + 0bad4dd commit eeff788

File tree

2 files changed

+81
-51
lines changed

2 files changed

+81
-51
lines changed

packages/webui/src/client/ui/SegmentList/SegmentListContainer.tsx

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { LIVELINE_HISTORY_SIZE as TIMELINE_LIVELINE_HISTORY_SIZE } from '../Segm
1313
import { Segments } from '../../collections'
1414
import { CorelibPubSub } from '@sofie-automation/corelib/dist/pubsub'
1515
import { UIPartInstances, UIParts } from '../Collections'
16+
import { RundownViewShelf } from '../RundownView/RundownViewShelf'
1617

1718
export const LIVELINE_HISTORY_SIZE = TIMELINE_LIVELINE_HISTORY_SIZE
1819

@@ -189,25 +190,39 @@ export const SegmentListContainer = withResolvedSegment<IProps>(function Segment
189190
// }, [subscriptionsReady, firstNonInvalidPart?.pieces.length])
190191

191192
return (
192-
<SegmentList
193-
id={props.id}
194-
ref={segmentRef}
195-
key={unprotectString(props.segmentui._id)}
196-
segment={props.segmentui}
197-
parts={props.parts}
198-
playlist={props.playlist}
199-
currentPartWillAutoNext={currentPartWillAutoNext}
200-
segmentNoteCounts={props.segmentNoteCounts}
201-
isLiveSegment={isLiveSegment}
202-
isNextSegment={isNextSegment}
203-
isQueuedSegment={props.playlist.queuedSegmentId === props.segmentui._id}
204-
showCountdownToSegment={props.showCountdownToSegment}
205-
fixedSegmentDuration={props.fixedSegmentDuration ?? false}
206-
hasAlreadyPlayed={props.hasAlreadyPlayed}
207-
onContextMenu={props.onContextMenu}
208-
onSwitchViewMode={props.onSwitchViewMode}
209-
onHeaderNoteClick={props.onHeaderNoteClick}
210-
onPieceDoubleClick={props.onPieceDoubleClick}
211-
/>
193+
<>
194+
<SegmentList
195+
id={props.id}
196+
ref={segmentRef}
197+
key={unprotectString(props.segmentui._id)}
198+
segment={props.segmentui}
199+
parts={props.parts}
200+
playlist={props.playlist}
201+
currentPartWillAutoNext={currentPartWillAutoNext}
202+
segmentNoteCounts={props.segmentNoteCounts}
203+
isLiveSegment={isLiveSegment}
204+
isNextSegment={isNextSegment}
205+
isQueuedSegment={props.playlist.queuedSegmentId === props.segmentui._id}
206+
showCountdownToSegment={props.showCountdownToSegment}
207+
fixedSegmentDuration={props.fixedSegmentDuration ?? false}
208+
hasAlreadyPlayed={props.hasAlreadyPlayed}
209+
onContextMenu={props.onContextMenu}
210+
onSwitchViewMode={props.onSwitchViewMode}
211+
onHeaderNoteClick={props.onHeaderNoteClick}
212+
onPieceDoubleClick={props.onPieceDoubleClick}
213+
/>
214+
{props.segmentui.showShelf && props.adLibSegmentUi && (
215+
<RundownViewShelf
216+
studio={props.studio}
217+
segment={props.segmentui}
218+
playlist={props.playlist}
219+
showStyleBase={props.showStyleBase}
220+
adLibSegmentUi={props.adLibSegmentUi}
221+
hotkeyGroup={unprotectString(props.segmentui._id) + '_RundownViewShelf'}
222+
miniShelfFilter={props.miniShelfFilter}
223+
studioMode={props.studioMode}
224+
/>
225+
)}
226+
</>
212227
)
213228
})

packages/webui/src/client/ui/SegmentStoryboard/SegmentStoryboardContainer.tsx

Lines changed: 46 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { MongoFieldSpecifierOnes } from '@sofie-automation/corelib/dist/mongo'
1717
import { PartInstance } from '@sofie-automation/meteor-lib/dist/collections/PartInstances'
1818
import { CorelibPubSub } from '@sofie-automation/corelib/dist/pubsub'
1919
import { UIPartInstances, UIParts } from '../Collections'
20+
import { RundownViewShelf } from '../RundownView/RundownViewShelf'
2021

2122
export const LIVELINE_HISTORY_SIZE = TIMELINE_LIVELINE_HISTORY_SIZE
2223

@@ -201,36 +202,50 @@ export const SegmentStoryboardContainer = withResolvedSegment<IProps>(function S
201202
}
202203

203204
return (
204-
<SegmentStoryboard
205-
id={props.id}
206-
ref={segmentRef}
207-
key={unprotectString(props.segmentui._id)}
208-
segment={props.segmentui}
209-
studio={props.studio}
210-
parts={props.parts}
211-
segmentNoteCounts={props.segmentNoteCounts}
212-
onItemClick={props.onPieceClick}
213-
onItemDoubleClick={props.onPieceDoubleClick}
214-
playlist={props.playlist}
215-
isLiveSegment={isLiveSegment}
216-
isNextSegment={isNextSegment}
217-
isQueuedSegment={props.playlist.queuedSegmentId === props.segmentui._id}
218-
hasRemoteItems={props.hasRemoteItems}
219-
hasGuestItems={props.hasGuestItems}
220-
currentPartWillAutoNext={currentPartWillAutoNext}
221-
hasAlreadyPlayed={props.hasAlreadyPlayed}
222-
followLiveLine={props.followLiveSegments}
223-
liveLineHistorySize={LIVELINE_HISTORY_SIZE}
224-
displayLiveLineCounter={props.displayLiveLineCounter}
225-
onContextMenu={props.onContextMenu}
226-
onScroll={onScroll}
227-
isLastSegment={props.isLastSegment}
228-
lastValidPartIndex={props.lastValidPartIndex}
229-
onHeaderNoteClick={props.onHeaderNoteClick}
230-
onSwitchViewMode={props.onSwitchViewMode}
231-
showCountdownToSegment={props.showCountdownToSegment}
232-
fixedSegmentDuration={props.fixedSegmentDuration}
233-
subscriptionsReady={initialSubscriptionsReady}
234-
/>
205+
<>
206+
<SegmentStoryboard
207+
id={props.id}
208+
ref={segmentRef}
209+
key={unprotectString(props.segmentui._id)}
210+
segment={props.segmentui}
211+
studio={props.studio}
212+
parts={props.parts}
213+
segmentNoteCounts={props.segmentNoteCounts}
214+
onItemClick={props.onPieceClick}
215+
onItemDoubleClick={props.onPieceDoubleClick}
216+
playlist={props.playlist}
217+
isLiveSegment={isLiveSegment}
218+
isNextSegment={isNextSegment}
219+
isQueuedSegment={props.playlist.queuedSegmentId === props.segmentui._id}
220+
hasRemoteItems={props.hasRemoteItems}
221+
hasGuestItems={props.hasGuestItems}
222+
currentPartWillAutoNext={currentPartWillAutoNext}
223+
hasAlreadyPlayed={props.hasAlreadyPlayed}
224+
followLiveLine={props.followLiveSegments}
225+
liveLineHistorySize={LIVELINE_HISTORY_SIZE}
226+
displayLiveLineCounter={props.displayLiveLineCounter}
227+
onContextMenu={props.onContextMenu}
228+
onScroll={onScroll}
229+
isLastSegment={props.isLastSegment}
230+
lastValidPartIndex={props.lastValidPartIndex}
231+
onHeaderNoteClick={props.onHeaderNoteClick}
232+
onSwitchViewMode={props.onSwitchViewMode}
233+
showCountdownToSegment={props.showCountdownToSegment}
234+
fixedSegmentDuration={props.fixedSegmentDuration}
235+
subscriptionsReady={initialSubscriptionsReady}
236+
/>
237+
{props.segmentui.showShelf && props.adLibSegmentUi && (
238+
<RundownViewShelf
239+
studio={props.studio}
240+
segment={props.segmentui}
241+
playlist={props.playlist}
242+
showStyleBase={props.showStyleBase}
243+
adLibSegmentUi={props.adLibSegmentUi}
244+
hotkeyGroup={unprotectString(props.segmentui._id) + '_RundownViewShelf'}
245+
miniShelfFilter={props.miniShelfFilter}
246+
studioMode={props.studioMode}
247+
/>
248+
)}
249+
</>
235250
)
236251
})

0 commit comments

Comments
 (0)