Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/meteor-lib/src/triggers/RundownViewEventBus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export enum RundownViewEvents {

TOGGLE_SHELF_DROPZONE = 'toggleShelfDropzone',
ITEM_DROPPED = 'itemDropped',
CLOSE_NOTIFICATIONS = 'closeNotifications',
}

export interface IEventContext {
Expand Down Expand Up @@ -156,6 +157,7 @@ export interface RundownViewEventBusEvents {
[RundownViewEvents.CREATE_SNAPSHOT_FOR_DEBUG]: [e: BaseEvent]
[RundownViewEvents.TOGGLE_SHELF_DROPZONE]: [e: ToggleShelfDropzoneEvent]
[RundownViewEvents.ITEM_DROPPED]: [e: ItemDroppedEvent]
[RundownViewEvents.CLOSE_NOTIFICATIONS]: []
}

class RundownViewEventBus0 extends EventEmitter<RundownViewEventBusEvents> {}
Expand Down
85 changes: 14 additions & 71 deletions packages/webui/src/client/styles/propertiesPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
background: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
}

.propertiespanel-pop-up__label-with-icon {
margin-left: 0.5em;
}

.propertiespanel-pop-up {
background: #2e2e2e;
border-radius: 1px;
Expand Down Expand Up @@ -64,8 +68,6 @@
letter-spacing: 0.5px;

> .svg {
width: 1em;
height: 1.2em;
flex-shrink: 0;
}
> .title {
Expand All @@ -87,13 +89,16 @@
flex-shrink: 0;
}
> .propertiespanel-pop-up_close {
height: 1em;
margin-left: 1em;
background-color: unset;
border: none;
}
}

.propertiespanel-pop-up__buttons-container {
display: flex;
gap: 0.5em;
}

> .propertiespanel-pop-up__footer {
flex: 1;
flex: 0 0 0;
Expand All @@ -109,7 +114,9 @@

> .propertiespanel-pop-up__button,
.propertiespanel-pop-up__button-group .propertiespanel-pop-up__button {
display: block;
display: flex;
gap: 0.5em;
align-items: center;

border-radius: 5px;
border: 1px solid #7f7f7f;
Expand Down Expand Up @@ -227,14 +234,14 @@
}

.propertiespanel-pop-up__button {
// margin-top: 10px;
background: #636363;
padding: 10px;
gap: 10px;
border-radius: 5px;
border: 1px solid #7f7f7f;
color: #dfdfdf;

gap: 0.5em;

font-size: 0.875em;
font-weight: 500;

Expand Down Expand Up @@ -266,63 +273,6 @@
width: 100%;
}

// // Force the base input-l class
// .input-l {
// width: 100% !important;
// max-width: none !important;
// margin-left: 0px;
// border: none;
// }

// // Force the select/text-input defaults
// .select,
// .inline-select,
// .text-input {
// display: block !important;
// position: relative;
// width: 100% !important;
// }

// .input {
// border: 1px solid #e5e7eb;
// border-radius: 0.375rem;
// padding: 0.5rem 0.75rem;
// width: 100%;

// &:focus {
// outline: none;
// border-color: #3b82f6;
// box-shadow: 0 0 0 1px #3b82f6;
// background-color: unset !important; // origo >.>
// }
// }

// .label-text {
// &:before {
// content: none !important;
// }
// }

// .dropdown {
// background: white;
// border: 1px solid #e5e7eb;
// border-radius: 0.375rem;
// width: 100%;
// max-width: 100%;

// .input,
// .input-l {
// border: none;
// outline: none;
// box-shadow: none;
// }

// &:focus-within {
// border-color: #3b82f6;
// box-shadow: 0 0 0 1px #3b82f6;
// }
// }

.form-switch {
margin: 0.5rem 0;

Expand All @@ -337,13 +287,6 @@
margin-bottom: 0.5rem; // Increased spacing between label and selector
margin-top: 0.5rem; // Clearance from the previous
}

// .label {
// font-size: 0.875rem;
// font-weight: 500;
// color: #374151;
// display: block;
// }
}
}
}
Expand Down
22 changes: 12 additions & 10 deletions packages/webui/src/client/styles/rundownView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ $break-width: 35rem;
}

