Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Defer rendering for inactive tabs in open mct tabbed view #7149
Defer rendering for inactive tabs in open mct tabbed view #7149
Changes from all commits
4c922c6
5fc3875
da342a9
41026dc
2515d06
161b0d9
0911667
a62ab28
4c74ab1
b60b822
35b237a
20acc8f
fae985d
da43b5f
5942a5c
492f504
09d491e
2148515
f06e5f3
9d785b3
1ca9fcf
22e7793
d2a4e43
7b55b72
c57a618
24acb3a
b4795e4
66c904f
6ebf682
da1ca55
fb6e431
0c4cd6a
88efe20
1406096
8f718d4
bc21335
6866a03
4e9c9b8
f1c70a1
69a3130
7f857ec
f7b3c51
7c99541
829457e
aaed525
363524a
25c457d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
As much as I love this name, is there a more descriptive name we could give it? Maybe "VisibilityObserver" with a function called
renderWhenVisible
or something?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.
Boring 😀 but will do!
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.
How is initial state established here? From my reading of the API the IntersectionObserver detects changes in inersection, but how do we know whether or not the element is intersecting when we create the observer?
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.
We assume it's visible until the IntersectionObserver tells us otherwise. The IntersectionObserver, upon registering, will eventually tell us via callback its initial state (see second bullet):
so we'll eventually know whether it's visible or not, and stop future calls to
requestAnimationFrame
.