-
Notifications
You must be signed in to change notification settings - Fork 16.1k
fix(dashboard): prevent tab content cutoff and excessive whitespace in empty tabs #35834
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): prevent tab content cutoff and excessive whitespace in empty tabs #35834
Conversation
Code Review Agent Run #b5f936Actionable 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 |
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.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| ParentSize height reference may break chart rendering ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.tsx | ✅ |
| superset-frontend/packages/superset-ui-core/src/components/Tabs/Tabs.tsx | ✅ |
| superset-frontend/src/dashboard/components/DashboardGrid.jsx | ✅ |
| superset-frontend/src/dashboard/components/DashboardBuilder/DashboardContainer.tsx | ✅ |
| superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
Show resolved
Hide resolved
Interaction Diagram by BitosequenceDiagram
participant DB as DashboardBuilder<br/>🔄 Updated | ●●○ Medium
participant DC as DashboardContainer<br/>🔄 Updated | ●●○ Medium
participant Tabs as Tabs Component<br/>🔄 Updated | ●●● High
participant TR as TabsRenderer<br/>🔄 Updated | ●●○ Medium
participant DG as DashboardGrid<br/>🔄 Updated | ●●○ Medium
participant DOM as DOM/Browser Rendering
Note over Tabs: fullHeight prop added to enable<br/>100% height CSS styling
DB->>DC: Render DashboardContainer
DC->>Tabs: Pass fullHeight prop
Tabs->>TR: Propagate fullHeight config
TR->>DOM: Render tabs with height: 100%
DG->>DOM: Render empty state with flex centering
DOM-->>DB: Responsive tab layout
Critical path: DashboardBuilder -> DashboardContainer -> Tabs Component -> TabsRenderer -> DOM/Browser Rendering
|
SUMMARY
Fixes a bug where new dashboard tabs would show their content as cut off at the bottom. This was caused by tabs not filling the full available height, resulting in content being clipped outside the visible area.
The fix introduces a
fullHeightprop to the Tabs component that cascadesheight: 100%through the tab hierarchy (.ant-tabs→.ant-tabs-content-holder→.ant-tabs-content→.ant-tabs-tabpane). This ensures tabs expand to fill their container's height while maintaining proper layout.Additionally, it updates the
DashboardEmptyStateContainerto use flexbox centering while preservingposition: absoluteto prevent excessive whitespace in empty tabs.Changes:
fullHeightprop toTabscomponent insuperset-ui-corefullHeightto both top-level and nested dashboard tabsheight: inherittoheight: 100%inDashboardBuilderfor the ParentSize wrapperDashboardEmptyStateContainerwhile keeping absolute positioningBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE: New dashboard tabs showed content cut off at the bottom, requiring scrolling to see full content

AFTER: Dashboard tabs now properly fill available height, with content fully visible and no excessive whitespace in empty tabs

TESTING INSTRUCTIONS
ADDITIONAL INFORMATION