&.properties-panel-open {
padding-right: $properties-panel-width;
padding-right: calc(#{$properties-panel-width} - 3.5em);
transition: 0s padding-right 1s;

> .rundown-header .rundown-overview {
Expand Down Expand Up @@ -209,8 +209,13 @@ body.no-overflow {
bottom: 0;
right: 0;

background:
linear-gradient(-45deg, $color-status-fatal 33%, transparent 33%, transparent 66%, $color-status-fatal 66%),
background: linear-gradient(
-45deg,
$color-status-fatal 33%,
transparent 33%,
transparent 66%,
$color-status-fatal 66%
),
linear-gradient(-45deg, $color-status-fatal 33%, transparent 33%, transparent 66%, $color-status-fatal 66%),
linear-gradient(-45deg, $color-status-fatal 33%, transparent 33%, transparent 66%, $color-status-fatal 66%),
linear-gradient(-45deg, $color-status-fatal 33%, transparent 33%, transparent 66%, $color-status-fatal 66%);
Expand Down Expand Up @@ -1100,8 +1105,7 @@ svg.icon {
}
.segment-timeline__part {
.segment-timeline__part__invalid-cover {
background-image:
repeating-linear-gradient(
background-image: repeating-linear-gradient(
45deg,
var(--invalid-reason-color-transparent) 0%,
var(--invalid-reason-color-transparent) 4px,
Expand Down Expand Up @@ -1383,8 +1387,7 @@ svg.icon {
left: 2px;
right: 2px;
z-index: 3;
background:
repeating-linear-gradient(
background: repeating-linear-gradient(
45deg,
var(--invalid-reason-color-opaque) 0,
var(--invalid-reason-color-opaque) 5px,
Expand Down Expand Up @@ -1565,9 +1568,8 @@ svg.icon {
bottom: 0;
right: 1px;
z-index: 10;
pointer-events: all;
background-image:
repeating-linear-gradient(
pointer-events: none;
background-image: repeating-linear-gradient(
45deg,
var(--invalid-reason-color-transparent) 0%,
var(--invalid-reason-color-transparent) 5px,
Expand Down
19 changes: 16 additions & 3 deletions packages/webui/src/client/ui/RundownView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,

RundownViewEventBus.on(RundownViewEvents.GO_TO_LIVE_SEGMENT, this.onGoToLiveSegment)
RundownViewEventBus.on(RundownViewEvents.GO_TO_TOP, this.onGoToTop)
RundownViewEventBus.on(RundownViewEvents.CLOSE_NOTIFICATIONS, this.onCloseNotifications)

if (this.props.playlist) {
documentTitle.set(this.props.playlist.name)
Expand Down Expand Up @@ -621,6 +622,7 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,

RundownViewEventBus.off(RundownViewEvents.GO_TO_LIVE_SEGMENT, this.onGoToLiveSegment)
RundownViewEventBus.off(RundownViewEvents.GO_TO_TOP, this.onGoToTop)
RundownViewEventBus.off(RundownViewEvents.CLOSE_NOTIFICATIONS, this.onCloseNotifications)
}

private onBeforeUnload = (e: any) => {
Expand Down Expand Up @@ -904,6 +906,12 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
)
}

private onCloseNotifications = () => {
this.setState({
isNotificationsCenterOpen: undefined,
})
}

private onToggleSupportPanel = () => {
this.setState({
isSupportPanelOpen: !this.state.isSupportPanelOpen,
Expand Down Expand Up @@ -1369,6 +1377,8 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
>
<SelectedElementsContext.Consumer>
{(selectionContext) => {
const isPropertiesPanelOpen = selectionContext.listSelectedElements().length > 0

return (
<div
className={classNames('rundown-view', {
Expand Down Expand Up @@ -1461,13 +1471,13 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
</ErrorBoundary>
<ErrorBoundary>
<AnimatePresence>
{this.state.isNotificationsCenterOpen && (
{!isPropertiesPanelOpen && this.state.isNotificationsCenterOpen && (
<NotificationCenterPanel
filter={this.state.isNotificationsCenterOpen}
hideRundownHeader={this.props.hideRundownHeader}
/>
)}
{!this.state.isNotificationsCenterOpen && selectionContext.listSelectedElements().length > 0 && (
{isPropertiesPanelOpen && (
<div>
<PropertiesPanel />
</div>
Expand Down Expand Up @@ -1518,7 +1528,10 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps,
onQueueNextSegment={this.onQueueNextSegment}
onSetQuickLoopStart={this.onSetQuickLoopStart}
onSetQuickLoopEnd={this.onSetQuickLoopEnd}
onEditProps={(selection) => selectionContext.clearAndSetSelection(selection)}
onEditProps={(selection) => {
this.setState({ isNotificationsCenterOpen: undefined })
selectionContext.clearAndSetSelection(selection)
}}
studioMode={this.props.userPermissions.studio}
enablePlayFromAnywhere={!!studio.settings.enablePlayFromAnywhere}
enableQuickLoop={!!studio.settings.enableQuickLoop}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useState } from 'react'
import React, { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useRef, useState } from 'react'
import {
AdLibActionId,
PartId,
Expand Down Expand Up @@ -215,12 +215,21 @@ export function useSelectedElements(
const [segment, setSegment] = useState<DBSegment | undefined>(undefined)
const rundownId = piece ? piece.startRundownId : part ? part.rundownId : segment?.rundownId

const lastValidPiece = useRef<Piece | undefined>(undefined)

useEffect(() => {
clearPendingChange() // element id changed so any pending change is for an old element

const computation = Tracker.nonreactive(() =>
Tracker.autorun(() => {
const piece = Pieces.findOne(selectedElement?.elementId)
let piece = Pieces.findOne(selectedElement?.elementId)

if (!piece && lastValidPiece.current && lastValidPiece.current._id === selectedElement?.elementId) {
piece = lastValidPiece.current
} else if (piece) {
lastValidPiece.current = piece
}

const part = UIParts.findOne({ _id: piece ? piece.startPartId : selectedElement?.elementId })
const segment = Segments.findOne({ _id: part ? part.segmentId : selectedElement?.elementId })

Expand Down
Loading
Loading