-
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
[DataGrid] Enable Auto Fit
behavior when Cell row height
- Custom
is selected
#7835
Comments
Auto Fit
behavior when Cell row height
- Custom
is selected
@kertal Are you able to provide a codesandbox that illustrates this behavior? I'm having trouble understanding. |
@JasonStoltz best to show you in our 1:1 tomorrow :) |
I just spoke with @kertal and he mentioned that there are potentially 2 solutions for this: 1. Add a "max" option to "autofit". Meaning, meaning "autofit" could be adjusted to accept a maximum number of lines displayed.
@cee-chen mentioned that there is an implicit trade-off between "autofit" and "custom" currently:
Considering the above, I would propose that option 1 is the preferable option as it is just a simple tweak to the existing calculation for autofit. I do not believe this would have a considerable impact on "autofit"'s performance and "custom" would remain the simple, performant option. @cee-chen Does that sound doable? And would you size this as a small, medium, or large effort? @MichaelMarcialis Does that sound reasonable from a UX perspective? |
If there are any performance considerations regarding this change, we could use our |
@kertal Hey Matthias. I discussed this a bit with @cee-chen. We came up with a few additional points and questions --
I set up some time for us to talk through this in a few weeks. But if we can figure some of this out async in this issue ahead of then that works too! |
If I may, I'd like to make a pitch for the 2nd solution you mention above, using a UI along the lines of this screenshot: My thinking is as follows:
|
@JasonStoltz I can answer on the user usage. We are expecting users will use it because we need it as part of making Discover context aware and where users will be exploring several different data types that requires the Max to make the data density optimal. Do I understand the proposal currently that if we go with upgrading auto fit with max then it would be a small task? |
Regardless of what path we choose, I don't believe it would be a small task, but also not huge. I would estimate this at 1-2 weeks of work. Besides the actual effort, it will require due diligence to ensure don't impact rendering performance.
Just to rephrase that to check my own understanding: We won't know what sort of data is being used by Discover, so we need to offer more row height customizations so that users can find a view that works best for them. We on the Kibana side can't assume the type of data being viewed. @MichaelMarcialis It's a good point Michael. Changing the default of Custom may be the right move here, unless there is a clear use case where users would want all lines uniformly the same height. Changing the default seems to be less clicks and more intuitive for users. I'm neutral on whether or not to keep "Single". It sounds like if we remove it, the default become "Custom: 1" as seen in your screenshot. Even though "Single" is functionally equivalent to "Custom: 1", it does seem a bit more intuitive to just click "Single". I'm good any way though. @tkajtoch If you get a chance, can you poke around at this technically and see if you're able to give us any technical insight on the level of effort here? |
@ninoslavmiskovic: Given that @JasonStoltz's estimated LOE of the two options is approximately the same, determining the best user experience appears to be the only real deciding factor. Unless we have a known use case to continue having "Custom" row heights behave as absolute and uniform, then my personal recommendation is to proceed with what I've recommended above. Do you agree? Or do you have any concerns with that approach? Just let us know! Also CCing @kertal, @andreadelrio, @ryankeairns, in case they wish to weigh in as well. |
@MichaelMarcialis I like it - fewer click for the users. Do you have any concerns @kertal or @davismcphee ? |
++ to @MichaelMarcialis' suggestion. I don't see much if any value to users in having absolute custom row heights, and I like the simplification of the settings UI. |
++ from my end for @MichaelMarcialis suggestion, it's a nice simplification and definitely makes sense for Discover. If there are performance concerns, or concern that it might be a breaking change, it could be introduced with a feature flag like @tkajtoch suggested:
We could measure the performance impact with a performance profile. So far we haven't heard complains since introducing Auto-Fit in Discover, but it's also not the default setting. |
One ask @MichaelMarcialis, according to your mocks, you ask for the same for the header cell lines, right? |
Good question. The mockup I shared in my comment above was intended to show my thoughts for the default EUI data grid options. For Discover's specific use case, I think we can continue to have separate controls for header and body (per the mockups for Discover content-aware logs). |
I met with @MichaelMarcialis @kertal and @cee-chen to talk through this one a bit. Our primary concern is still around performance. The EUI team agreed to make this change initially as a "spike" which we can hand off to @kertal and team to do some testing to make sure there won't be significant performance impact as a result of this. If we can validate that the performance won't be a blocker, we can proceed with this change. |
@cee-chen I've a question around performance. What should we aim to configure for testing. For context, I've been comparing performance when there are 2 columns configured, pagination is disabled, 10.000 rows are returned via ES|QL it was pretty fast, didn't test multiple times, so number may vary. But I guess it's the case when there are multiple columns configured? in this case Auto Fit was a bit faster, however it's just a quick test, not isolated, not done multiple times, but sufficient to start a conversion Then I tested with 10 columns, again, it was fast (Auto fit left, Custom, right), a bit more calculaton time on the auto fit side, but very little To test it: FYI @flash1293 @davismcphee @stratoula , so if we want to remove pagination in Discover/ES|QL , I don't think in terms of performance it's a problem. Loading 10000 records in my setup and with the given test data doesn't seem to be a problem |
Thanks for confirming @kertal ! I still think it's the right call, let's discuss with @ninoslavmiskovic once he's back |
We should handle #7951 when we work on this one. |
@kertal @MichaelMarcialis Apologies that it's been a while since we picked this issue up - but just to clarify, is the scope of this PR just to remove the As in: we're not enabling auto-fit height for the |
In my understanding the original intend of this issue would be to enable auto-fit height for the line count, and coming with that to remove the single button ... it might make sense to split this up |
@kertal Do you mind providing a timeline/priority for the two separate requests (first is simplifying the control/selector UI, and the second is actually changing how the |
Priority wise changing the lineCount behavior I'd consider as having a bigger impact. But we wanted to test / feature flag it, test it in Discover before enabling as OOTB behavior, didn't we? 🙏 (FYI @timductive ) |
This functionality is now achievable via a feature flag in the <EuiDataGrid
rowHeightsOptions={{
autoBelowLineCount: true,
defaultHeight: { lineCount: 3 },
}}
// ... rest of props
/> Also see https://eui.elastic.co/pr_8096/storybook/?path=/story/tabular-content-euidatagrid-rowheightsoptions-prop--auto-below-line-count for an example of the behavior in the UI. |
Thanks @cee-chen! This is awesome news and much appreciated 🙏 |
Thx @cee-chen 🙇 that's great! |
Is your feature request related to a problem? Please describe.
When configuring a Custom - Cell row height in EuiDataGrid, depending on the displayed content, this can lead to lots of whitespace, e.g. when there's a lot of short content to be displayed.
Example:
When configuring an Auto fit - Cell row height in EuiDataGrid, this can lead to very large rows, when there's lots of text that needs to be displayed. E.g. JAVA Error messages.
For very short and very long content no current mode is optimal.
Describe the solution you'd like
For the optimal usage of space, it would be great if the Custom - Cell row height would treat the setting as max cell height to be displayed. But if all the cells have just a single line of content, it would be treated like Auto fit. This would provide improve the displayed information density. Since this would significantly change a given behavior of the grid, it could be a configuration flag, enabling this behavior
Describe alternatives you've considered
Provide a separate setting for the Auto fit mode, so it configured what's the maximum height a cell can have, to prevent Skyscraper like cells.
Desired timeline
Since we are working on improving the Logs experience, in Discover working on Contextual Awareness and for this, better information density is essential, sooner is better than later.
The text was updated successfully, but these errors were encountered: