-
Notifications
You must be signed in to change notification settings - Fork 840
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
[EuiDataGrid] Virtualization #4170
[EuiDataGrid] Virtualization #4170
Conversation
787da9f
to
b0d616f
Compare
721cc29
to
653a313
Compare
Pushed some fixes. Still have the following todo:
|
flaky network, jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4170/ |
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.
Well, I accidentally loaded the old DataGrid and was testing that one, and it immediately kicked my Chrome up to 100% CPU... Now that I got this one running, my fans are quiet as a mouse. 🐭 So fantastic job there! 🎉
The only thing that I wish was a bit snappier is when changing any sort of client-side display of the datagrid like sorting, or changing of the rows per page, or the density (at a high number of rows). It's less that the grid itself takes a long time to make that change, but that the selection itself does. For instance the button group button doesn't show selected until the data grid has completely re-rendered. Not sure really what can be done there.
Also it's actually quite sluggish in Full Screen mode when scrolling 100 rows. This may have to do with the fact that it's no longer using the browser's page scroll but an internal overflow.
Some other things I noticed:
1. The density adjustments no longer seem to be changing the overall height of the cells.
There seems to be some calculations going that always come out to make the cells 34px
high.
2. In full screen mode, the initial calculation doesn't take the scrollbar into account
3. Visually I think we need more borders especially around the scrollbars
4. It would be great if while scrolling with virtualization which shows a white background while the cells load, we could have either add in some light gray like $euiPageBackgroundColor
, or even some sort of pattern indication "loading".
5. It looks like we also need a smarter pagination display on skinny screens/containers.
6. In full screen, the bottom row is still getting cutoff by the fixed pagination and it's hiding the horizontal scrollbar.
A few of these items could be quick follow ups. Just wasn't sure what is known.
@@ -191,7 +192,7 @@ const trailingControlColumns = [ | |||
ownFocus={true}> | |||
<EuiPopoverTitle>Actions</EuiPopoverTitle> | |||
<div style={{ width: 150 }}> | |||
<button onClick={() => {}} component="span"> | |||
<button onClick={() => {}}> |
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.
This has been bugging me a bunch in our docs. Why do we have a button (icon) within a <button>
instead of just using a context menu?
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.
There's also a whole bunch of console error because of the nested <button>
s.
@chandlerprall I can do a pass on some of that feedback. The only one I might skip @cchaos is the border one. Usually we have some sort of container in these cases that requires extra css (for example, discover). I think it's better to leave it more neutral and leave the css layer as additive based on the implementation. |
I still think it's important to add borders to the scrollbars or something. The white space is jarring when it just cuts off the content or looks like odd spacing between in and the pagination. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4170/ |
I'll let Dave take a pass at those items, but I'll add that performance is largely addressed by a PR Joe put up against my branch. It moves a number of things around which makes reviewing the virtualization effort harder, |
Less wrapper elements
Since the main virtualization changes have been reviewed, as has @flash1293's awesome performance changes, I've merged those additional optimizations in to ease testing & further review/conversation. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4170/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4170/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4170/ |
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.
This is great 🙌
Confirmed the upgrade path in Kibana (aside from unit tests)
The noted follow-up tasks cover the remaining functional issues
Preview documentation changes for this PR: https://eui.elastic.co/pr_4170/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4170/ |
Summary
( Fixes #4365 in 5328347 )
Added a new docs page, Data grid virtualization, to demonstrate the effect of virtualization & how to configure a grid's dimensions through props or DOM layout.
Need to write actual documentation for using/configuring the virtualization, everything else is ready for review.
Issues needing a fix:
Items for follow up PRs:
Props
Added optional
height
andwidth
props that accept valid CSS values.Constrained layout
react-window
Checklist
[ ] Checked Code Sandbox works for the any docs examples