Skip to content

Commit aa8a3a4

Browse files
committed
Merge branch 'master' into release51
2 parents c4e1c88 + 2e5596b commit aa8a3a4

File tree

8 files changed

+101
-95
lines changed

8 files changed

+101
-95
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
{

meteor/client/ui/Prompter/PrompterView.tsx

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

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

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

383-
let currentPartElement: Element | null = null
384-
let currentPartElementAfter: Element | null = null
385-
let nextPartElementAfter: Element | null = null
383+
let currentPartElement: Element | null = null
384+
let currentPartElementAfter: Element | null = null
385+
let nextPartElementAfter: Element | null = null
386386

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

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

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

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

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

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

864870
private getPartStatus(prompterData: PrompterData, part: PrompterDataPart) {
865-
if (prompterData.currentPartInstanceId === part.id) {
871+
if (prompterData.currentPartInstanceId === part.partInstanceId) {
866872
return 'live'
867-
} else if (prompterData.nextPartInstanceId === part.id) {
873+
} else if (prompterData.nextPartInstanceId === part.partInstanceId) {
868874
return 'next'
869875
} else {
870876
return null
@@ -915,9 +921,10 @@ const PrompterContent = withTranslation()(
915921
for (const part of segment.parts) {
916922
lines.push(
917923
<div
918-
id={`partInstance_${part.id}`}
924+
id={`part_${part.id}`}
919925
data-obj-id={segment.id + '_' + part.id}
920-
key={'partInstance_' + part.id}
926+
data-part-instance-id={part.partInstanceId}
927+
key={'part_' + part.id}
921928
className={ClassNames('prompter-part', 'scroll-anchor', this.getPartStatus(prompterData, part))}
922929
>
923930
{part.title || 'N/A'}

meteor/client/ui/Prompter/prompter.ts

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

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/lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"version": "1.51.0-in-testing.1",
33
"npmClient": "yarn",
44
"useWorkspaces": true
5-
}
5+
}

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

0 commit comments

Comments
 (0)