Repository navigation
Fix/ignore piece content status - #1835
ustinvaskin wants to merge 1 commit into
Conversation
Restore the existing URL flag across timeline, storyboard, segment-list, shelf, inspector, and notification presentation paths. Constraint: Keep the URL flag client-side and distinct from the studio-wide mock content-status setting Tested: Focused Jest tests locally, ESLint, TypeScript checking, diff validation, and live UI A/B verification Not-tested: Full repository test suite
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| import type { ReadonlyDeep } from 'type-fest' | ||
| import { getIgnorePieceContentStatus } from '../localStorage.js' | ||
|
|
||
| export function getVisiblePieceContentStatusCode( |
There was a problem hiding this comment.
The flag was already available through getIgnorePieceContentStatus(), but individual UI renderers continued reading contentStatus.status directly.
| 'source-broken': contentStatus?.status === PieceStatusCode.SOURCE_BROKEN, | ||
| 'source-not-ready': contentStatus?.status === PieceStatusCode.SOURCE_NOT_READY, | ||
| 'unknown-state': contentStatus?.status === PieceStatusCode.UNKNOWN, | ||
| contentStatusCode === PieceStatusCode.SOURCE_MISSING || |
There was a problem hiding this comment.
CSS classes are now calculated from the filtered status code. When ignoring is enabled, none of those classes are added.
|
|
||
| previewSession.current?.setPointerTime( | ||
| newMousePosition * (piece.instance.piece.content.sourceDuration ?? contentStatus?.contentDuration ?? 0) | ||
| ) | ||
| } | ||
|
|
||
| const noticeLevel = getNoticeLevelForPieceStatus(contentStatus?.status) | ||
| const noticeLevel = getNoticeLevelForPieceStatus(getVisiblePieceContentStatusCode(contentStatus)) |
There was a problem hiding this comment.
The alternative Segment List view had its own warning-icon calculation and did not use pieceUiClassNames.
|
|
||
| export function VTThumbnailRenderer(props: Readonly<IProps>): JSX.Element { | ||
| const contentStatus = useContentStatusForPieceInstance(props.pieceInstance.instance) | ||
|
|
||
| const noticeLevel = getNoticeLevelForPieceStatus(contentStatus?.status) | ||
| const noticeLevel = getNoticeLevelForPieceStatus(getVisiblePieceContentStatusCode(contentStatus)) |
There was a problem hiding this comment.
Same as above was calculated was calculated from raw content status ignoring the pieceUiClassNames.
| @@ -29,7 +31,7 @@ function InspectorTitle(props: IProps): JSX.Element { | |||
| className={ClassNames( | |||
| 'shelf-inspector__title__icon', | |||
| layer && RundownUtils.getSourceLayerClassName(layer.type), | |||
| RundownUtils.getPieceStatusClassName(contentStatus?.status) | |||
| getIgnorePieceContentStatus() ? undefined : RundownUtils.getPieceStatusClassName(contentStatus?.status) | |||
There was a problem hiding this comment.
Opening the Shelf Inspector could still display a missing-media status class even though the Shelf item itself was clean.
| selected: this.props.isNext || this.props.isSelected, | ||
| }, | ||
| !this.inBucket && this.props.layer && RundownUtils.getSourceLayerClassName(this.props.layer.type), | ||
| getIgnorePieceContentStatus() |
There was a problem hiding this comment.
getPieceStatusClassName(undefined) normally returns unknown-state. That existing behavior should remain when a status is trulky unavailable. We only skip the class when the ignore flag is enabled.
About the Contributor
I am contributing an individual. You can contact me through GitHub: @ustinvaskin. or my email ustin.vaskin2011@gmail.com
Type of Contribution
This is a:
Bug fix for Fixes #1337.
Current Behavior
Fixes #1337.
The
ignore_piece_content_status=1URL parameter was read correctly, but several UI components still usedcontentStatus.statusdirectly. This caused missing-media zebra styling and warning icons to remain visible.New Behavior
When
ignore_piece_content_status=1is enabled, piece-content-status styling and warning icons are hidden consistently throughout the rundown UI.The underlying content-status data is not changed.
Testing
Compared the same rundown using:
?ignore_piece_content_status=0?ignore_piece_content_status=1Results:
Also verified Timeline, Storyboard, Segment List, Shelf, Dashboard, and Inspector views visually.
Affected areas
This PR affects content status presentation in the UI, web:
Timeline, Storyboard, Segment List views, shelf items, Dashboard buttons, and the Inspector, also rundown media-status notifications.
Time Frame
Not urgent, but we would like to get this merged into the in-development release.
Other Information
The Studio-level Mock Piece Content Status setting is a server-side overrides the entire studio and provides mock status and preview data. see the comment on the issue 1337.
The URL parameter is a client-side presentation option. It hides status warnings in the current browser w/o changing the underlying data.
Status