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

   ### SUMMARY
   
   Restores `.dt-pagination .pagination { margin: 0; }` for the Table chart's 
pagination footer.
   
   The Ant Design v5 overhaul (#31590) removed that reset, so the pagination 
`<ul>` falls back to the browser-default `1em` top/bottom margin (16px at a 
16px font). The table measures the footer with `clientHeight` and subtracts it 
from the scrollable body in `DataTable.defaultGetTableSize`; `.dt-pagination` 
deliberately uses padding rather than margin so `clientHeight` captures its 
contents, which means the stray `<ul>` margins are counted too. The footer 
measures ~68px instead of ~36px, the scroll body loses ~32px (about one row), 
and the empty band below the page buttons grows.
   
   Measured in headless Chrome (synthetic data, 700 rows × 13 columns with long 
wrapped headers, page size 200, 1200×380):
   
   | | Before | After |
   |---|---|---|
   | `ul.pagination` margin | 16px / 16px | 0 / 0 |
   | `.dt-pagination` height | 68px | 36px |
   | Scroll body | 107px | 139px |
   | Gap below page buttons | 41px | 25px |
   
   **What this does not fix:** it recovers ~32px, not all of the empty space. 
What remains below the buttons is by design (4px footer padding + 20px wrapper 
padding, plus ~15px from the scrollbar-size guard on systems with classic 
scrollbars), and tall wrapped headers still limit how many rows fit. The height 
measurement and scrollbar guard are intentionally untouched.
   
   Separate, out of scope: when client-side search narrows results to a single 
page, the footer unmounts but `getTableSize` is not recomputed, so the freed 
height isn't given back to the body.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Same synthetic scenario, route, viewport and theme for both.
   
   ## Before
   
   ![Before: short scroll body and extra empty band under the 
pagination](https://gist.githubusercontent.com/mistercrunch/432a9ba8d1e62384db1e9fcf31ba0306/raw/4f89c6ec60a640c565fe4290870b0905a8d143f2/before.png)
   
   ## After
   
   ![After: more rows visible and a smaller band under the 
pagination](https://gist.githubusercontent.com/mistercrunch/432a9ba8d1e62384db1e9fcf31ba0306/raw/4f89c6ec60a640c565fe4290870b0905a8d143f2/after.png)
   
   ### TESTING INSTRUCTIONS
   
   1. Create a Table chart with client-side pagination (e.g. page size 200) 
over more than one page of rows, with many columns and long column names so the 
header wraps.
   2. Place it in a dashboard cell or Explore panel (~380–500px tall).
   3. Inspect `.dt-pagination`: its height should be ~36px (not ~68px) and 
`.dt-pagination .pagination` should have 0 top/bottom margin; more body rows 
are visible and the band below the page buttons is smaller.
   
   Automated: two new Jest tests (client-side and server-side pagination) 
assert the pagination list's computed top/bottom margins are `0px`; they fail 
without the change and pass with it. `npx jest plugins/plugin-chart-table` 
passes. jsdom has no browser default styles or layout, so the tests guard the 
CSS rule only; the geometry above was measured in headless Chrome and there is 
no in-repo browser test harness for this plugin.
   
   ### ADDITIONAL INFORMATION
   - [ ] 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
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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