-
Notifications
You must be signed in to change notification settings - Fork 1
feat: director screen improvements #65
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
Conversation
a72355f to
9b8a1ef
Compare
273a835 to
7b9bcdc
Compare
3d1528b to
947ab7d
Compare
947ab7d to
77a908f
Compare
77a908f to
575bb32
Compare
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.
Pull request overview
This PR enhances the Director Screen to provide better timing information in rehearsal and for untimed first parts. It refactors the top section into a separate component, adds logic to handle "rehearsal end" timing, and improves the countdown display for untimed first parts.
Changes:
- Extracted director screen top section into a separate
DirectorScreenTopcomponent - Added support for "rehearsal end" timing that counts from the first timed part's take time plus program duration
- Modified the countdown logic to retain "Time to planned start" when the first part(s) are untimed
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| DirectorScreenTop.tsx | New component handling top section with rehearsal timing logic |
| DirectorScreen.tsx | Refactored to use new component, added logic to show countdown for untimed first parts, updated to use partInstanceToCountTimeFrom |
| ClockView.tsx | Updated import path for DirectorScreen |
| counterComponents.scss | Removed text alignment styles from time-to-planned-end counter |
| director.scss | Added styles for countdown display and updated text alignment for planned-to labels |
| rundownPlaylistUtil.ts | Added logic to find the first taken timed/untimed part instance for countdown purposes |
Comments suppressed due to low confidence (1)
packages/webui/src/client/ui/ClockView/DirectorScreen/DirectorScreen.tsx:491
- This string should be wrapped in the translation function
t()for internationalization consistency, like all other user-facing strings in this component.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const areAllPartsTimed = !!UIPartInstances.findOne({ | ||
| rundownId: { $in: unorderedRundownIds }, | ||
| ['part.untimed']: { $ne: true }, | ||
| }) |
Copilot
AI
Jan 15, 2026
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.
The variable name areAllPartsTimed is misleading. This query checks if ANY part is timed (not untimed), not if ALL parts are timed. Consider renaming to anyTimedPartExists or hasTimedParts to better reflect what the query actually checks.
| const areAllPartsTimed = !!UIPartInstances.findOne({ | ||
| rundownId: { $in: unorderedRundownIds }, | ||
| ['part.untimed']: { $ne: true }, | ||
| }) | ||
|
|
||
| const partInstanceToCountTimeFrom = UIPartInstances.findOne( | ||
| { | ||
| rundownId: { $in: unorderedRundownIds }, | ||
| reset: { $ne: true }, | ||
| takeCount: { $exists: true }, | ||
| ['part.untimed']: { $ne: areAllPartsTimed }, | ||
| }, | ||
| { sort: { takeCount: 1 } } | ||
| ) | ||
|
|
Copilot
AI
Jan 15, 2026
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.
The logic here is incorrect. When areAllPartsTimed is true (meaning a timed part exists), the query searches for parts where part.untimed is not equal to true, which returns timed parts. When areAllPartsTimed is false (no timed parts exist), it searches for parts where part.untimed is not equal to false, which returns untimed parts. This logic seems inverted and confusing. Based on the PR description, you want to find the first timed part if any exist, otherwise the first untimed part. The query should be: ['part.untimed']: { $ne: !!areAllPartsTimed } or better yet, restructure with clearer logic using two separate queries.
| const areAllPartsTimed = !!UIPartInstances.findOne({ | |
| rundownId: { $in: unorderedRundownIds }, | |
| ['part.untimed']: { $ne: true }, | |
| }) | |
| const partInstanceToCountTimeFrom = UIPartInstances.findOne( | |
| { | |
| rundownId: { $in: unorderedRundownIds }, | |
| reset: { $ne: true }, | |
| takeCount: { $exists: true }, | |
| ['part.untimed']: { $ne: areAllPartsTimed }, | |
| }, | |
| { sort: { takeCount: 1 } } | |
| ) | |
| const hasTimedParts = !!UIPartInstances.findOne({ | |
| rundownId: { $in: unorderedRundownIds }, | |
| ['part.untimed']: { $ne: true }, | |
| }) | |
| const partInstanceQuery: MongoQuery<PartInstance> = { | |
| rundownId: { $in: unorderedRundownIds }, | |
| reset: { $ne: true }, | |
| takeCount: { $exists: true }, | |
| } | |
| partInstanceQuery['part.untimed'] = { $ne: hasTimedParts ? true : false } | |
| const partInstanceToCountTimeFrom = UIPartInstances.findOne(partInstanceQuery, { | |
| sort: { takeCount: 1 }, | |
| }) |
| grid-row: 2; | ||
| grid-column: 2; | ||
| text-align: center; | ||
| width: 100vw; |
Copilot
AI
Jan 15, 2026
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.
The magic number -13vw for margin-left lacks explanation. Consider adding a comment explaining why this specific offset is needed for centering or layout purposes.
| width: 100vw; | |
| width: 100vw; | |
| // Compensate for the 100vw width so the content appears centered within the grid column on director screens. |
About the Contributor
This pull request is posted on behalf of the BBC.
Type of Contribution
This is a: Feature
Current Behavior
Countdown to start
The counter in the Director Screen counts to the planned start, and stops counting when the first part is taken, regardless if it's untimed or not.
Rehearsal timing
The counter counts to the planned end which is unhelpful if you're rehearsing an hour before the planned start (or practicing with an old running order)
New Behavior
Countdown to start
When the countdown to planned start is shown in the On-Air part area (before the first take command has occurred) a label has been added to show "Time to planned start"
If the first part(s) are untimed then it retains the countdown to start rather than showing the on-air part.
As the first part(s) are untimed the start time is still very relevant for knowing when to take the first timed part.
Rehearsal timing
After the first timed part is taken, the Time to Planned End countdown in the top portion of the Director Screen shows a Time to Rehearsal End countdown.
It counts towards the end of the program duration (I.E. End = Time of first timed take + program duration)
Testing
Affected areas
Director Screen
Time Frame
Not urgent, but we would like to get this merged into the in-development release.
Other Information
Status