-
Notifications
You must be signed in to change notification settings - Fork 16.5k
fix(dashboard): embedded dashboard box sizing #36375
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
base: master
Are you sure you want to change the base?
fix(dashboard): embedded dashboard box sizing #36375
Conversation
Code Review Agent Run #899e24Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
That's a bit of a CSS shotgun, I'm just not sure if it won't have downstream effects where we were expecting things to be It might just work, but I wonder if there's not a better way to scope it to just the embedded SDK, or (maybe) be a little more surgical in the approach, adding it to the right components. If we do go with this approach, we can probably remove a lot of |
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.
Pull request overview
This PR fixes box-sizing issues in embedded dashboards that were causing layout overlaps. The fix applies the standard CSS box-sizing: border-box rule globally to ensure consistent element sizing.
- Adds global
box-sizing: border-boxstyle to fix embedded dashboard layout overlaps - Integrates the new style into the dashboard's global style system
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| superset-frontend/src/dashboard/styles.ts | Adds new boxSizing export with universal selector applying box-sizing: border-box |
| superset-frontend/src/dashboard/containers/DashboardPage.tsx | Imports and applies the boxSizing style to the dashboard's global styles array |
|
Just catching up on the thread in #36204 - that seems to have a more scoped approach to the styling, if it happens to work. ¯\_(ツ)_/¯ |
|
It does feel a bit aggressive, but reasoning behind this:
Alternatives would be to put it either in DashboardBuilder styles OR using |
|
If that's true about using border-box in the same way, shouldn't that make things work already? |
|
I'm just worried about breaking anything that might be using content-box. Times like this, I wish we had screenshot regression testing everywhere. I think I'd be happy to merge this if the selector could be scoped down to be more specific, if indeed most of our stuff is within so we can be a bit more "surgical" (and performant) here. |
I'm assuming that's a question about I've looked if it's possible to add I will update it to scope to |
SUMMARY
Added correct
box-sizingfor embedded dashboard elements. This fixes overlaps when embedding.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:

After:

TESTING INSTRUCTIONS
Embed one of the dashboards in external application.
ADDITIONAL INFORMATION