-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[SIEM] Attach VisibilitySensor to the TimelineBody instead of window #55620
[SIEM] Attach VisibilitySensor to the TimelineBody instead of window #55620
Conversation
Pinging @elastic/siem (Team:SIEM) |
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.
Tried it out locally, and things are working as described! Event rows are rendered as the table's viewport changes (scrolling the table), not as the window's viewport does (scrolling the page).
I agree that this seems like the intended behavior, but I'll defer to someone who was here when this was written :)
@patrykkopycinski one other thought: we're unmounting these rows as they go out of view and thus throwing away all the work we just did to render it. Is this intentional (so that we always have "fresh" data)? If not, there's another optimization there. |
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.
@FrankHassanabad @rylnd and I reviewed this PR over a zoom with @patrykkopycinski , and we all agree with and appreciate the perf improvement in this PR. Thanks @patrykkopycinski 🙏
LGT(US)
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Summary
Currently, VisibilitySensor is attached to the window, so in effect, when we scroll the page, the Timeline table's rows are replaced by placeholders and it causes unnecessary re-renders of the components.
In my opinion, the expected behavior is to render placeholders only when we scroll the table and the row is stop being visible in the context of the table not in the context of the window.
Current:
![kM3J4XYVq6](https://user-images.githubusercontent.com/5188868/72936869-5cbced80-3d68-11ea-9bf8-acedbb7bf4a6.gif)
After the changes:
![L75G8VmjPQ](https://user-images.githubusercontent.com/5188868/72937053-b1f8ff00-3d68-11ea-89b1-a8c53ef69ce3.gif)
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers