Skip to content

Commit 3e93a5f

Browse files
committed
Merge branch 'release51'
2 parents e266bf2 + 0ae53c4 commit 3e93a5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+813
-266
lines changed

meteor/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.51.2](https://github.com/nrkno/tv-automation-server-core/compare/v1.51.1...v1.51.2) (2024-11-21)
6+
7+
8+
### Bug Fixes
9+
10+
* Include previousPartInstance in check to orphan segments rather than remove them. ([2c113b5](https://github.com/nrkno/tv-automation-server-core/commit/2c113b58b205198d13f0fc7e2114704311eb915b))
11+
* updatePartInstancesSegmentIds: take into account when multiple segments have been merged into one. ([bdab8c4](https://github.com/nrkno/tv-automation-server-core/commit/bdab8c4e4ee1e67a3568cccc98106bb7f1258673))
12+
513
## [1.51.0-in-testing.3](https://github.com/nrkno/sofie-core/compare/v1.51.0-in-testing.2...v1.51.0-in-testing.3) (2024-09-25)
614

715
## [1.51.0-in-testing.2](https://github.com/nrkno/sofie-core/compare/v1.51.0-in-testing.1...v1.51.0-in-testing.2) (2024-09-24)

meteor/client/lib/notifications/NotificationCenterPanel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ class NotificationPopUp extends React.Component<IPopUpProps> {
110110
key={i}
111111
className={ClassNames(
112112
'btn',
113-
['default', 'primary'].indexOf(action.type) ? 'btn-primary' : 'btn-default'
113+
['default', 'primary'].indexOf(action.type) ? 'btn-primary' : 'btn-default',
114+
'mls'
114115
)}
115116
onClick={(e) => this.triggerEvent(action, e)}
116117
>

meteor/client/styles/_itemTypeColors.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ $segment-layer-background-local: #9a2bd8;
3535
$segment-layer-background-local--second: darken($segment-layer-background-local, 10%);
3636
$segment-layer-background-studio-screen: #641fb3;
3737

38+
$step-counter-background-studio-screen: #2a005b;
39+
3840
$segment-item-disabled-background: #898989;
3941
$segment-item-disabled-color: #c9c9c9;
4042

@@ -78,6 +80,10 @@ $layer-types: join($layer-types-solid, $layer-types-gradient);
7880
}
7981
}
8082
}
83+
84+
&.studio-screen {
85+
--segment-piece-step-counter-background: #{$step-counter-background-studio-screen};
86+
}
8187
}
8288

8389
@mixin piece-colors {
@@ -251,6 +257,10 @@ $layer-types: join($layer-types-solid, $layer-types-gradient);
251257
}
252258
}
253259
}
260+
261+
&.studio-screen {
262+
--segment-piece-step-counter-background: #{$step-counter-background-studio-screen};
263+
}
254264
}
255265

