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

Dynamic grapelli dashboard size based on columns from Dashboard class… #853

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

artur-sikora
Copy link

Django Version: 1.11.14
Base branch: master

Please have a look.

@sehmaschine sehmaschine requested a review from parsch July 27, 2018 07:09
@parsch
Copy link
Collaborator

parsch commented Jul 27, 2018

@artur-sikora This dynamic resolution of dashboard columns does not work properly for different number of columns (I'm talking about up to 4 columns), e.g. the total sum of grid columns is too small for 1- and 2-column-based layouts (there's a total grid width of 23 columns instead of 24).

While I see your point in general I'm not sure if a dynamic solution like yours is the way to go because we had to do some math within the template (which is not possible without using another package) in order to properly calculate column widths for all sorts of different numbers of columns. Further I'm not sure if such an algorithmic outcome would be satisfying when you want to achieve certain layouts. It might be a better idea to define the desired width of each column within your dashboard.py — we're going to think about that.

Copy link
Collaborator

@parsch parsch left a comment

Choose a reason for hiding this comment

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

Does not calculate correct grid layouts for different numbers of columns, e.g. 1- and 2-column-based layouts result in a total grid width of 23 columns (instead of 24).

Further, I'm not sure if such an algorithmic resolution is the best way to resolve column based layouts.

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.

2 participants