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

[Tidy] Replace dmc.Tabs with dbc.Tabs #895

Merged
merged 69 commits into from
Nov 26, 2024
Merged

Conversation

huong-li-nguyen
Copy link
Contributor

@huong-li-nguyen huong-li-nguyen commented Nov 21, 2024

Description

We initially used dmc.Tabs due to an issue with dbc.Tabs at the time of development. Specifically, Plotly charts within dbc.Tabs did not resize correctly, requiring either a fixed height for the charts or the use of the callback method for the tabs, which we wanted to avoid. For more context on the previous issue, see:

I took another look at dbc.Tabs, and it seems to be working great now 🥳.

It did take a bit of work to get everything running smoothly because the HTML structure for the Bootstrap component is very different. Plus, dbc adds an extra div for some reason that we can't assign a className to. This led to a couple of CSS issues, which are now sorted out. I left a comment about it, but we shouldn't need to change it anymore.

Screenshot

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

huong-li-nguyen and others added 30 commits November 18, 2024 13:00
Copy link
Contributor

@pruthvip15 pruthvip15 left a comment

Choose a reason for hiding this comment

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

One small comment, but looks good to my understanding.
Amazing work 👍

Copy link
Contributor

@maxschulz-COL maxschulz-COL left a comment

Choose a reason for hiding this comment

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

Lgtm! Seems like a super small change, but I bet it wasn't :P

One QQ: if we follow the recommended practice of adding a title to the Graph model, don't you think the title margin is a little small:

image

@huong-li-nguyen
Copy link
Contributor Author

Lgtm! Seems like a super small change, but I bet it wasn't :P

One QQ: if we follow the recommended practice of adding a title to the Graph model, don't you think the title margin is a little small:

Can you open it in an incognito browser? I think your browser might have cached an old CSS file? In your screenshot there is no styling applied to the tabs.

It should look like this:

Screenshot 2024-11-26 at 11 32 33

@petar-qb petar-qb removed their request for review November 26, 2024 10:41
@maxschulz-COL
Copy link
Contributor

Can you open it in an incognito browser? I think your browser might have cached an old CSS file? In your screenshot there is no styling applied to the tabs.

I get this in incognito - this is the link to PyCafe:

image

@huong-li-nguyen
Copy link
Contributor Author

huong-li-nguyen commented Nov 26, 2024

Can you try to run it locally? PyCafe doesn't seem to pull the latest bootstrap file which is in that branch.
If that does not work, what's your dbc version on hatch?

Base automatically changed from tidy/remove-variables to main November 26, 2024 12:42
@huong-li-nguyen huong-li-nguyen removed the request for review from stichbury November 26, 2024 12:44
@huong-li-nguyen huong-li-nguyen merged commit 9cd69c0 into main Nov 26, 2024
36 checks passed
@huong-li-nguyen huong-li-nguyen deleted the tidy/replace-tabs branch November 26, 2024 16:23
@antonymilne antonymilne mentioned this pull request Nov 28, 2024
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