Skip to content
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

[Table Visualization] column autosizing #3333

Open
mmguero opened this issue Jan 26, 2023 · 2 comments
Open

[Table Visualization] column autosizing #3333

mmguero opened this issue Jan 26, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Community development is encouraged tableVis table visualization ux / ui Improvements or additions to user experience, flows, components, UI elements

Comments

@mmguero
Copy link

mmguero commented Jan 26, 2023

Is your feature request related to a problem? Please describe.

I think the new tables in OpenSearch 2.5.0 (see #2855) leave something to be desired usability wise. One of the biggest pieces of this is column widths: they're now all the same size, which means that there's a lot of wasted space. The widths can be manually adjusted by dragging the handlebar to the right of the sort drop-down, but these changes are not persistent.

Here's an example.

Before 2.5.0:

image

After 2.5.0

image

The tables pre-2.5.0 look a lot better.

Describe the solution you'd like

Add a per-visualization option (it could be in the Options tap in the Visualization editor, near the "Max rows per page", "Show partial rows", etc. values) to enable auto-size the columns in the table. It doesn't need to do it for the entire data set, just the ones that are on the current page.

@mmguero mmguero added the enhancement New feature or request label Jan 26, 2023
@ananzh ananzh self-assigned this Jan 30, 2023
@ananzh ananzh added discuss tableVis table visualization labels Jan 30, 2023
@joshuarrrr
Copy link
Member

@mmguero I think there are 2 parts of your request:

  1. Default column widths should shrink to fit their contents
  2. Column width adjustments should save/persist

Item 2. is a bug, and @ananzh can confirm whether it's already been fixed. So I think the goal here is to make sure the initial column width calculation doesn't just create equal-sized columns if the contents don't require it.

@joshuarrrr joshuarrrr added good first issue Good for newcomers help wanted Community development is encouraged and removed discuss labels Apr 11, 2023
@joshuarrrr joshuarrrr added the ux / ui Improvements or additions to user experience, flows, components, UI elements label Apr 11, 2023
@ananzh
Copy link
Member

ananzh commented Aug 10, 2023

We switch to use uiState to save column width. Now column width can be saved and is persisted. If save the table and reload, column width is saved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Community development is encouraged tableVis table visualization ux / ui Improvements or additions to user experience, flows, components, UI elements
Projects
None yet
Development

No branches or pull requests

5 participants
@joshuarrrr @mmguero @ananzh @aoguan1990 and others