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

Use different root for renderWhenVisible #7415

Merged
merged 12 commits into from
Jan 29, 2024

Conversation

scottbell
Copy link
Contributor

@scottbell scottbell commented Jan 25, 2024

Closes #7405

Describe your changes:

Using the viewport for the IntersectionObserver was causing timing issues when rendering objects on page load. As the application loads itself, the ObjectView can be rendered well off the page, causing the IntersectionObserver to state that the ObjectView is hidden. Strangely, this doesn't appear to be recoverable as I think we're becoming visible through an event that isn't listened to by the IntersectionObserver. Instead, we can use the Open MCT root element as the root object for the IntersectionObserver.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Is this a breaking change to be called out in the release notes?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

@scottbell scottbell linked an issue Jan 25, 2024 that may be closed by this pull request
7 tasks
@scottbell scottbell added this to the Target:4.0.0 milestone Jan 25, 2024
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (5c21c34) 55.53% compared to head (c048192) 55.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7415      +/-   ##
==========================================
+ Coverage   55.53%   55.62%   +0.08%     
==========================================
  Files         668      668              
  Lines       26701    26704       +3     
  Branches     2585     2585              
==========================================
+ Hits        14828    14853      +25     
+ Misses      11159    11139      -20     
+ Partials      714      712       -2     
Flag Coverage Δ
e2e-full 41.74% <ø> (-0.01%) ⬇️
e2e-stable 59.50% <75.00%> (+0.38%) ⬆️
unit 48.65% <75.00%> (+0.03%) ⬆️
Files Coverage Δ
src/plugins/plot/chart/MctChart.vue 43.47% <100.00%> (-0.41%) ⬇️
...ctorDataVisualization/NumericDataInspectorView.vue 0.00% <0.00%> (ø)
src/ui/components/ObjectView.vue 48.13% <50.00%> (ø)
src/utils/visibility/VisibilityObserver.js 90.00% <75.00%> (+0.34%) ⬆️

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c21c34...c048192. Read the comment docs.

@scottbell scottbell requested a review from ozyx January 25, 2024 13:31
@scottbell scottbell marked this pull request as ready for review January 25, 2024 14:15
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 25, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 25, 2024
Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

Not sure how to fix, but I can still reliably reproduce the issue both in e2e test (by running it in a docker container w/ repeatEach: 10), and manually. :/

@scottbell scottbell marked this pull request as draft January 25, 2024 19:30
@scottbell scottbell changed the title Rebuild renderWhenVisible when the ObjectView changes Use different root for renderWhenVisible Jan 29, 2024
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 29, 2024
@scottbell scottbell requested a review from ozyx January 29, 2024 20:11
@scottbell scottbell marked this pull request as ready for review January 29, 2024 20:11
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 29, 2024
Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

LGTM overall, let's just add some comments

src/plugins/plot/chart/MctChart.vue Outdated Show resolved Hide resolved
src/plugins/plot/chart/MctChart.vue Outdated Show resolved Hide resolved
@scottbell scottbell requested a review from ozyx January 29, 2024 21:40
@scottbell scottbell added pr:e2e:couchdb npm run test:e2e:couchdb and removed pr:e2e:couchdb npm run test:e2e:couchdb labels Jan 29, 2024
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 29, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 29, 2024
@unlikelyzero unlikelyzero added the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 29, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 29, 2024
@unlikelyzero unlikelyzero merged commit f8d936a into master Jan 29, 2024
19 of 20 checks passed
@unlikelyzero unlikelyzero deleted the 7405-canvas-sometimes-dies-on-refresh branch January 29, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Canvas sometimes dies on refresh
3 participants