Skip to content

Commit 4ecaee1

Browse files
committed
review commetns
1 parent 609d24c commit 4ecaee1

File tree

10 files changed

+29
-29
lines changed

10 files changed

+29
-29
lines changed

packages/documentation/versioned_docs/version-1.50.0/for-developers/device-integrations/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In order to understand all about writing TSR integrations there are some concept
99
- [TSR Types package](./tsr-types)
1010
- [TSR Actions](./tsr-actions)
1111

12-
But to start of we will explain the general structure of the TSR. Any user of the TSR will interface primarily with the Conductor class. Primarily the user will input device configurations, mappings and timelines into the TSR. The timeline describes the entire state of all of the devices over time. It does this by putting objects on timeline layers. Every timeline layer maps to a specific part of the device, this is configured throught the mappings.
12+
But to start of we will explain the general structure of the TSR. Any user of the TSR will interface primarily with the Conductor class. Primarily the user will input device configurations, mappings and timelines into the TSR. The timeline describes the entire state of all of the devices over time. It does this by putting objects on timeline layers. Every timeline layer maps to a specific part of the device, this is configured through the mappings.
1313

1414
The timeline is converted into disctinct states at different points in time, and these states are fed to the individual integrations. As an integration developer you shouldn't have to worry about keeping track of this. It is most important that you expose \(a\) a method to convert from a Timeline State to a Device State, \(b\) a method for diffing 2 device states and (c) a way to send commands to the device. We'll dive deeper into this in [TSR Integration API](./tsr-api).
1515

packages/documentation/versioned_docs/version-1.51.0/for-developers/device-integrations/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In order to understand all about writing TSR integrations there are some concept
99
- [TSR Types package](./tsr-types)
1010
- [TSR Actions](./tsr-actions)
1111

12-
But to start of we will explain the general structure of the TSR. Any user of the TSR will interface primarily with the Conductor class. Primarily the user will input device configurations, mappings and timelines into the TSR. The timeline describes the entire state of all of the devices over time. It does this by putting objects on timeline layers. Every timeline layer maps to a specific part of the device, this is configured throught the mappings.
12+
But to start of we will explain the general structure of the TSR. Any user of the TSR will interface primarily with the Conductor class. Primarily the user will input device configurations, mappings and timelines into the TSR. The timeline describes the entire state of all of the devices over time. It does this by putting objects on timeline layers. Every timeline layer maps to a specific part of the device, this is configured through the mappings.
1313

1414
The timeline is converted into disctinct states at different points in time, and these states are fed to the individual integrations. As an integration developer you shouldn't have to worry about keeping track of this. It is most important that you expose \(a\) a method to convert from a Timeline State to a Device State, \(b\) a method for diffing 2 device states and (c) a way to send commands to the device. We'll dive deeper into this in [TSR Integration API](./tsr-api).
1515

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export function useTiming(
212212
setForceUpdate(Date.now())
213213
}
214214
}
215-
}, [])
215+
}, [context])
216216

217217
useEffect(() => {
218218
window.addEventListener(rundownTimingEventFromTickResolution(tickResolution), refreshComponent)

packages/webui/src/client/ui/SegmentTimeline/SegmentContextMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ export function SegmentContextMenu({
124124
isFormEditable={isSegmentEditAble}
125125
/>
126126
)}
127-
<hr />
128127
{enableUserEdits && (
129128
<>
130129
<hr />
@@ -133,6 +132,7 @@ export function SegmentContextMenu({
133132
</MenuItem>
134133
</>
135134
)}
135+
<hr />
136136
</>
137137
)}
138138
{part && !part.instance.part.invalid && timecode !== null && (

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,6 @@ export class SegmentTimelineClass extends React.Component<Translated<WithTiming<
760760
liveLineHistorySize={this.props.liveLineHistorySize}
761761
isLastSegment={this.props.isLastSegment}
762762
isLastInSegment={false}
763-
timelineWidth={this.state.timelineWidth}
764763
showDurationSourceLayers={this.props.showDurationSourceLayers}
765764
isLiveSegment={this.props.isLiveSegment}
766765
anyPriorPartWasLive={anyPriorPartWasLive}
@@ -820,7 +819,6 @@ export class SegmentTimelineClass extends React.Component<Translated<WithTiming<
820819
liveLineHistorySize={this.props.liveLineHistorySize}
821820
isLastSegment={this.props.isLastSegment}
822821
isLastInSegment={true}
823-
timelineWidth={this.state.timelineWidth}
824822
showDurationSourceLayers={this.props.showDurationSourceLayers}
825823
isLiveSegment={this.props.isLiveSegment}
826824
anyPriorPartWasLive={anyPriorPartWasLive}

packages/webui/src/client/ui/SegmentTimeline/SmallParts/SegmentTimelineSmallPartFlag.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ interface ISegmentTimelineSmallPartFlagProps {
3232
liveLineHistorySize: number
3333
isLastSegment: boolean
3434
isLastInSegment: boolean
35-
timelineWidth: number
3635
showDurationSourceLayers?: Set<ISourceLayer['_id']>
3736

3837
livePosition: number

packages/webui/src/client/ui/Settings/BlueprintSettings.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ import Button from 'react-bootstrap/esm/Button'
2020
import { useTranslation } from 'react-i18next'
2121
import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError'
2222
import { createPrivateApiPath } from '../../url.js'
23-
import { DBShowStyleBase } from '@sofie-automation/corelib/src/dataModel/ShowStyleBase.js'
24-
import { DBStudio } from '@sofie-automation/corelib/src/dataModel/Studio.js'
25-
import { assertNever } from '@sofie-automation/corelib/src/lib.js'
23+
import { DBShowStyleBase } from '@sofie-automation/corelib/dist/dataModel/ShowStyleBase.js'
24+
import { DBStudio } from '@sofie-automation/corelib/dist/dataModel/Studio.js'
25+
import { assertNever } from '@sofie-automation/corelib/dist/lib.js'
2626

2727
interface IProps {
2828
blueprintId: BlueprintId
2929
}
3030

31-
export default function BlueprintSettings2({ blueprintId }: IProps): JSX.Element {
31+
export default function BlueprintSettings({ blueprintId }: IProps): JSX.Element {
3232
const { t } = useTranslation()
3333

3434
const blueprint = useTracker(() => Blueprints.findOne(blueprintId), [blueprintId])
@@ -89,7 +89,7 @@ export default function BlueprintSettings2({ blueprintId }: IProps): JSX.Element
8989

9090
{blueprint.blueprintId ? (
9191
<label className="field">
92-
<LabelActual label={t('Blueprint Id')} />
92+
<LabelActual label={t('Blueprint ID')} />
9393
<div className="field-content">
9494
<i>{blueprint.blueprintId}</i>
9595
</div>

packages/webui/src/client/ui/Settings/ShowStyle/HotkeyLegend.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function HotkeyLegendSettings({ showStyleBase }: IHotkeyLegendSettingsPro
4848
document.body.appendChild(element) // Required for this to work in FireFox
4949
element.click()
5050
document.body.removeChild(element) // Required for this to work in FireFox
51-
}, [showStyleBase])
51+
}, [showStyleBase._id, showStyleBase.hotkeyLegend, showStyleBase.name])
5252

5353
const onDeleteHotkeyLegend = useCallback(
5454
(item: HotkeyDefinition) => {
@@ -72,7 +72,7 @@ export function HotkeyLegendSettings({ showStyleBase }: IHotkeyLegendSettingsPro
7272
<tbody>
7373
{(showStyleBase.hotkeyLegend || []).map((item, index) => {
7474
return (
75-
<React.Fragment key={item.key}>
75+
<React.Fragment key={item._id}>
7676
<tr
7777
className={ClassNames({
7878
hl: isExpanded(item._id),

packages/webui/src/client/ui/Settings/SnapshotsView.tsx

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default function SnapshotsView(): JSX.Element {
104104
<span>{t('Ingest from Snapshot')}</span>
105105
</SnapshotImportButton>
106106
<span className="text-s vsubtle ms-2">
107-
{t('Reads the ingest (NRCS) data, and pipes it throught the blueprints')}
107+
{t('Reads the ingest (NRCS) data, and pipes it through the blueprints')}
108108
</span>
109109
</p>
110110

@@ -264,16 +264,16 @@ function RestoreStoredSnapshotButton({ snapshotId }: { snapshotId: SnapshotId })
264264
const snapshot = Snapshots.findOne(snapshotId)
265265
if (snapshot) {
266266
doModalDialog({
267-
title: 'Restore Snapshot',
268-
message: `Do you really want to restore the snapshot ${snapshot.name}?`,
267+
title: t('Restore Snapshot'),
268+
message: t('Do you really want to restore the snapshot "{{snapshotName}}"?', { snapshotName: snapshot.name }),
269269
onAccept: () => {
270270
MeteorCall.snapshot
271271
.restoreSnapshot(snapshotId, false)
272272
.then(() => {
273273
// todo: replace this with something else
274274
doModalDialog({
275-
title: 'Restore Snapshot',
276-
message: `Snapshot restored!`,
275+
title: t('Restore Snapshot'),
276+
message: t('Snapshot restored!'),
277277
acceptOnly: true,
278278
onAccept: () => {
279279
// nothing
@@ -283,8 +283,8 @@ function RestoreStoredSnapshotButton({ snapshotId }: { snapshotId: SnapshotId })
283283
.catch((err) => {
284284
logger.error(err)
285285
doModalDialog({
286-
title: 'Restore Snapshot',
287-
message: `Error: ${err.toString()}`,
286+
title: t('Restore Snapshot'),
287+
message: t('Snapshot restore failed: {{errorMessage}}', { errorMessage: stringifyError(err) }),
288288
acceptOnly: true,
289289
onAccept: () => {
290290
// nothing
@@ -321,8 +321,8 @@ function TakeSystemSnapshotButton({ studioId }: { studioId: StudioId | null }) {
321321
.catch((err) => {
322322
logger.error(err)
323323
doModalDialog({
324-
title: 'Restore Snapshot',
325-
message: `Error: ${err.toString()}`,
324+
title: t('Restore Snapshot'),
325+
message: t('Snapshot restore failed: {{errorMessage}}', { errorMessage: stringifyError(err) }),
326326
acceptOnly: true,
327327
onAccept: () => {
328328
// nothing
@@ -334,7 +334,7 @@ function TakeSystemSnapshotButton({ studioId }: { studioId: StudioId | null }) {
334334
const studioName = useTracker(() => (studioId ? Studios.findOne(studioId)?.name : null), [studioId])
335335

336336
return (
337-
<Button className="btn btn-primary" onClick={takeSystemSnapshot}>
337+
<Button variant="primary" onClick={takeSystemSnapshot}>
338338
{studioId
339339
? t('Take a Snapshot for studio "{{studioName}}" only', { studioName: studioName ?? studioId })
340340
: t('Take a Full System Snapshot')}
@@ -349,14 +349,17 @@ function RemoveSnapshotButton({ snapshotId }: { snapshotId: SnapshotId }) {
349349
const snapshot = Snapshots.findOne(snapshotId)
350350
if (snapshot) {
351351
doModalDialog({
352-
title: 'Remove Snapshot',
353-
message: `Are you sure, do you really want to REMOVE the Snapshot ${snapshot.name}?\r\nThis cannot be undone!!`,
352+
title: t('Remove Snapshot'),
353+
message: t(
354+
'Are you sure, do you really want to REMOVE the Snapshot "{{snapshotName}}"?\r\nThis cannot be undone!!',
355+
{ snapshotName: snapshot.name }
356+
),
354357
onAccept: () => {
355358
MeteorCall.snapshot.removeSnapshot(snapshotId).catch((err) => {
356359
logger.error(err)
357360
doModalDialog({
358-
title: 'Remove Snapshot',
359-
message: `Error: ${err.toString()}`,
361+
title: t('Remove Snapshot'),
362+
message: t('Snapshot remove failed: {{errorMessage}}', { errorMessage: stringifyError(err) }),
360363
acceptOnly: true,
361364
onAccept: () => {
362365
// nothing

packages/webui/src/client/ui/Shelf/PieceCountdownPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function PieceCountdownPanel({
4646
})
4747
: undefined
4848
return livePieceInstance
49-
}, [playlist, showStyleBase])
49+
}, [playlist, showStyleBase, panel.sourceLayerIds])
5050

5151
useEffect(() => {
5252
const updateTimecode = (e: TimingEvent) => {

0 commit comments

Comments
 (0)