vighneshtule opened a new pull request, #36895:
URL: https://github.com/apache/superset/pull/36895

   ### SUMMARY
   This PR resolves an inconsistency in the default padding of Table charts 
compared to other chart types (like ECharts). Previously, Table charts rendered 
edge-to-edge within their containers (0px padding), causing visual misalignment 
when placed alongside other charts which typically have a default 20px padding.
   
   **Changes:**
   - Added `20px` (via `theme.sizeUnit * 5`) padding to the Table chart 
container in 
[Styles.tsx](cci:7://file:///d:/V/superset/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx:0:0-0:0).
   - Updated 
[TableChart.tsx](cci:7://file:///d:/V/superset/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:0:0-0:0)
 to subtract this 40px total horizontal/vertical padding from the width and 
height passed to the virtualized 
[DataTable](cci:2://file:///d:/V/superset/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx:58:0-93:1)
 component. This ensures the table renders correctly within the new padded area 
without overflowing or causing unnecessary scrollbars.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   **After (Verified Padding):**
   
   <img width="1885" height="918" alt="Screenshot 2026-01-04 221644" 
src="https://github.com/user-attachments/assets/0d4db460-61af-4335-a4c4-1ab38f427fb9";
 />
   
   ### TESTING INSTRUCTIONS
   1. Open a Dashboard in Superset.
   2. Add a **Table** chart.
   3. Add a **Bar** chart (or any ECharts chart) next to it for comparison.
   4. **Verify**: The Table chart should now have ~20px padding between the 
card edge and the table content, visually matching the spacing of the Bar chart.
   5. **Verify**: Ensure the table fits within the container and no unexpected 
scrollbars appear unless the data actually overflows.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue: Fixes #31033
   - [ ] 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]

Reply via email to