-
Notifications
You must be signed in to change notification settings - Fork 149
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
Rearrange and rename main page containers #205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for incorporating all the changes.
I have one small comment, but otherwise looks good. 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work and an excellent description! ⭐ 🌟 ⭐
Just some small questions and suggestions, nothing big though. Altogether this is massively better than the container arrangement when I first pulled over the code from VizX and there were lots of mysteriously nested things 💯
I'm very much enjoying the clean commit history. If you want to take it to the next level then you could pull updates from main
using rebase rather than merge if you're the only person working on a branch (also possible from Github UI if you press the little arrow next to the Update button).
Somewhat related to this PR so let me ask it here... Is there a reason we have this in
It's the only example of the |
Very good question! I think historical accident 😅 The two behave pretty much the same. The Read the answer on this one for reference: https://stackoverflow.com/questions/68823379/dash-dbc-container-fluid-true-does-not-cover-all-available-space |
Thanks for checking this. It's always bugged me that we had this inconsistency 😀 Everything looks so much cleaner than it used to now 💯 Some time next time I think we should discuss again the different options for how to handle the layout, e.g. the But for now I love the approach! ⭐ |
Yes, I agree! I have these topics on top of my list and to also discuss w/ @AnnMarieW ! 🚀 |
I think the bigger question is: Why are you using Dash Bootstrap Components at all? You aren't loading a stylesheet, correct? This is a big problem since it's not uncommon to have a Bootstrap stylesheet in a user's assets folder. Here's what the example app app looks like if someone has the Spacelab theme in /assets |
Hey @AnnMarieW, that's a very good point! We have yet to figure out how to make templating as easy as possible. So far, we create our templates here and users can configure them in We generally prefer dbc components over dcc components when dcc becomes challenging to style (some dash properties were tricky to overwrite) or when the dbc components enable additional functionality. Let me create another issue on this one so we can discuss it. :) |
Description
_make_page_layout
into 2 sub-functions for simplified layout overwrite:_get_page_divs
: Creates all the relevant containers that we might want to re-arrange_arrange_page_divs
: Arranges all 8 containersTypedDict
classes that storehtml.Divs
to alternative syntax such that we can use dashes inside the keys instead of underscores (required for CSS IDs)_is_hidden
className
and useid
only for unique containers, includes renaming:Screenshot
This graphic helps understand the current layout arrangements - please take a look:
In general, there are theoretically 8 main containers that we can re-arrange across the page:
These 8 containers are allocated to these outer containers currently and these outer containers make up our page layout:
Left Side
Right Side
Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":