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

fix: resolve an issue with prompter jumping when Parts become PartInstances #1249

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

jstarpl
Copy link
Member

@jstarpl jstarpl commented Aug 26, 2024

About the Contributor

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a:

Bug fix

Current Behavior

When the prompter is positioned in a “next-to-be-next” Part, making it become next will make the Prompter jump to the “was-next-just-before/now-is-on-air” Part. The position of the prompter needs to be just right for this to happen, such as when using “go to next/previous part”. Other positions can work too, but the window of tolerance for this is pretty small.

New Behavior

Prompter should maintain its position when the Part in the viewport is repositioned in ENPS, when Parts are repositioned around the Part in the viewport, it should also maintain it’s position when setting the position “just right” (such as explained in Observed behavior section) and doing Takes in Sofie.

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 prompter

Time Frame

This Bug Fix is critical for us, please review and merge it as soon as possible.

Other Information

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.

…ances and the prompter position is juuuust right
@jstarpl jstarpl requested a review from a team as a code owner August 26, 2024 14:08
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 58.12%. Comparing base (eac0a9d) to head (a670a73).
Report is 39 commits behind head on release50.

Files with missing lines Patch % Lines
meteor/client/ui/Prompter/prompter.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           release50    #1249      +/-   ##
=============================================
+ Coverage      57.99%   58.12%   +0.13%     
=============================================
  Files            481      483       +2     
  Lines          79177    79529     +352     
  Branches        3479     4035     +556     
=============================================
+ Hits           45916    46227     +311     
- Misses         33240    33246       +6     
- Partials          21       56      +35     

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

Comment on lines +187 to +188
id: partInstance.part._id,
partInstanceId: partInstance._id,
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to reviewer: this is the important bit.

@@ -881,9 +887,10 @@ export const Prompter = translateWithTracker<PropsWithChildren<IPrompterProps>,
segment.parts.forEach((part) => {
lines.push(
<div
id={`partInstance_${part.id}`}
id={`part_${part.id}`}
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to reviewer: this is the important bit. This will make the prompter treat PartInstances (temporary or not) of the same Part as the same Part, instead of an unrelated third Part.

@jstarpl jstarpl merged commit 7f7e23e into release50 Sep 19, 2024
67 of 68 checks passed
@jstarpl jstarpl deleted the fix/ho-prompter/sofie-3082 branch September 19, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants