-
Notifications
You must be signed in to change notification settings - Fork 923
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
[Data Explorer][Discover 2.0] Dynamic adjustable row heights based on field data #4859
Comments
relabeling for 2.12, as it's unassigned with no PR open. |
I'd be interested in taking this one, Josh. |
@ananzh Can you provide @JohnathonBowers some pointers on how to load some test data to reproduce the screenshot? |
@ananzh , Is it something we need to check the _source data length and then set the line count? |
@joshuarrrr @ananzh @ashwin-pc I'm trying to replicate this bug, and I'm having some trouble. I've added sample data to my cluster using the OpenSearch API: However, I'm not sure where to go from here. I've tried to create a new VisBuilder Visualization to display the documents in my cluster. But I'm not able to replicate what Anan's screenshot is showing. Here is what I have right now: Any suggestions for how to best replicate the bug? |
Update: I have been able to replicate the bug. And, yes, it seems that what is causing the issue is the fact that The options for fixing this bug are fairly limited at this point, largely because of the built-in limitations of the As the documentaiton website for "Data grid row height options" explains, the I would appreciate any advice about the best way to move forward. It seems we have several options:
Here is the adjusted
Screen.Recording.2023-11-10.at.12.28.22.PM.mov
Perhaps we could take option 1 as a temporary solution and then open a separate issue if we wanted to pursue option 3? Any suggestions @ananzh @joshuarrrr @BSFishy ? |
@JohnathonBowers There are two solutions here. As you correctly pointed out the long term solution here is to update |
My preference would be to set the to height to auto, with a configurable max height for when it truncates. I believe advanced settings has a table row max height property we can leverage. Ideally data grid can use that setting In the fullness of time, we should be able to toggle row height between set number of lines, auto, or single line |
Related: #5227 |
@ashwin-pc I do wonder if we are able to set the row height options in the header of data grid (next to density). I know not an existing item but maybe an enhancement we can include. The options can be auto, truncate, and custom height? Having this option in advanced settings means users need to navigate away from the table to update the setting - Im guessing updating in advanced settings also applies globally to all data grid elements. I could see this be frustrating - whereas if the control is per table the user can configure it differently where they need it and they don't need to navigate away every time. Ignore me looks like you already thought about this in the linked issues. |
Yeah id stay away from the advanced setting as a whole. A datagrid and table while similar in look operate differently and asking a user to define a pixel max height is not the best control. What we need here is 2 things:
With both of these in place dealing with data per row should be easier. |
To clarify for anyone coming to this thread. The solution proposed to the issue of row heights not adapting to the field contents and the ability for the user to set the heigh at which truncation begins is being discussed here. Dynamically adjusting the row heights is being tracked by opensearch-project/oui#1172 while the interim solution is to allow the user to manually specify the number of lines they want to display per row. In future both options will be simultaneously available to the user. |
@ashwin-pc Will the changes work with log field data? |
It should work with all forms of data since its simply allowing the user to set how many lines each row should display before truncation. And yes this is slated for 2.12 |
This is not a problem for datagrid, but still missed in legacy table. |
Describe the bug
Show empty spaces when
_source
has less fields. This is because we currently hard coderowHeightsOptions
to check_source
and set to 3.The text was updated successfully, but these errors were encountered: