Skip to content

Commit 26ccb1f

Browse files
committed
Merge branch 'pr/imaretic/1475' into release53
2 parents deee7c6 + c2224d6 commit 26ccb1f

File tree

12 files changed

+83
-24
lines changed

12 files changed

+83
-24
lines changed

packages/documentation/docs/for-developers/url-query-parameters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ Appending query parameter(s) to the URL will allow you to modify the behaviour o
2222
| `speak=1` | Experimental feature that starts playing an audible countdown 10 seconds before each planned _Take_. _Default value is `0`._ |
2323
| `vibrate=1` | Experimental feature that triggers the vibration API in the web browser 3 seconds before each planned _Take_. _Default value is `0`._ |
2424
| `zoom=1,...` | Sets the scaling of the entire GUI. _The unit is a percentage where `100` is the default scaling._ |
25+
| `hideRundownHeader=1` | Hides header on [Rundown view](../user-guide/features/sofie-views-and-screens#rundown-view) and [Active Rundown screen](../user-guide/features/sofie-views-and-screens#active-rundown-screen). _Default value is `0`._ |

packages/webui/src/client/lib/notifications/NotificationCenterPanel.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { i18nTranslator } from '../../ui/i18n.js'
1212
import { RundownId, SegmentId } from '@sofie-automation/corelib/dist/dataModel/Ids'
1313
import { useTranslation } from 'react-i18next'
1414
import { PopUpPanel } from '../../ui/RundownView/PopUpPanel.js'
15+
import classNames from 'classnames'
1516

1617
interface IPopUpProps {
1718
id?: string
@@ -469,8 +470,16 @@ function NotificationCenterElement(props: HTMLMotionProps<'div'>) {
469470
* Presentational component that displays a panel containing the NotificationCenterPopUps list containing
470471
* the snoozed items and an 'Empty' label if no notifications are present.
471472
*/
472-
export const NotificationCenterPanel = (props: { limitCount?: number; filter?: NoticeLevel }): JSX.Element => (
473-
<PopUpPanel className="notification-center-panel">
473+
export const NotificationCenterPanel = (props: {
474+
limitCount?: number
475+
filter?: NoticeLevel
476+
hideRundownHeader?: boolean
477+
}): JSX.Element => (
478+
<PopUpPanel
479+
className={classNames('notification-center-panel', {
480+
'notification-center-panel--no-rundown-header': props.hideRundownHeader,
481+
})}
482+
>
474483
<NotificationCenterPopUps
475484
initialAnimation={false}
476485
showEmptyListLabel={true}

packages/webui/src/client/lib/viewPort.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Settings } from '../lib/Settings.js'
55
import { PartId, PartInstanceId, SegmentId } from '@sofie-automation/corelib/dist/dataModel/Ids'
66
import { UIPartInstances, UIParts } from '../ui/Collections.js'
77
import { logger } from './logging.js'
8+
import { parse as queryStringParse } from 'query-string'
89

910
const HEADER_MARGIN = 24 // TODOSYNC: TV2 uses 15. If it's needed to be different, it needs to be made generic somehow..
1011
const FALLBACK_HEADER_HEIGHT = 65
@@ -102,6 +103,10 @@ export async function scrollToPart(
102103
let HEADER_HEIGHT: number | undefined = undefined
103104

104105
export function getHeaderHeight(): number {
106+
if (queryStringParse(location.search)['hideRundownHeader'] === '1') {
107+
return 0
108+
}
109+
105110
if (HEADER_HEIGHT === undefined) {
106111
const root = document.querySelector(
107112
'#render-target > .container-fluid-custom > .rundown-view > .rundown-header'

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
padding-top: 4rem;
33
padding-right: $statusbar-width;
44
padding-left: 0;
5+
6+
&.header-clear--no-rundown-header {
7+
padding-top: 0;
8+
}
59
}
610

711
ul {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,10 @@
415415
background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
416416
}
417417

418+
&.notification-center-panel--no-rundown-header {
419+
top: 0;
420+
}
421+
418422
.notification-pop-ups {
419423
top: 0;
420424

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@
177177
background: $ui-dark-color;
178178
border-left: none;
179179

180+
&.status-bar--no-rundown-header {
181+
top: 0;
182+
}
183+
180184
.status-bar__controls__button {
181185
border: none;
182186

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

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ParsedQuery, parse as queryStringParse } from 'query-string'
44
import { Translated, translateWithTracker, useTracker } from '../lib/ReactMeteorData/react-meteor-data.js'
55
import { VTContent, NoteSeverity, ISourceLayer } from '@sofie-automation/blueprints-integration'
66
import { Spinner } from '../lib/Spinner.js'
7-
import ClassNames from 'classnames'
7+
import classNames from 'classnames'
88
import * as _ from 'underscore'
99
import { Prompt } from 'react-router-dom'
1010
import { DBRundownPlaylist, QuickLoopMarker } from '@sofie-automation/corelib/dist/dataModel/RundownPlaylist'
@@ -285,8 +285,14 @@ export function RundownView(props: Readonly<IProps>): JSX.Element {
285285
partInstances?.currentPartInstance
286286
)
287287

288+
const hideRundownHeader = params['hideRundownHeader'] === '1'
289+
288290
return (
289-
<div className="container-fluid header-clear">
291+
<div
292+
className={classNames('container-fluid', 'header-clear', {
293+
'header-clear--no-rundown-header': hideRundownHeader,
294+
})}
295+
>
290296
<RundownViewContent
291297
{...props}
292298
subsReady={subsReady}
@@ -305,6 +311,7 @@ export function RundownView(props: Readonly<IProps>): JSX.Element {
305311
{...selectedRundownLayouts}
306312
uiSegmentMap={miniShelfData.uiSegmentMap}
307313
miniShelfFilter={miniShelfData.miniShelfFilter}
314+
hideRundownHeader={hideRundownHeader}
308315
/>
309316
</div>
310317
)
@@ -313,6 +320,7 @@ export function RundownView(props: Readonly<IProps>): JSX.Element {
313320
interface IPropsWithReady extends IProps {
314321
subsReady: boolean
315322
userPermissions: Readonly<UserPermissions>
323+
hideRundownHeader?: boolean
316324
}
317325

318326
interface IRundownViewContentSnapshot {
@@ -979,7 +987,7 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
979987
return (
980988
<ErrorBoundary key={unprotectString(segment._id)}>
981989
<VirtualElement
982-
className={ClassNames({
990+
className={classNames({
983991
'segment-timeline-wrapper--hidden': segment.isHidden,
984992
'segment-timeline-wrapper--shelf': segment.showShelf,
985993
})}
@@ -1083,7 +1091,7 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
10831091
case SegmentViewMode.Storyboard:
10841092
return <SegmentStoryboardContainer {...resolvedSegmentProps} />
10851093
case SegmentViewMode.List:
1086-
return <SegmentListContainer {...resolvedSegmentProps} />
1094+
return <SegmentListContainer {...resolvedSegmentProps} hideRundownHeader={this.props.hideRundownHeader} />
10871095
case SegmentViewMode.Timeline:
10881096
default:
10891097
return <SegmentTimelineContainer {...resolvedSegmentProps} />
@@ -1320,7 +1328,7 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
13201328
{(selectionContext) => {
13211329
return (
13221330
<div
1323-
className={ClassNames('rundown-view', {
1331+
className={classNames('rundown-view', {
13241332
'notification-center-open': this.state.isNotificationsCenterOpen !== undefined,
13251333
'rundown-view--studio-mode': this.props.userPermissions.studio,
13261334
'properties-panel-open': selectionContext.listSelectedElements().length > 0,
@@ -1336,20 +1344,22 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
13361344
this.props.userPermissions.studio &&
13371345
studio.settings.enableEvaluationForm && <AfterBroadcastForm playlist={playlist} />}
13381346
</ErrorBoundary>
1339-
<ErrorBoundary>
1340-
<RundownHeader
1341-
playlist={playlist}
1342-
studio={studio}
1343-
rundownIds={this.props.rundowns.map((r) => r._id)}
1344-
firstRundown={this.props.rundowns[0]}
1345-
onActivate={this.onActivate}
1346-
inActiveRundownView={this.props.inActiveRundownView}
1347-
currentRundown={currentRundown}
1348-
layout={this.props.selectedHeaderLayout}
1349-
showStyleBase={showStyleBase}
1350-
showStyleVariant={showStyleVariant}
1351-
/>
1352-
</ErrorBoundary>
1347+
{!this.props.hideRundownHeader && (
1348+
<ErrorBoundary>
1349+
<RundownHeader
1350+
playlist={playlist}
1351+
studio={studio}
1352+
rundownIds={this.props.rundowns.map((r) => r._id)}
1353+
firstRundown={this.props.rundowns[0]}
1354+
onActivate={this.onActivate}
1355+
inActiveRundownView={this.props.inActiveRundownView}
1356+
currentRundown={currentRundown}
1357+
layout={this.props.selectedHeaderLayout}
1358+
showStyleBase={showStyleBase}
1359+
showStyleVariant={showStyleVariant}
1360+
/>
1361+
</ErrorBoundary>
1362+
)}
13531363
<ErrorBoundary>
13541364
<Shelf
13551365
isExpanded={
@@ -1369,7 +1379,7 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
13691379
{this.props.userPermissions.studio && !Settings.disableBlurBorder && (
13701380
<KeyboardFocusIndicator userPermissions={this.props.userPermissions}>
13711381
<div
1372-
className={ClassNames('rundown-view__focus-lost-frame', {
1382+
className={classNames('rundown-view__focus-lost-frame', {
13731383
'rundown-view__focus-lost-frame--reduce-animation': import.meta.env.DEV,
13741384
})}
13751385
></div>
@@ -1393,6 +1403,7 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
13931403
studioRouteSetExclusivityGroups={studio.routeSetExclusivityGroups}
13941404
onStudioRouteSetSwitch={this.onStudioRouteSetSwitch}
13951405
onSegmentViewMode={this.onSegmentViewModeChange}
1406+
hideRundownHeader={this.props.hideRundownHeader}
13961407
/>
13971408
</ErrorBoundary>
13981409
<ErrorBoundary>
@@ -1408,7 +1419,10 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
14081419
<ErrorBoundary>
14091420
<AnimatePresence>
14101421
{this.state.isNotificationsCenterOpen && (
1411-
<NotificationCenterPanel filter={this.state.isNotificationsCenterOpen} />
1422+
<NotificationCenterPanel
1423+
filter={this.state.isNotificationsCenterOpen}
1424+
hideRundownHeader={this.props.hideRundownHeader}
1425+
/>
14121426
)}
14131427
{!this.state.isNotificationsCenterOpen && selectionContext.listSelectedElements().length > 0 && (
14141428
<div>

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ interface IProps {
5151
state: boolean
5252
) => void
5353
onSegmentViewMode?: (e: React.MouseEvent<HTMLButtonElement>) => void
54+
hideRundownHeader?: boolean
5455
}
5556

5657
const ANIMATION_TEMPLATE = {
@@ -138,7 +139,11 @@ export function RundownRightHandControls(props: Readonly<IProps>): JSX.Element {
138139
onStudioRouteSetSwitch={props.onStudioRouteSetSwitch}
139140
/>
140141
)}
141-
<div className="status-bar">
142+
<div
143+
className={classNames('status-bar', {
144+
'status-bar--no-rundown-header': props.hideRundownHeader,
145+
})}
146+
>
142147
<div className="status-bar__cell status-bar__cell--align-start">
143148
<AnimatePresence initial={false}>
144149
<NotificationCenterPanelToggle

packages/webui/src/client/ui/SegmentList/SegmentList.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,10 @@ $identifier-area-width: 3em;
701701
padding: $segment-margin-y $segment-margin-x 0;
702702
overflow: hidden;
703703

704+
&.no-rundown-header {
705+
margin-top: 0;
706+
}
707+
704708
.segment-opl__title {
705709
background: $segment-background-color;
706710
border-top-left-radius: $segment-border-radius;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ interface IProps {
3939
onContextMenu?: (contextMenuContext: IContextMenuContext) => void
4040
onSwitchViewMode?: (newViewMode: SegmentViewMode) => void
4141
onPieceDoubleClick?: (item: PieceUi, e: React.MouseEvent<HTMLDivElement>) => void
42+
43+
hideRundownHeader?: boolean
4244
}
4345

4446
const SegmentListInner = React.forwardRef<HTMLDivElement, IProps>(function SegmentList(props, ref) {
@@ -238,6 +240,7 @@ const SegmentListInner = React.forwardRef<HTMLDivElement, IProps>(function Segme
238240
onTimeUntilClick={onTimeUntilClick}
239241
onSwitchViewMode={props.onSwitchViewMode}
240242
onHeaderNoteClick={props.onHeaderNoteClick}
243+
hideRundownHeader={props.hideRundownHeader}
241244
/>
242245
<div className="segment-opl__part-list">{parts}</div>
243246
</div>

0 commit comments

Comments
 (0)