Skip to content

Commit

Permalink
Merge branch 'release51' into release52
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarpl committed Sep 19, 2024
2 parents 43e0564 + aa8a3a4 commit 479f696
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
echo ${{ env.SUMMARY }}
- name: Send Slack Notification
uses: slackapi/slack-github-action@v1.26.0
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
Expand Down
10 changes: 2 additions & 8 deletions packages/blueprints-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

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





# [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)


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





# [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)

## [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)
Expand Down Expand Up @@ -93,7 +86,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
- 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))
- 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))

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

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

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

Expand Down
17 changes: 9 additions & 8 deletions packages/mos-gateway/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

# [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)

**Note:** Version bump only for package mos-gateway





# [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)


**Note:** Version bump only for package mos-gateway

# [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)

### Features

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

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

# [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)
**Note:** Version bump only for package mos-gateway

### Features
## [1.50.4](https://github.com/nrkno/tv-automation-server-core/compare/v1.50.3...v1.50.4) (2024-08-08)

**Note:** Version bump only for package mos-gateway

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

## [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)

Expand Down
4 changes: 3 additions & 1 deletion packages/playout-gateway/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline



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

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

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

Expand Down
4 changes: 2 additions & 2 deletions packages/server-core-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
- refactor server-core-integration subscription handling to reduce duplication ([8eaedd2](https://github.com/nrkno/sofie-core/commit/8eaedd22e8efb9750f00ff472301c6b3f2d0f0af))
- 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))

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

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

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

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

