Skip to content

Use 12-column layout for dashboard grid #7396

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

Merged
merged 3 commits into from
Jul 16, 2025
Merged

Conversation

eradman
Copy link
Collaborator

@eradman eradman commented Apr 1, 2025

What type of PR is this?

  • Feature

Description

  • Set minSizeX, minSizeY for widgets to 2 since a value of 1 breaks all assumptions of the UI layout.
  • Migration provide transition from 6 to 12 columns for all widgets.

How is this tested?

  • E2E Tests (Cypress)
  • Manually
./manage.py db downgrade 1655999df5e3
./manage.py db upgrade

Related Tickets & Documents

#4809

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

12-column.mov

@eradman
Copy link
Collaborator Author

eradman commented Jul 15, 2025

@yoshiokatsuneo if you have time, please review this change. This is a feature that users I support have asked for, and I think others would fit it useful as well.

@yoshiokatsuneo
Copy link
Contributor

yoshiokatsuneo commented Jul 15, 2025

@yoshiokatsuneo if you have time, please review this change. This is a feature that users I support have asked for, and I think others would fit it useful as well.

@eradman

Thank you for the cool PR ! The code looks good and the change is straightforward.
I tested your code and confirmed that the dashboard is working with 12 columns without problem.
Also, I tested and confirmed that the migration works well !

One thing I notice is that the default widget width is narrower than before, as it is half of what is was before like below.
Is it intended behavior ?
If it is not intended, I think we can double defaultSizeX, and defaultColumns for each visualizations.

image

Thank you !

@eradman
Copy link
Collaborator Author

eradman commented Jul 15, 2025

If it is not intended, I think we can double defaultSizeX, and defaultColumns for each visualizations.

Good observation. I updated defaultSizeX as well

@eradman
Copy link
Collaborator Author

eradman commented Jul 15, 2025

Found out that most visualizations have their own default width. So I need to update these as well

viz-lib/src/visualizations/chart/index.ts:  defaultColumns: 3,
viz-lib/src/visualizations/choropleth/index.ts:  defaultColumns: 3,
viz-lib/src/visualizations/counter/index.ts:  defaultColumns: 2,
viz-lib/src/visualizations/details/index.ts:  defaultColumns: 2,
viz-lib/src/visualizations/map/index.ts:  defaultColumns: 3,
viz-lib/src/visualizations/pivot/index.ts:  defaultColumns: 3,
viz-lib/src/visualizations/table/index.ts:  defaultColumns: 3,

eradman and others added 2 commits July 15, 2025 15:43
Set minSizeX, minSizeY for widgets to 2 since a value of 1 breaks all
assumptions of the UI layout.

Migration provide transition from 6 to 12 columns for all widgets.
@eradman
Copy link
Collaborator Author

eradman commented Jul 15, 2025

Ready for review

Copy link
Contributor

@yoshiokatsuneo yoshiokatsuneo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much !
I think this PR makes Redash more useful !

I just approved the PR so that you can merge after updating branch.

@eradman eradman enabled auto-merge (squash) July 16, 2025 00:55
@eradman
Copy link
Collaborator Author

eradman commented Jul 16, 2025

Thank you @yoshiokatsuneo! Setting to auto-merge

@eradman eradman merged commit 9f76fda into getredash:master Jul 16, 2025
11 checks passed
@eradman eradman deleted the 12-column branch July 16, 2025 01:24
@yoshiokatsuneo
Copy link
Contributor

Just as a reference.
There is a user who does not have col option in the widgets table got error.
I'm not sure why there is no col option.

#7494 (comment)

@eradman
Copy link
Collaborator Author

eradman commented Aug 7, 2025

There is a user who does not have col option in the widgets table got error.

We'll keep an eye on this discussion: I don't see how it's possible to add a widget to a dashboard without setting the "col" value.

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

Successfully merging this pull request may close these issues.

3 participants