Skip to content

Commit 43c1aaa

Browse files
Simon RogersIvan Maretić
authored andcommitted
feat: add flag to hide rundown header
1 parent cf412b9 commit 43c1aaa

File tree

7 files changed

+61
-19
lines changed

7 files changed

+61
-19
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/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: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ import { useRundownViewSubscriptions } from './RundownView/RundownViewSubscripti
110110
import { useMiniShelfAdlibsData } from './RundownView/useQueueMiniShelfAdlib.js'
111111
import { RundownViewContextProviders } from './RundownView/RundownViewContextProviders.js'
112112
import { AnimatePresence } from 'motion/react'
113+
import classNames from 'classnames'
113114

114115
const HIDE_NOTIFICATIONS_AFTER_MOUNT: number | undefined = 5000
115116

@@ -284,8 +285,14 @@ export function RundownView(props: Readonly<IProps>): JSX.Element {
284285
partInstances?.currentPartInstance
285286
)
286287

288+
const hideRundownHeader = params['hideRundownHeader'] === '1'
289+
287290
return (
288-
<div className="container-fluid header-clear">
291+
<div
292+
className={classNames('container-fluid', 'header-clear', {
293+
'header-clear--no-rundown-header': hideRundownHeader,
294+
})}
295+
>
289296
<RundownViewContent
290297
{...props}
291298
subsReady={subsReady}
@@ -304,6 +311,7 @@ export function RundownView(props: Readonly<IProps>): JSX.Element {
304311
{...selectedRundownLayouts}
305312
uiSegmentMap={miniShelfData.uiSegmentMap}
306313
miniShelfFilter={miniShelfData.miniShelfFilter}
314+
hideRundownHeader={hideRundownHeader}
307315
/>
308316
</div>
309317
)
@@ -312,6 +320,7 @@ export function RundownView(props: Readonly<IProps>): JSX.Element {
312320
interface IPropsWithReady extends IProps {
313321
subsReady: boolean
314322
userPermissions: Readonly<UserPermissions>
323+
hideRundownHeader?: boolean
315324
}
316325

317326
interface IRundownViewContentSnapshot {
@@ -1335,20 +1344,22 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
13351344
this.props.userPermissions.studio &&
13361345
studio.settings.enableEvaluationForm && <AfterBroadcastForm playlist={playlist} />}
13371346
</ErrorBoundary>
1338-
<ErrorBoundary>
1339-
<RundownHeader
1340-
playlist={playlist}
1341-
studio={studio}
1342-
rundownIds={this.props.rundowns.map((r) => r._id)}
1343-
firstRundown={this.props.rundowns[0]}
1344-
onActivate={this.onActivate}
1345-
inActiveRundownView={this.props.inActiveRundownView}
1346-
currentRundown={currentRundown}
1347-
layout={this.props.selectedHeaderLayout}
1348-
showStyleBase={showStyleBase}
1349-
showStyleVariant={showStyleVariant}
1350-
/>
1351-
</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+
)}
13521363
<ErrorBoundary>
13531364
<Shelf
13541365
isExpanded={
@@ -1392,6 +1403,7 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
13921403
studioRouteSetExclusivityGroups={studio.routeSetExclusivityGroups}
13931404
onStudioRouteSetSwitch={this.onStudioRouteSetSwitch}
13941405
onSegmentViewMode={this.onSegmentViewModeChange}
1406+
hideRundownHeader={this.props.hideRundownHeader}
13951407
/>
13961408
</ErrorBoundary>
13971409
<ErrorBoundary>
@@ -1407,7 +1419,10 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
14071419
<ErrorBoundary>
14081420
<AnimatePresence>
14091421
{this.state.isNotificationsCenterOpen && (
1410-
<NotificationCenterPanel filter={this.state.isNotificationsCenterOpen} />
1422+
<NotificationCenterPanel
1423+
filter={this.state.isNotificationsCenterOpen}
1424+
hideRundownHeader={this.props.hideRundownHeader}
1425+
/>
14111426
)}
14121427
{!this.state.isNotificationsCenterOpen && selectionContext.listSelectedElements().length > 0 && (
14131428
<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

0 commit comments

Comments
 (0)