-
Notifications
You must be signed in to change notification settings - Fork 142
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 default Bootstrap theme and overwrite CSS #311
Conversation
for more information, see https://pre-commit.ci
…y/vizro into bug/fix_bootstrap_plugin
@antonymilne - this was initially supposed to be just a POC but shall we go ahead with this PR change now? Main advantages for me are:
|
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.
This seems like a big step in the right direction to me and I think we should go ahead with it 👍
If we can now remove the "Adding a dash-bootstrap component" from the docs then let's do so. The "Dash Bootstrap Themes" warning is still relevant but could maybe be modified a bit now we know the direction of travel:
Please note that Vizro is not yet compatible with [Dash Bootstrap Themes](https://dash-bootstrap-components.opensource.faculty.ai/docs/themes/).
Adding a Bootstrap stylesheet will not have any effect on your Vizro app.
vizro-core/changelog.d/20240214_201401_huong_li_nguyen_fix_bootstrap_plugin.md
Show resolved
Hide resolved
I've modified to below, but I think the warning is still relevant. However, I've removed the other warning as functionality should be automatically shipped now via the default dbc.theme included, and styling is required for any custom component that gets added by the user 👍
|
for more information, see https://pre-commit.ci
…y/vizro into bug/fix_bootstrap_plugin
@AnnMarieW - would you mind taking a look at this PR? I would love to get your opinion on it! This is by no means our final solution to our Bootstrap issue. We are still not compatible with However, what did improve is that a |
@huong-li-nguyen Nice work! This is awesome! In
|
Ahh, super smart! Thank you!!! 🚀 💯 Hope we can get a better long-term solution in place soon! |
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, I just have one minor suggestion but does not have to be included in this PR. 🚀
Description
This is also just a temporary POC fix to an issue we will solve differently long-term, changes included in this PR:
The current approach is not as different as our previous one, but has a few advantages:
Remains the same:
dbc.themes
still do not work properly in our code basis (in the sense of switching skins)dbc.component
to our code basis we still need to use custom CSS to apply our design (eventually we need to overwrite more properties now)Improvement to previous version:
dbc.theme
will have no visual effect now (with the currently existing components), as our CSS overwrites their CSSdbc.theme
by default has the advantage that all relevant CSS for the proper functioning of dbc components are correctly shipped, so when someone adds a dbc component as a custom component, it will work out of the box and they don't have to add CSS code to their assets folder anymore (same applies to us)Screenshot
When plugging in a dbc.theme before:
Now:
Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":