-
Notifications
You must be signed in to change notification settings - Fork 57
feat: improve UX in properties editor #1620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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 { | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -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%); | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+212
to
221
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the extra blank line before Stylelint is still flagging this hunk with Suggested change right: 0;
-
background: linear-gradient(
-45deg,
$color-status-fatal 33%,📝 Committable suggestion
Suggested change
🧰 Tools🪛 Stylelint (17.4.0)[error] 212-221: Unexpected empty line before declaration (declaration-empty-line-before) (declaration-empty-line-before) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -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, | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -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, | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1566,8 +1569,7 @@ svg.icon { | |||||||||||||||||||||||||||||||||||||||||||
| right: 1px; | ||||||||||||||||||||||||||||||||||||||||||||
| z-index: 10; | ||||||||||||||||||||||||||||||||||||||||||||
| pointer-events: all; | ||||||||||||||||||||||||||||||||||||||||||||
| background-image: | ||||||||||||||||||||||||||||||||||||||||||||
| repeating-linear-gradient( | ||||||||||||||||||||||||||||||||||||||||||||
| background-image: repeating-linear-gradient( | ||||||||||||||||||||||||||||||||||||||||||||
| 45deg, | ||||||||||||||||||||||||||||||||||||||||||||
| var(--invalid-reason-color-transparent) 0%, | ||||||||||||||||||||||||||||||||||||||||||||
| var(--invalid-reason-color-transparent) 5px, | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -380,6 +380,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) | ||
|
|
@@ -623,6 +624,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) => { | ||
|
|
@@ -906,6 +908,12 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps, | |
| ) | ||
| } | ||
|
|
||
| private onCloseNotifications = () => { | ||
| this.setState({ | ||
| isNotificationsCenterOpen: undefined, | ||
| }) | ||
| } | ||
|
Comment on lines
+911
to
+915
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sync the global notification-center flag when these paths auto-close it. Lines 1200-1204 keep Suggested change private onCloseNotifications = () => {
+ NotificationCenter.isOpen = false
this.setState({
isNotificationsCenterOpen: undefined,
})
}
@@
onEditProps={(selection) => {
+ NotificationCenter.isOpen = false
this.setState({ isNotificationsCenterOpen: undefined })
selectionContext.clearAndSetSelection(selection)
}}Also applies to: 1536-1539 🤖 Prompt for AI Agents |
||
|
|
||
| private onToggleSupportPanel = () => { | ||
| this.setState({ | ||
| isSupportPanelOpen: !this.state.isSupportPanelOpen, | ||
|
|
@@ -1372,6 +1380,8 @@ const RundownViewContent = translateWithTracker<IPropsWithReady & ITrackedProps, | |
| <DragContextProvider t={t}> | ||
| <SelectedElementsContext.Consumer> | ||
| {(selectionContext) => { | ||
| const isPropertiesPanelOpen = selectionContext.listSelectedElements().length > 0 | ||
|
|
||
| return ( | ||
| <div | ||
| className={classNames('rundown-view', { | ||
|
|
@@ -1464,13 +1474,14 @@ 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 && | ||
| {isPropertiesPanelOpen && | ||
| !this.state.isNotificationsCenterOpen && | ||
| selectionContext.listSelectedElements().length > 0 && ( | ||
| <div> | ||
| <PropertiesPanel /> | ||
|
|
@@ -1522,7 +1533,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} | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -58,6 +58,7 @@ import * as RundownResolver from '../../lib/RundownResolver.js' | |||||||||||||||||||||||||||||||||||||||||||||||||
| import { DBSegment } from '@sofie-automation/corelib/dist/dataModel/Segment' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import { SelectedElementsContext } from '../RundownView/SelectedElementsContext.js' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import { BlueprintAssetIcon } from '../../lib/Components/BlueprintAssetIcon.js' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import { hasUserEditableContent } from '../UserEditOperations/PropertiesPanel.js' | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| interface IProps { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| id: string | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1015,8 +1016,13 @@ export class SegmentTimelineClass extends React.Component<Translated<WithTiming< | |||||||||||||||||||||||||||||||||||||||||||||||||
| <div | ||||||||||||||||||||||||||||||||||||||||||||||||||
| onDoubleClick={() => { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (this.props.studio.settings.enableUserEdits) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!selectElementContext.isSelected(this.props.segment._id)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| selectElementContext.clearAndSetSelection({ type: 'segment', elementId: this.props.segment._id }) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const segment = this.props.segment | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| const hasEditableContent = hasUserEditableContent(segment) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!hasEditableContent) return | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!selectElementContext.isSelected(segment._id)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| selectElementContext.clearAndSetSelection({ type: 'segment', elementId: segment._id }) | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
1017
to
+1025
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Close notifications before selecting a segment. When the notification center is already open, this only changes the selection. Suggested change if (this.props.studio.settings.enableUserEdits) {
const segment = this.props.segment
const hasEditableContent = hasUserEditableContent(segment)
if (!hasEditableContent) return
if (!selectElementContext.isSelected(segment._id)) {
+ RundownViewEventBus.emit(RundownViewEvents.CLOSE_NOTIFICATIONS)
selectElementContext.clearAndSetSelection({ type: 'segment', elementId: segment._id })
} else {
selectElementContext.clearSelections()
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| selectElementContext.clearSelections() | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Sofie-Automation/sofie-core
Length of output: 564
🏁 Script executed:
Repository: Sofie-Automation/sofie-core
Length of output: 985
🏁 Script executed:
Repository: Sofie-Automation/sofie-core
Length of output: 1897
🏁 Script executed:
rg -n "propertiespanel-pop-up__button" packages/webui/src/client/styles/propertiesPanel.scssRepository: Sofie-Automation/sofie-core
Length of output: 331
🏁 Script executed:
Repository: Sofie-Automation/sofie-core
Length of output: 664
🏁 Script executed:
Repository: Sofie-Automation/sofie-core
Length of output: 894
🏁 Script executed:
Repository: Sofie-Automation/sofie-core
Length of output: 1826
🏁 Script executed:
Repository: Sofie-Automation/sofie-core
Length of output: 1379
Add
display: flexand remove blank line beforegap.The
.propertiespanel-pop-up__buttonselector nested inside.propertiespanel-pop-up__contents(line 236) is missing thedisplay: flexproperty that exists in the earlier declaration under.propertiespanel-pop-up__footer(line 115). Without flex display, thegap: 0.5em;property has no effect. The blank line beforegapis also a Stylelint error.Suggested change
.propertiespanel-pop-up__button { + display: flex; + align-items: center; background: `#636363`; padding: 10px; border-radius: 5px; border: 1px solid `#7f7f7f`; color: `#dfdfdf`; - gap: 0.5em;📝 Committable suggestion
🧰 Tools
🪛 Stylelint (17.4.0)
[error] 243-243: Unexpected empty line before declaration (declaration-empty-line-before)
(declaration-empty-line-before)
🤖 Prompt for AI Agents