Skip to content

Commit 479f696

Browse files
committed
Merge branch 'release51' into release52
2 parents 43e0564 + aa8a3a4 commit 479f696

File tree

7 files changed

+100
-94
lines changed

7 files changed

+100
-94
lines changed

.github/workflows/trivy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
echo ${{ env.SUMMARY }}
5757
5858
- name: Send Slack Notification
59-
uses: slackapi/slack-github-action@v1.26.0
59+
uses: slackapi/slack-github-action@v1.27.0
6060
with:
6161
payload: |
6262
{

packages/blueprints-integration/CHANGELOG.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
1010

1111
* stringify piece NoraContent payload SOFIE-3398 ([#1248](https://github.com/nrkno/sofie-core/issues/1248)) ([0613f74](https://github.com/nrkno/sofie-core/commit/0613f740c1e2f740d7d9c39bc72178e301f5f72f))
1212

13-
14-
15-
16-
1713
# [1.51.0-in-testing.1](https://github.com/nrkno/sofie-core/compare/v1.51.0-in-testing.0...v1.51.0-in-testing.1) (2024-09-06)
1814

1915

@@ -22,9 +18,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
2218
* stringify piece NoraContent payload SOFIE-3398 ([#1248](https://github.com/nrkno/sofie-core/issues/1248)) ([0613f74](https://github.com/nrkno/sofie-core/commit/0613f740c1e2f740d7d9c39bc72178e301f5f72f))
2319

2420

25-
26-
27-
2821
# [1.51.0-in-testing.0](https://github.com/nrkno/sofie-core/compare/v1.50.4...v1.51.0-in-testing.0) (2024-08-19)
2922

3023
## [1.50.5-LSG-updates](https://github.com/nrkno/sofie-core/compare/v1.50.4-LSG-updates...v1.50.5-LSG-updates) (2024-08-08)
@@ -93,7 +86,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
9386
- typed publications in gateways/peripheraldevices SOFIE-1183 ([#1056](https://github.com/nrkno/sofie-core/issues/1056)) ([0c3c1bf](https://github.com/nrkno/sofie-core/commit/0c3c1bfd2bb779034976dc34e49aa6e664ea874b))
9487
- update meteor to 2.12 SOFIE-2368 ([#931](https://github.com/nrkno/sofie-core/issues/931)) ([d7dfb71](https://github.com/nrkno/sofie-core/commit/d7dfb71d19405267cab5e2abc39794a80acb30b1))
9588

96-
## [1.50.5](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.4-LSG-updates...v1.50.5) (2024-08-08)
89+
90+
## [1.50.5](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.4...v1.50.5) (2024-09-19)
9791

9892
**Note:** Version bump only for package @sofie-automation/blueprints-integration
9993

packages/mos-gateway/CHANGELOG.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
55

66
# [1.51.0-in-testing.1](https://github.com/nrkno/sofie-core/compare/v1.51.0-in-testing.0...v1.51.0-in-testing.1) (2024-09-06)
77

8-
**Note:** Version bump only for package mos-gateway
9-
10-
11-
12-
138

149
# [1.51.0-in-testing.1](https://github.com/nrkno/sofie-core/compare/v1.51.0-in-testing.0...v1.51.0-in-testing.1) (2024-09-06)
1510

11+
1612
**Note:** Version bump only for package mos-gateway
1713

14+
# [1.51.0-in-testing.0](https://github.com/nrkno/sofie-core/compare/v1.50.4...v1.51.0-in-testing.0) (2024-08-19)
1815

16+
### Features
1917

18+
- Ensure peripheralDevice subdevice removal when requested ([#1227](https://github.com/nrkno/sofie-core/issues/1227)) ([d5cafe8](https://github.com/nrkno/sofie-core/commit/d5cafe8db5e453f87f8d46262f23e118b580d4d5))
2019

20+
## [1.50.5](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.4...v1.50.5) (2024-09-19)
2121

22-
# [1.51.0-in-testing.0](https://github.com/nrkno/sofie-core/compare/v1.50.4...v1.51.0-in-testing.0) (2024-08-19)
22+
**Note:** Version bump only for package mos-gateway
2323

24-
### Features
24+
## [1.50.4](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.3...v1.50.4) (2024-08-08)
25+
26+
**Note:** Version bump only for package mos-gateway
2527

26-
- Ensure peripheralDevice subdevice removal when requested ([#1227](https://github.com/nrkno/sofie-core/issues/1227)) ([d5cafe8](https://github.com/nrkno/sofie-core/commit/d5cafe8db5e453f87f8d46262f23e118b580d4d5))
2728

2829
## [1.50.5-LSG-updates](https://github.com/nrkno/sofie-core/compare/v1.50.4-LSG-updates...v1.50.5-LSG-updates) (2024-08-08)
2930

packages/playout-gateway/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
9595

9696

9797

98-
## [1.50.5](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.4-LSG-updates...v1.50.5) (2024-08-08)
98+
## [1.50.5](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.4...v1.50.5) (2024-09-19)
99+
100+
**Note:** Version bump only for package playout-gateway
99101

100102
**Note:** Version bump only for package playout-gateway
101103

packages/server-core-integration/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
5353
- refactor server-core-integration subscription handling to reduce duplication ([8eaedd2](https://github.com/nrkno/sofie-core/commit/8eaedd22e8efb9750f00ff472301c6b3f2d0f0af))
5454
- typed publications in gateways/peripheraldevices SOFIE-1183 ([#1056](https://github.com/nrkno/sofie-core/issues/1056)) ([0c3c1bf](https://github.com/nrkno/sofie-core/commit/0c3c1bfd2bb779034976dc34e49aa6e664ea874b))
5555

56-
## [1.50.5](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.4-LSG-updates...v1.50.5) (2024-08-08)
56+
## [1.50.5](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.4...v1.50.5) (2024-09-19)
5757

5858
**Note:** Version bump only for package @sofie-automation/server-core-integration
5959

60-
## [1.50.4](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.3-LSG-updates...v1.50.4) (2024-07-30)
60+
## [1.50.4](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.3...v1.50.4) (2024-08-08)
6161

6262
**Note:** Version bump only for package @sofie-automation/server-core-integration
6363

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

Lines changed: 79 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
289289
}
290290
scrollToPartInstance(partInstanceId: PartInstanceId): void {
291291
const scrollMargin = this.calculateScrollPosition()
292-
const target = document.querySelector<HTMLElement>(`#partInstance_${partInstanceId}`)
292+
const target = document.querySelector<HTMLElement>(`[data-part-instance-id="${partInstanceId}"]`)
293293

294294
if (target) {
295295
Velocity(document.body, 'finish')
@@ -377,63 +377,60 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
377377
private checkCurrentTakeMarkers = () => {
378378
const playlist = this.props.rundownPlaylist
379379

380-
if (playlist !== undefined) {
381-
const positionTop = window.scrollY
382-
const positionBottom = positionTop + window.innerHeight
380+
if (playlist === undefined) return
381+
const positionTop = window.scrollY
382+
const positionBottom = positionTop + window.innerHeight
383383

384-
let currentPartElement: Element | null = null
385-
let currentPartElementAfter: Element | null = null
386-
let nextPartElementAfter: Element | null = null
384+
let currentPartElement: Element | null = null
385+
let currentPartElementAfter: Element | null = null
386+
let nextPartElementAfter: Element | null = null
387387

388-
const anchors: Array<Element> = Array.from(document.querySelectorAll('.scroll-anchor'))
388+
const anchors: Array<Element> = Array.from(document.querySelectorAll('.scroll-anchor'))
389389

390-
for (let index = 0; index < anchors.length; index++) {
391-
const current = anchors[index]
392-
const next = index + 1 < anchors.length ? anchors[index + 1] : null
390+
for (let index = 0; index < anchors.length; index++) {
391+
const current = anchors[index]
392+
const next = index + 1 < anchors.length ? anchors[index + 1] : null
393393

394-
if (playlist.currentPartInfo && current.classList.contains(`live`)) {
395-
currentPartElement = current
396-
currentPartElementAfter = next
397-
}
398-
if (playlist.nextPartInfo && current.classList.contains(`next`)) {
399-
nextPartElementAfter = next
400-
}
394+
if (playlist.currentPartInfo && current.classList.contains(`live`)) {
395+
currentPartElement = current
396+
currentPartElementAfter = next
397+
}
398+
if (playlist.nextPartInfo && current.classList.contains(`next`)) {
399+
nextPartElementAfter = next
401400
}
401+
}
402402

403-
const currentPositionStart = currentPartElement
404-
? currentPartElement.getBoundingClientRect().top + positionTop
405-
: null
406-
const currentPositionEnd = currentPartElementAfter
407-
? currentPartElementAfter.getBoundingClientRect().top + positionTop
408-
: null
409-
410-
const nextPositionEnd = nextPartElementAfter
411-
? nextPartElementAfter.getBoundingClientRect().top + positionTop
412-
: null
413-
414-
const takeIndicator = document.querySelector('.take-indicator')
415-
if (takeIndicator) {
416-
if (currentPositionEnd && currentPositionEnd < positionTop) {
417-
// Display take "^" indicator
418-
takeIndicator.classList.remove('hidden')
419-
takeIndicator.classList.add('top')
420-
} else if (currentPositionStart && currentPositionStart > positionBottom) {
421-
// Display take "v" indicator
422-
takeIndicator.classList.remove('hidden', 'top')
423-
} else {
424-
takeIndicator.classList.add('hidden')
425-
}
403+
const currentPositionStart = currentPartElement
404+
? currentPartElement.getBoundingClientRect().top + positionTop
405+
: null
406+
const currentPositionEnd = currentPartElementAfter
407+
? currentPartElementAfter.getBoundingClientRect().top + positionTop
408+
: null
409+
410+
const nextPositionEnd = nextPartElementAfter ? nextPartElementAfter.getBoundingClientRect().top + positionTop : null
411+
412+
const takeIndicator = document.querySelector('.take-indicator')
413+
if (takeIndicator) {
414+
if (currentPositionEnd && currentPositionEnd < positionTop) {
415+
// Display take "^" indicator
416+
takeIndicator.classList.remove('hidden')
417+
takeIndicator.classList.add('top')
418+
} else if (currentPositionStart && currentPositionStart > positionBottom) {
419+
// Display take "v" indicator
420+
takeIndicator.classList.remove('hidden', 'top')
421+
} else {
422+
takeIndicator.classList.add('hidden')
426423
}
424+
}
427425

428-
const nextIndicator = document.querySelector('.next-indicator')
429-
if (nextIndicator) {
430-
if (nextPositionEnd && nextPositionEnd < positionTop) {
431-
// Display next "^" indicator
432-
nextIndicator.classList.remove('hidden')
433-
nextIndicator.classList.add('top')
434-
} else {
435-
nextIndicator.classList.add('hidden')
436-
}
426+
const nextIndicator = document.querySelector('.next-indicator')
427+
if (nextIndicator) {
428+
if (nextPositionEnd && nextPositionEnd < positionTop) {
429+
// Display next "^" indicator
430+
nextIndicator.classList.remove('hidden')
431+
nextIndicator.classList.add('top')
432+
} else {
433+
nextIndicator.classList.add('hidden')
437434
}
438435
}
439436
}
@@ -741,24 +738,32 @@ const PrompterContent = withTranslation()(
741738
// Go through the anchors and use the first one that we find:
742739
for (const scrollAnchor of scrollAnchors) {
743740
const anchor = document.getElementById(scrollAnchor.anchorId)
744-
if (anchor) {
745-
const { top } = anchor.getBoundingClientRect()
746-
747-
if (scrollAnchor.offset !== null) {
748-
window.scrollBy({
749-
top: top - scrollAnchor.offset,
750-
})
751-
// We've scrolled, exit the function!
752-
return
753-
} else {
754-
// Note: config.margin does not have to be taken into account here,
755-
// the css margins magically does it for us.
756-
window.scrollBy({
757-
top: top - readPosition,
758-
})
759-
// We've scrolled, exit the function!
760-
return
761-
}
741+
if (!anchor) continue
742+
743+
const { top } = anchor.getBoundingClientRect()
744+
745+
if (scrollAnchor.offset !== null) {
746+
this.props.config.debug &&
747+
logger.debug(
748+
`Selected anchor ${scrollAnchor.anchorId} as anchor element in view, restoring position ${scrollAnchor.offset}`
749+
)
750+
751+
window.scrollBy({
752+
top: top - scrollAnchor.offset,
753+
})
754+
// We've scrolled, exit the function!
755+
return
756+
} else {
757+
this.props.config.debug &&
758+
logger.debug(`Selected anchor ${scrollAnchor.anchorId} as anchor element outside of view, jumping to it`)
759+
760+
// Note: config.margin does not have to be taken into account here,
761+
// the css margins magically does it for us.
762+
window.scrollBy({
763+
top: top - readPosition,
764+
})
765+
// We've scrolled, exit the function!
766+
return
762767
}
763768
}
764769
// None of the anchors where found at this point.
@@ -770,6 +775,7 @@ const PrompterContent = withTranslation()(
770775
.join(', ')}`
771776
)
772777

778+
// TODO: In the past 4 months this has been here, this hasn't logged a single line, should we keep it?
773779
// Below is for troubleshooting, see if the anchor is in prompterData:
774780
if (!this.props.prompterData) {
775781
logger.error(`Read anchor troubleshooting: no prompterData`)
@@ -863,9 +869,9 @@ const PrompterContent = withTranslation()(
863869
}
864870

865871
private getPartStatus(prompterData: PrompterData, part: PrompterDataPart) {
866-
if (prompterData.currentPartInstanceId === part.id) {
872+
if (prompterData.currentPartInstanceId === part.partInstanceId) {
867873
return 'live'
868-
} else if (prompterData.nextPartInstanceId === part.id) {
874+
} else if (prompterData.nextPartInstanceId === part.partInstanceId) {
869875
return 'next'
870876
} else {
871877
return null
@@ -916,9 +922,10 @@ const PrompterContent = withTranslation()(
916922
for (const part of segment.parts) {
917923
lines.push(
918924
<div
919-
id={`partInstance_${part.id}`}
925+
id={`part_${part.id}`}
920926
data-obj-id={segment.id + '_' + part.id}
921-
key={'partInstance_' + part.id}
927+
data-part-instance-id={part.partInstanceId}
928+
key={'part_' + part.id}
922929
className={ClassNames('prompter-part', 'scroll-anchor', this.getPartStatus(prompterData, part))}
923930
>
924931
{part.title || 'N/A'}

packages/webui/src/client/ui/Prompter/prompter.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export interface PrompterDataSegment {
4141
parts: PrompterDataPart[]
4242
}
4343
export interface PrompterDataPart {
44-
id: PartInstanceId
44+
id: PartId
45+
partInstanceId: PartInstanceId
4546
title: string | undefined
4647
pieces: PrompterDataPiece[]
4748
}
@@ -210,7 +211,8 @@ export namespace PrompterAPI {
210211
for (let partIndex = 0; partIndex < partInstances.length; partIndex++) {
211212
const partInstance = partInstances[partIndex]
212213
const partData: PrompterDataPart = {
213-
id: partInstance._id,
214+
id: partInstance.part._id,
215+
partInstanceId: partInstance._id,
214216
title: partInstance.part.prompterTitle || partInstance.part.title,
215217
pieces: [],
216218
}

0 commit comments

Comments
 (0)