iammuntazirali opened a new pull request, #37528: URL: https://github.com/apache/superset/pull/37528
fix(dashboard): ensure consistent box-sizing for embedded dashboard rendering <!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> This PR fixes a panel overlap issue in embedded dashboards when using `@superset-ui/embedded-sdk`. **Problem:** The `.dashboard-component-chart-holder` class uses `padding: 16px`, but relies on the global `box-sizing: border-box` style provided by the `.ant-layout` wrapper. In embedded dashboards, this wrapper is absent, causing the element to default to `box-sizing: content-box`. This adds 32px (16px × 2) to each panel's calculated width, making adjacent panels overlap/encroach on each other. **Solution:** Added explicit `box-sizing: border-box` to `.dashboard-component-chart-holder` so the padding is included within the element's width, ensuring consistent rendering in both native and embedded dashboard views. **Files changed:** - [superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx](cci:7://file:///home/muntazir/Desktop/ppp/superset/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx:0:0-0:0) ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> **Before (embedded mode):** Panels overlap due to content-box sizing adding padding outside width **After (embedded mode):** Panels display correctly side-by-side with border-box sizing ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> 1. Embed a Superset dashboard using `@superset-ui/embedded-sdk` 2. Add multiple charts side-by-side in the dashboard layout 3. Verify that the panels no longer overlap and display correctly 4. Verify that the native (non-embedded) dashboard still renders correctly ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
