Skip to content

Commit e985636

Browse files
committed
Merge remote-tracking branch 'upstream/release53' into bbc-release53
2 parents aeaedfd + 1417440 commit e985636

File tree

7 files changed

+47
-84
lines changed

7 files changed

+47
-84
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn lint-staged

packages/job-worker/src/playout/timeline/piece.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export function getPieceEnableInsidePart(
106106

107107
// If the part has an end time, we can consider post-roll
108108
if (partHasEndTime && partTimings.toPartPostroll) {
109-
if (!pieceEnable.duration) {
109+
if (pieceEnable.duration === undefined) {
110110
// make sure that the control object is shortened correctly
111111
pieceEnable.end = `#${partGroupId} - ${partTimings.toPartPostroll}`
112112
}

packages/webui/src/client/styles/shelf/shelf.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
left: 0;
1212
right: 60px;
1313
bottom: 0;
14-
z-index: 291;
14+
z-index: 289;
1515
box-shadow: 0 0 20px #000;
1616

1717
&.full-viewport {

packages/webui/src/client/styles/supportAndSwitchboardPanel.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
z-index: 290;
4343
min-height: rem(50px);
4444
max-width: rem(350px);
45+
color-scheme: light;
4546

4647
.support-pop-up-panel__actions {
4748
margin-top: 1em;

packages/webui/src/client/ui/PreviewPopUp/PreviewPopUpContext.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ export function convertSourceLayerItemToPreview(
170170
) {
171171
try {
172172
const payload = JSONBlobParse<NoraPayload>(item.content.previewPayload)
173-
const tableProps = Object.entries<unknown>(payload.content)
174-
.filter(([key, value]) => !(key.startsWith('_') || key.startsWith('@') || value === ''))
175-
.map(([key, value]) => ({ key, value }))
173+
const tableProps = payload.content
174+
? Object.entries<unknown>(payload.content)
175+
.filter(([key, value]) => !(key.startsWith('_') || key.startsWith('@') || value === ''))
176+
.map(([key, value]) => ({ key, value }))
177+
: []
176178

177179
return {
178180
contents: _.compact([

packages/webui/src/client/ui/Prompter/PrompterView.tsx

Lines changed: 18 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -321,18 +321,9 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
321321
const target = document.querySelector<HTMLElement>(`[data-part-instance-id="${partInstanceId}"]`)
322322

323323
if (!target) return
324-
const offsetTop = window.scrollY + target.offsetTop
325-
this._lastAnimation?.stop()
326-
this._lastAnimation = animate(
327-
window,
328-
{
329-
scrollY: offsetTop + -1 * scrollMargin,
330-
},
331-
{
332-
duration: 0.4,
333-
ease: 'easeOut',
334-
}
335-
)
324+
325+
const targetOffsetTop = target.getBoundingClientRect().top + window.scrollY
326+
this.animateScrollTo(targetOffsetTop - scrollMargin)
336327
}
337328
scrollToLive(): void {
338329
const scrollMargin = this.calculateScrollPosition()
@@ -341,37 +332,17 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
341332

342333
if (!current) return
343334

344-
const offsetTop = window.scrollY + current.offsetTop
345-
this._lastAnimation?.stop()
346-
this._lastAnimation = animate(
347-
window,
348-
{
349-
scrollY: offsetTop + -1 * scrollMargin,
350-
},
351-
{
352-
duration: 0.4,
353-
ease: 'easeOut',
354-
}
355-
)
335+
const targetOffsetTop = current.getBoundingClientRect().top + window.scrollY
336+
this.animateScrollTo(targetOffsetTop - scrollMargin)
356337
}
357338
scrollToNext(): void {
358339
const scrollMargin = this.calculateScrollPosition()
359340
const next = document.querySelector<HTMLElement>('.prompter .next')
360341

361342
if (!next) return
362343

363-
const offsetTop = window.scrollY + next.offsetTop
364-
this._lastAnimation?.stop()
365-
this._lastAnimation = animate(
366-
window,
367-
{
368-
scrollY: offsetTop + -1 * scrollMargin,
369-
},
370-
{
371-
duration: 0.4,
372-
ease: 'easeOut',
373-
}
374-
)
344+
const targetOffsetTop = next.getBoundingClientRect().top + window.scrollY
345+
this.animateScrollTo(targetOffsetTop - scrollMargin)
375346
}
376347
scrollToPrevious(): void {
377348
const scrollMargin = this.calculateScrollPosition()
@@ -380,18 +351,8 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
380351
const target = anchors[anchors.length - 2] || anchors[0]
381352
if (!target) return
382353

383-
const offsetTop = window.scrollY + target[0]
384-
this._lastAnimation?.stop()
385-
this._lastAnimation = animate(
386-
window,
387-
{
388-
scrollY: offsetTop + -1 * scrollMargin,
389-
},
390-
{
391-
duration: 0.4,
392-
ease: 'easeOut',
393-
}
394-
)
354+
const targetOffsetTop = target[0] + window.scrollY
355+
this.animateScrollTo(targetOffsetTop - scrollMargin)
395356
}
396357
scrollToFollowing(): void {
397358
const scrollMargin = this.calculateScrollPosition()
@@ -400,18 +361,16 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
400361
const target = anchors[0]
401362
if (!target) return
402363

403-
const offsetTop = window.scrollY + target[0]
364+
const targetOffsetTop = target[0] + window.scrollY
365+
this.animateScrollTo(targetOffsetTop - scrollMargin)
366+
}
367+
private animateScrollTo(scrollToPosition: number) {
404368
this._lastAnimation?.stop()
405-
this._lastAnimation = animate(
406-
window,
407-
{
408-
scrollY: offsetTop + -1 * scrollMargin,
409-
},
410-
{
411-
duration: 0.4,
412-
ease: 'easeOut',
413-
}
414-
)
369+
this._lastAnimation = animate(window.scrollY, scrollToPosition, {
370+
duration: 0.4,
371+
ease: 'easeOut',
372+
onUpdate: (latest: number) => window.scrollTo(0, latest),
373+
})
415374
}
416375
listAnchorPositions(startY: number, endY: number, sortDirection = 1): [number, Element][] {
417376
let foundPositions: [number, Element][] = []

packages/webui/src/client/ui/RundownView.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3178,6 +3178,26 @@ const RundownViewContent = translateWithTracker<IPropsWithReady, IState, ITracke
31783178
showStyleVariant={showStyleVariant}
31793179
/>
31803180
</ErrorBoundary>
3181+
<ErrorBoundary>
3182+
<Shelf
3183+
buckets={this.props.buckets}
3184+
isExpanded={
3185+
this.state.isInspectorShelfExpanded ||
3186+
(!this.state.wasShelfResizedByUser && this.state.shelfLayout?.openByDefault)
3187+
}
3188+
onChangeExpanded={this.onShelfChangeExpanded}
3189+
hotkeys={this.defaultHotkeys(t)}
3190+
playlist={this.props.playlist}
3191+
showStyleBase={this.props.showStyleBase}
3192+
showStyleVariant={this.props.showStyleVariant}
3193+
studioMode={this.props.userPermissions.studio}
3194+
onChangeBottomMargin={this.onChangeBottomMargin}
3195+
rundownLayout={this.state.shelfLayout}
3196+
shelfDisplayOptions={this.props.shelfDisplayOptions}
3197+
bucketDisplayFilter={this.props.bucketDisplayFilter}
3198+
studio={this.props.studio}
3199+
/>
3200+
</ErrorBoundary>
31813201
<ErrorBoundary>
31823202
{this.props.userPermissions.studio && !Settings.disableBlurBorder && (
31833203
<KeyboardFocusIndicator userPermissions={this.props.userPermissions}>
@@ -3314,26 +3334,6 @@ const RundownViewContent = translateWithTracker<IPropsWithReady, IState, ITracke
33143334
<ErrorBoundary>
33153335
<PointerLockCursor />
33163336
</ErrorBoundary>
3317-
<ErrorBoundary>
3318-
<Shelf
3319-
buckets={this.props.buckets}
3320-
isExpanded={
3321-
this.state.isInspectorShelfExpanded ||
3322-
(!this.state.wasShelfResizedByUser && this.state.shelfLayout?.openByDefault)
3323-
}
3324-
onChangeExpanded={this.onShelfChangeExpanded}
3325-
hotkeys={this.defaultHotkeys(t)}
3326-
playlist={this.props.playlist}
3327-
showStyleBase={this.props.showStyleBase}
3328-
showStyleVariant={this.props.showStyleVariant}
3329-
studioMode={this.props.userPermissions.studio}
3330-
onChangeBottomMargin={this.onChangeBottomMargin}
3331-
rundownLayout={this.state.shelfLayout}
3332-
shelfDisplayOptions={this.props.shelfDisplayOptions}
3333-
bucketDisplayFilter={this.props.bucketDisplayFilter}
3334-
studio={this.props.studio}
3335-
/>
3336-
</ErrorBoundary>
33373337
<ErrorBoundary>
33383338
{this.props.playlist && this.props.studio && this.props.showStyleBase && (
33393339
<RundownNotifier playlistId={this.props.playlist._id} studio={this.props.studio} />

0 commit comments

Comments
 (0)