256266
@mixin item-type-borders {

meteor/client/styles/rundownView.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,7 +2149,7 @@ svg.icon {
21492149
vertical-align: top;
21502150
margin-right: 0.2em;
21512151
margin-top: 0.1em;
2152-
background: $segment-piece-step-counter-background;
2152+
background: var(--segment-piece-step-counter-background, #{$segment-piece-step-counter-background});
21532153
display: inline-block;
21542154
padding: 0 0.3em;
21552155
color: $segment-piece-step-counter;
@@ -2907,7 +2907,7 @@ svg.icon {
29072907
position: absolute;
29082908
top: 0;
29092909
left: 0;
2910-
background: $segment-piece-step-counter-background;
2910+
background: var(--segment-piece-step-counter-background, #{$segment-piece-step-counter-background});
29112911
padding: 0 0.2em;
29122912
font-weight: 400;
29132913
text-shadow: 0 0 1px #000, 0.5px 0.5px 8px rgba(0, 0, 0, 0.8);
@@ -3282,7 +3282,7 @@ svg.icon {
32823282
.segment-storyboard__piece__step-chevron,
32833283
.segment-opl__main-piece__label__step-chevron {
32843284
margin-right: 0.2em;
3285-
background: $segment-piece-step-counter-background;
3285+
background: var(--segment-piece-step-counter-background, #{$segment-piece-step-counter-background});
32863286
display: inline-block;
32873287
padding: 0 0.2em;
32883288
color: $segment-piece-step-counter;

meteor/client/ui/ActiveRundownView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ export function ActiveRundownView({ studioId }: Readonly<{ studioId: StudioId }>
3131
[studioId]
3232
)
3333

34-
useSetDocumentClass('dark', 'vertical-overflow-only')
35-
3634
if (!subsReady) {
3735
return (
3836
<div className="rundown-view rundown-view--loading">
@@ -62,6 +60,8 @@ export function ActiveRundownView({ studioId }: Readonly<{ studioId: StudioId }>
6260
function NotFoundMessage({ message }: Readonly<{ message: string }>) {
6361
const { t } = useTranslation()
6462

63+
useSetDocumentClass('dark', 'vertical-overflow-only')
64+
6565
return (
6666
<div className="rundown-view rundown-view--unpublished">
6767
<div className="rundown-view__label">

meteor/client/ui/Prompter/prompter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@ export namespace PrompterAPI {
250250
const piece = pieceInstance.piece
251251
const sourceLayer = sourceLayers[piece.sourceLayerId]
252252

253-
if (!piece.content || !sourceLayer || sourceLayer.type !== SourceLayerType.SCRIPT) break
253+
if (!piece.content || !sourceLayer || sourceLayer.type !== SourceLayerType.SCRIPT) continue
254254

255255
const content = piece.content as ScriptContent
256-
if (!content.fullScript) break
257-
if (piecesIncluded.indexOf(piece._id) >= 0) break // piece already included in prompter script
256+
if (!content.fullScript) continue
257+
if (piecesIncluded.indexOf(piece._id) >= 0) continue // piece already included in prompter script
258258

259259
piecesIncluded.push(piece._id)
260260
partData.pieces.push({

meteor/client/ui/SegmentStoryboard/SegmentStoryboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ export const SegmentStoryboard = React.memo(
676676
>
677677
<div
678678
className={classNames('segment-storyboard__part-list', {
679-
loading: !props.subscriptionsReady /* */,
679+
loading: !props.subscriptionsReady,
680680
})}
681681
style={!animateScrollLeft ? { transform: `translateX(-${scrollLeft}px)` } : undefined}
682682
>
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react'
12
import { ISourceLayer, SourceLayerType } from '@sofie-automation/blueprints-integration'
23
import { PartId, PartInstanceId } from '@sofie-automation/corelib/dist/dataModel/Ids'
34
import { UIStudio } from '../../../../../lib/api/studios'
@@ -27,31 +28,32 @@ export interface IProps {
2728
isNext: boolean
2829
}
2930

30-
export default function renderThumbnail(props: Readonly<IProps>): JSX.Element {
31+
export const ThumbnailRenderer = React.memo(function ThumbnailRenderer(props: Readonly<IProps>): JSX.Element {
3132
const type = props.layer?.type
33+
3234
switch (type) {
3335
case SourceLayerType.VT:
3436
case SourceLayerType.LIVE_SPEAK:
35-
return VTThumbnailRenderer(props)
37+
return <VTThumbnailRenderer {...props} />
3638
case SourceLayerType.CAMERA:
3739
case SourceLayerType.REMOTE:
38-
return CameraThumbnailRenderer(props)
40+
return <CameraThumbnailRenderer {...props} />
3941
case SourceLayerType.SPLITS:
40-
return SplitsThumbnailRenderer(props)
42+
return <SplitsThumbnailRenderer {...props} />
4143
case SourceLayerType.GRAPHICS:
4244
case SourceLayerType.LOWER_THIRD:
4345
case SourceLayerType.STUDIO_SCREEN:
44-
return GraphicsThumbnailRenderer(props)
46+
return <GraphicsThumbnailRenderer {...props} />
4547
case SourceLayerType.LOCAL:
46-
return LocalThumbnailRenderer(props)
48+
return <LocalThumbnailRenderer {...props} />
4749
case SourceLayerType.AUDIO:
4850
case SourceLayerType.SCRIPT:
4951
case SourceLayerType.TRANSITION:
5052
case SourceLayerType.UNKNOWN:
5153
case undefined:
52-
return DefaultThumbnailRenderer(props)
54+
return <DefaultThumbnailRenderer {...props} />
5355
default:
5456
assertNever(type)
55-
return DefaultThumbnailRenderer(props)
57+
return <DefaultThumbnailRenderer {...props} />
5658
}
57-
}
59+
})

meteor/client/ui/SegmentStoryboard/StoryboardPartThumbnail/StoryboardPartThumbnail.tsx

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { SourceLayerType } from '@sofie-automation/blueprints-integration'
22
import classNames from 'classnames'
3-
import React, { useEffect, useState } from 'react'
3+
import React, { useMemo, useState } from 'react'
44
import { PartExtended, PieceExtended } from '../../../lib/RundownResolver'
55
import { findPieceExtendedToShowFromOrderedResolvedInstances } from '../../PieceIcons/utils'
66
import StudioContext from '../../RundownView/StudioContext'
@@ -31,30 +31,27 @@ export const StoryboardPartThumbnail = React.memo(function StoryboardPartThumbna
3131
isLive,
3232
isNext,
3333
}: Readonly<IProps>) {
34-
const [mainPiece, setMainPiece] = useState<PieceExtended | undefined>(findMainPiece(part.pieces))
34+
const mainPiece = useMemo<PieceExtended | undefined>(() => findMainPiece(part.pieces), [part.pieces])
3535
const [highlight] = useState(false)
3636

37-
useEffect(() => {
38-
const newMainPiece = findMainPiece(part.pieces)
39-
setMainPiece(newMainPiece)
40-
}, [part.pieces])
41-
4237
return mainPiece ? (
4338
<StudioContext.Consumer>
44-
{(studio) => (
45-
<StoryboardPartThumbnailInner
46-
piece={mainPiece}
47-
isLive={isLive}
48-
isNext={isNext}
49-
layer={mainPiece?.sourceLayer}
50-
studio={studio}
51-
partId={part.partId}
52-
partInstanceId={part.instance._id}
53-
highlight={highlight}
54-
partAutoNext={part.instance.part.autoNext ?? false}
55-
partPlannedStoppedPlayback={part.instance.timings?.plannedStoppedPlayback}
56-
/>
57-
)}
39+
{(studio) =>
40+
studio ? (
41+
<StoryboardPartThumbnailInner
42+
piece={mainPiece}
43+
isLive={isLive}
44+
isNext={isNext}
45+
layer={mainPiece?.sourceLayer}
46+
studio={studio}
47+
partId={part.partId}
48+
partInstanceId={part.instance._id}
49+
highlight={highlight}
50+
partAutoNext={part.instance.part.autoNext ?? false}
51+
partPlannedStoppedPlayback={part.instance.timings?.plannedStoppedPlayback}
52+
/>
53+
) : null
54+
}
5855
</StudioContext.Consumer>
5956
) : (
6057
<div

meteor/client/ui/SegmentStoryboard/StoryboardPartThumbnail/StoryboardPartThumbnailInner.tsx

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ISourceLayer } from '@sofie-automation/blueprints-integration'
33
import { PieceExtended } from '../../../lib/RundownResolver'
44
import { getElementDocumentOffset, OffsetPosition } from '../../../utils/positions'
55
import { getElementHeight, getElementWidth } from '../../../utils/dimensions'
6-
import renderThumbnail from './Renderers/ThumbnailRendererFactory'
6+
import { ThumbnailRenderer } from './Renderers/ThumbnailRendererFactory'
77
import { PieceElement } from '../../SegmentContainer/PieceElement'
88
import { UIStudio } from '../../../../lib/api/studios'
99
import { PartId, PartInstanceId } from '@sofie-automation/corelib/dist/dataModel/Ids'
@@ -15,7 +15,7 @@ interface IProps {
1515
partPlannedStoppedPlayback: number | undefined
1616
layer: ISourceLayer | undefined
1717
piece: PieceExtended
18-
studio: UIStudio | undefined
18+
studio: UIStudio
1919
isLive: boolean
2020
isNext: boolean
2121
highlight?: boolean
@@ -87,22 +87,21 @@ export function StoryboardPartThumbnailInner({
8787
onPointerMove={onPointerMove}
8888
ref={thumbnailEl}
8989
>
90-
{studio &&
91-
renderThumbnail({
92-
partId,
93-
partInstanceId,
94-
partAutoNext,
95-
partPlannedStoppedPlayback,
96-
hoverScrubTimePosition: mousePosition * (piece.instance.piece.content.sourceDuration || 0),
97-
hovering: hover,
98-
layer: layer,
99-
height,
100-
originPosition: origin,
101-
pieceInstance: piece,
102-
studio,
103-
isLive,
104-
isNext,
105-
})}
90+
<ThumbnailRenderer
91+
partId={partId}
92+
partInstanceId={partInstanceId}
93+
partAutoNext={partAutoNext}
94+
partPlannedStoppedPlayback={partPlannedStoppedPlayback}
95+
hoverScrubTimePosition={mousePosition * (piece.instance.piece.content.sourceDuration || 0)}
96+
hovering={hover}
97+
layer={layer}
98+
height={height}
99+
originPosition={origin}
100+
pieceInstance={piece}
101+
studio={studio}
102+
isLive={isLive}
103+
isNext={isNext}
104+
/>
106105
</PieceElement>
107106
)
108107
}

0 commit comments

Comments
 (0)