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

Add 12 column layout option for all dashboards #4809

Closed
wants to merge 4 commits into from
Closed

Add 12 column layout option for all dashboards #4809

wants to merge 4 commits into from

Conversation

kkmagician
Copy link

What type of PR is this? (check all applicable)

  • Feature

Description

Reasoning

For more than a year of using Redash in my company and for personal projects one thing perplexed me: why there are only 6 columns available for widgets to be placed on a dashboard. Looking at other solutions (Grafana, Metabase, Superset, Shiny) all of them have more columns in the layout (12+). The number 12 is a great setting for any dashboard: it divides by 2, 3, 4 and 6, whereas 6 has only the 2 and 3 options. The handiness of dividing the layout into 4 even columns is apparent when using Counter or any other "small" widgets. See examples in the screenshots section.

Overall, the feature allows for a more fluid developer and consumer experience, while not forcing anyone to adopt the feature and not breaking old dashboards.

Implementation

  • The old 6-column layout is used by default;
  • New "Use 12 columns layout" checkbox in the dashboard editor – it switches the grid options used for the dashboard and updates the dashboard in the database: column dashboards.use_12_column layout (bool);
  • When the checkbox is checked, background CSS grid changes accordingly;
  • When the checkbox is unchecked, react-grid automatically smooshes all the widgets of width 7+.

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

ezgif com-optimize
image
image

Copy link
Member

@arikfr arikfr left a comment

Choose a reason for hiding this comment

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

I'm not sure why we picked 6 originally. But @gabrieldutra already started working on increasing number of columns in #4395. Our priorities shifted a bit, so it was left in draft. But I think we can switch to a single layout option (of 12 columns) with proper migration.

We should also look into decreasing the steps on the vertical axis.

@guidopetri
Copy link
Contributor

@kkmagician , thanks for the PR! We've updated a lot of things now that we're Community-driven so - if you're still interested in getting this merged - would you mind rebasing off master to re-run the CI?

We're trying to clean up our PR todo list, so if you're not interested, that's fine - we'll close the PR in about a week if we don't hear back. If you're interested in reopening the PR afterwards, we would also very much welcome that.

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