Expand Down
151 changes: 79 additions & 72 deletions packages/webui/src/client/ui/Prompter/PrompterView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
}
scrollToPartInstance(partInstanceId: PartInstanceId): void {
const scrollMargin = this.calculateScrollPosition()
const target = document.querySelector<HTMLElement>(`#partInstance_${partInstanceId}`)
const target = document.querySelector<HTMLElement>(`[data-part-instance-id="${partInstanceId}"]`)

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

if (playlist !== undefined) {
const positionTop = window.scrollY
const positionBottom = positionTop + window.innerHeight
if (playlist === undefined) return
const positionTop = window.scrollY
const positionBottom = positionTop + window.innerHeight

let currentPartElement: Element | null = null
let currentPartElementAfter: Element | null = null
let nextPartElementAfter: Element | null = null
let currentPartElement: Element | null = null
let currentPartElementAfter: Element | null = null
let nextPartElementAfter: Element | null = null

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

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

if (playlist.currentPartInfo && current.classList.contains(`live`)) {
currentPartElement = current
currentPartElementAfter = next
}
if (playlist.nextPartInfo && current.classList.contains(`next`)) {
nextPartElementAfter = next
}
if (playlist.currentPartInfo && current.classList.contains(`live`)) {
currentPartElement = current
currentPartElementAfter = next
}
if (playlist.nextPartInfo && current.classList.contains(`next`)) {
nextPartElementAfter = next
}
}

const currentPositionStart = currentPartElement
? currentPartElement.getBoundingClientRect().top + positionTop
: null
const currentPositionEnd = currentPartElementAfter
? currentPartElementAfter.getBoundingClientRect().top + positionTop
: null

const nextPositionEnd = nextPartElementAfter
? nextPartElementAfter.getBoundingClientRect().top + positionTop
: null

const takeIndicator = document.querySelector('.take-indicator')
if (takeIndicator) {
if (currentPositionEnd && currentPositionEnd < positionTop) {
// Display take "^" indicator
takeIndicator.classList.remove('hidden')
takeIndicator.classList.add('top')
} else if (currentPositionStart && currentPositionStart > positionBottom) {
// Display take "v" indicator
takeIndicator.classList.remove('hidden', 'top')
} else {
takeIndicator.classList.add('hidden')
}
const currentPositionStart = currentPartElement
? currentPartElement.getBoundingClientRect().top + positionTop
: null
const currentPositionEnd = currentPartElementAfter
? currentPartElementAfter.getBoundingClientRect().top + positionTop
: null

const nextPositionEnd = nextPartElementAfter ? nextPartElementAfter.getBoundingClientRect().top + positionTop : null

const takeIndicator = document.querySelector('.take-indicator')
if (takeIndicator) {
if (currentPositionEnd && currentPositionEnd < positionTop) {
// Display take "^" indicator
takeIndicator.classList.remove('hidden')
takeIndicator.classList.add('top')
} else if (currentPositionStart && currentPositionStart > positionBottom) {
// Display take "v" indicator
takeIndicator.classList.remove('hidden', 'top')
} else {
takeIndicator.classList.add('hidden')
}
}

const nextIndicator = document.querySelector('.next-indicator')
if (nextIndicator) {
if (nextPositionEnd && nextPositionEnd < positionTop) {
// Display next "^" indicator
nextIndicator.classList.remove('hidden')
nextIndicator.classList.add('top')
} else {
nextIndicator.classList.add('hidden')
}
const nextIndicator = document.querySelector('.next-indicator')
if (nextIndicator) {
if (nextPositionEnd && nextPositionEnd < positionTop) {
// Display next "^" indicator
nextIndicator.classList.remove('hidden')
nextIndicator.classList.add('top')
} else {
nextIndicator.classList.add('hidden')
}
}
}
Expand Down Expand Up @@ -741,24 +738,32 @@ const PrompterContent = withTranslation()(
// Go through the anchors and use the first one that we find:
for (const scrollAnchor of scrollAnchors) {
const anchor = document.getElementById(scrollAnchor.anchorId)
if (anchor) {
const { top } = anchor.getBoundingClientRect()

if (scrollAnchor.offset !== null) {
window.scrollBy({
top: top - scrollAnchor.offset,
})
// We've scrolled, exit the function!
return
} else {
// Note: config.margin does not have to be taken into account here,
// the css margins magically does it for us.
window.scrollBy({
top: top - readPosition,
})
// We've scrolled, exit the function!
return
}
if (!anchor) continue

const { top } = anchor.getBoundingClientRect()

if (scrollAnchor.offset !== null) {
this.props.config.debug &&
logger.debug(
`Selected anchor ${scrollAnchor.anchorId} as anchor element in view, restoring position ${scrollAnchor.offset}`
)

window.scrollBy({
top: top - scrollAnchor.offset,
})
// We've scrolled, exit the function!
return
} else {
this.props.config.debug &&
logger.debug(`Selected anchor ${scrollAnchor.anchorId} as anchor element outside of view, jumping to it`)

// Note: config.margin does not have to be taken into account here,
// the css margins magically does it for us.
window.scrollBy({
top: top - readPosition,
})
// We've scrolled, exit the function!
return
}
}
// None of the anchors where found at this point.
Expand All @@ -770,6 +775,7 @@ const PrompterContent = withTranslation()(
.join(', ')}`
)

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

private getPartStatus(prompterData: PrompterData, part: PrompterDataPart) {
if (prompterData.currentPartInstanceId === part.id) {
if (prompterData.currentPartInstanceId === part.partInstanceId) {
return 'live'
} else if (prompterData.nextPartInstanceId === part.id) {
} else if (prompterData.nextPartInstanceId === part.partInstanceId) {
return 'next'
} else {
return null
Expand Down Expand Up @@ -916,9 +922,10 @@ const PrompterContent = withTranslation()(
for (const part of segment.parts) {
lines.push(
<div
id={`partInstance_${part.id}`}
id={`part_${part.id}`}
data-obj-id={segment.id + '_' + part.id}
key={'partInstance_' + part.id}
data-part-instance-id={part.partInstanceId}
key={'part_' + part.id}
className={ClassNames('prompter-part', 'scroll-anchor', this.getPartStatus(prompterData, part))}
>
{part.title || 'N/A'}
Expand Down
6 changes: 4 additions & 2 deletions packages/webui/src/client/ui/Prompter/prompter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export interface PrompterDataSegment {
parts: PrompterDataPart[]
}
export interface PrompterDataPart {
id: PartInstanceId
id: PartId
partInstanceId: PartInstanceId
title: string | undefined
pieces: PrompterDataPiece[]
}
Expand Down Expand Up @@ -210,7 +211,8 @@ export namespace PrompterAPI {
for (let partIndex = 0; partIndex < partInstances.length; partIndex++) {
const partInstance = partInstances[partIndex]
const partData: PrompterDataPart = {
id: partInstance._id,
id: partInstance.part._id,
partInstanceId: partInstance._id,
title: partInstance.part.prompterTitle || partInstance.part.title,
pieces: [],
}
Expand Down

0 comments on commit 479f696

Please sign in to comment.