[EuiDataGrid] Auto-fit rows to content#4958
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
chandlerprall
left a comment
There was a problem hiding this comment.
Couple questions to start with (some were made as comments in particular code locations)
I'm curious if you've tried a resize observer or similar to respond to changes in cell contents, instead of only during mount or onCellLoaded is called?
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
chandlerprall
left a comment
There was a problem hiding this comment.
With the resize observer, these changes are easier to follow & my experience playing with the result seems to be better & more stable 👍
The scroll bar acts a little weird while scrolling. Without knowing all of the row heights, I don't think this behaviour is avoidable when scrolling down, but it seems that the grid loses its knowledge of row heights while scrolling back up.
datagrid_scrolling.mov
Could you please provide a video or gif for this? |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
I pushed changes. @cchaos could you please take a look? |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
If we try to fix in this PR (I'm good with Elizabet's recommendation to solve it separately), @VladLasitsa
|
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Let's resolve the flashing content in a separate PR; I think it'd be good to do some more investigation into the issue & solutions first, and don't want to hold auto-fitting up for that. |
This reverts commit d1d4305.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4958/ |
|
@cchaos, @VladLasitsa, and @chandlerprall, I updated both height demos and the density is now working. To make it work I used relative font sizes in EuiText and EuiMarkdownFormat. I also tried to explain better how the font size overriding works. Feel free o suggest a better explanation. |
There was a problem hiding this comment.
I finished the design review. Tested in Chrome, Safari, Edge and Firefox, and LGTM. 🎉
The only issue I can still find is this one: #4958 (comment). I was not able to solve it.
And thanks @VladLasitsa for all the effort and patient. This feature looks amazing! 👍🏽
chandlerprall
left a comment
There was a problem hiding this comment.
Thank you @VladLasitsa for so much effort on this project, and everyone else's fantastic attention to detail in reviews & additional contributions. Y'all are awesome ❤️
This looks ready to merge, I'll make a new issue to track #4958 (comment) as it exists on master separate from these changes.




Closes: #4795
Summary
Adds 'auto' as value for
defaultHeightfromrowHeightsOptionswhich allow to rows auto fit to content.