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

Setting a default columnSize value for dash_ag_grid #681

Open
petar-qb opened this issue Sep 4, 2024 · 3 comments
Open

Setting a default columnSize value for dash_ag_grid #681

petar-qb opened this issue Sep 4, 2024 · 3 comments
Assignees

Comments

@petar-qb
Copy link
Contributor

petar-qb commented Sep 4, 2024

Reference link: https://dash.plotly.com/dash-ag-grid/column-sizing#size-to-fit-and-responsive-size-to-fit

Should Vizro set columnSize="responsiveSizeToFit" for the dash_ag_grid figure function by default?

@huong-li-nguyen
Copy link
Contributor

huong-li-nguyen commented Sep 4, 2024

@maxschulz-COL and I once discussed this several times, but there were difficulties with each approach 😄 I actually don't remember what we ended up with.

So this is how I would expect it to work:

  • The Grid always takes on the full width of the screen size so even if there are only 3 columns, the width of the grid will be the entire page (as in the dash_data_table)
  • If there are more columns in the Grid that it fits in width, a scroll bar will appear horizontally
  • All columns are always well visible and not squeezed (so should be fully readable)

Now, I don't know what configuration achieves this (if any?)

@maxschulz-COL
Copy link
Contributor

Mostly agree with the above. But I would note a few things:

  • having columns and their content fully readable can also be annoying when there are outliers
  • I remember that problems also occurred also when pre-setting things, but this issue may have been removed now with your work and providing just a Div, and not an object

@huong-li-nguyen
Copy link
Contributor

I quickly discussed this with Joe and from a design perspective we would prefer that it expands to its full width (which it currently does not do). However, there are pros/cons for both approaches and the preference is not significant. So we decided to not change anything for now and let users configure it themselves 👍

This means for our demos, please set columnSize="responsiveSizeToFit" manually for now if the table does not take the full width :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants