Skip to content
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

feat(LSG): add buckets topic #1370

Open
wants to merge 4 commits into
base: release53
Choose a base branch
from

Conversation

ianshade
Copy link
Contributor

@ianshade ianshade commented Jan 28, 2025

About the Contributor

This pull request is posted on behalf of TV 2 Norge

Type of Contribution

This is a:

Feature

Current Behavior

New Behavior

Buckets with their adLibs and actions are published as an LSG topic. Only adLibs and actions valid for all variants (showStyleVariantId === null) are included, but further contributions are welcome to lift this limitation, should anyone need it.

Testing

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Affected areas

This PR affects the Live Status Gateway functionally. In order to achieve that, some types and a publication used by other packages in the core monorepo are moved around, some publications have their parameters changed

Time Frame

Not urgent, but it would be nice to have in release 52

Other Information

These changes were so far tested only on release50, with release51 LSG.
This branch also includes changes from #1367. Before that one is merged, and this one is rebased, only all but the oldest commit on this branch are to be reviewed.

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@ianshade ianshade requested a review from a team as a code owner January 28, 2025 21:56
Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 54.37352% with 193 lines in your changes missing coverage. Please review.

Project coverage is 56.86%. Comparing base (054dcb1) to head (6e12eff).
Report is 18 commits behind head on release52.

Files with missing lines Patch % Lines
packages/live-status-gateway/src/wsHandler.ts 14.14% 84 Missing and 1 partial ⚠️
...ckages/live-status-gateway/src/helpers/equality.ts 6.81% 41 Missing ⚠️
meteor/server/publications/buckets.ts 0.00% 39 Missing ⚠️
...ages/live-status-gateway/src/topics/adLibsTopic.ts 75.00% 14 Missing ⚠️
...e-status-gateway/src/topics/activePlaylistTopic.ts 84.21% 9 Missing ⚠️
...ges/live-status-gateway/src/topics/bucketsTopic.ts 96.49% 2 Missing ⚠️
meteor/server/api/rest/v1/typeConversion.ts 0.00% 1 Missing ⚠️
...cations/pieceContentStatusUI/bucket/publication.ts 0.00% 1 Missing ⚠️
...es/live-status-gateway/src/topics/segmentsTopic.ts 96.42% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           release52    #1370      +/-   ##
=============================================
+ Coverage      56.48%   56.86%   +0.37%     
=============================================
  Files            401      392       -9     
  Lines          72257    71758     -499     
  Branches        4170     4412     +242     
=============================================
- Hits           40816    40804      -12     
+ Misses         31204    30816     -388     
+ Partials         237      138      -99     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

currently only featuring adLibs and actions valid for all variants (showStyleVariantId === null)
@nytamin nytamin added Contribution External contribution Contribution from TV 2 Norge Contributions sponsored by TV 2 Norge (tv2.no) labels Jan 29, 2025
@nytamin nytamin changed the base branch from release52 to release53 February 4, 2025 14:16
@@ -24,7 +24,7 @@ Currently, there is not a very clearly defined flow for modifying these document
This includes:

- [Blueprints](https://github.com/nrkno/sofie-core/blob/master/packages/corelib/src/dataModel/Blueprint.ts)
- [Buckets](https://github.com/nrkno/sofie-core/blob/master/meteor/lib/collections/Buckets.ts)
- [Buckets](https://github.com/nrkno/sofie-core/blob/master/packages/corelib/src/dataModel/Bucket.ts)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably let this be? This refers to historical information anyway, so will not align with the rest of documentation.

return {
id: bucketId,
name: bucket.name,
adLibs: [...bucketAdLibs, ...bucketAdLibActions],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be sorted according to the _rank of the original objects? I feel like it probably should, considering this is returned as an ordered array? As a Sofie user, I would expect the order to be retained (since I can reorder them in the UI). Especially, since if they aren't sorted, any ordering is gone and there's no way of recovering it. I would expect the users to be using reordering for Bucket organization (keeping the "hottest" clip at the begining or whatever else makes sense in one's workflow). I see that adLibsTopic keeps sorting, so maybe we could use a similar thing here.

jstarpl

This comment was marked as duplicate.

Copy link
Member

@jstarpl jstarpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a lot of comments, but I think it would be nice if sorting of the Buckets and Bucket AdLibs was retained in the LSG output, like it is in other topics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution from TV 2 Norge Contributions sponsored by TV 2 Norge (tv2.no) Contribution External contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants