EnxDev opened a new pull request, #43296: URL: https://github.com/apache/superset/pull/43296
### SUMMARY In the "View as table" modal (dashboard chart menu) and the Explore results and samples panes, the row count label disappeared whenever the number of returned rows reached the selected row limit; the common case for any dataset larger than the limit, and precisely the situation the label's "limit reached" tooltip exists to warn about. The user got a silently truncated table. Two things were wrong in `DataTableControls`: 1. The label was rendered under `!onRowLimitChange || rowcount < (rowLimit ?? Infinity)`, so it unmounted at the limit (introduced in #39212). 2. It was rendered without a `limit` prop, so `RowCountLabel`'s limit-reached state was unreachable in this pane regardless. Both are fixed: the label always renders, and it receives the limit actually applied to the result. That last part matters because `useResultsPane` slices to `Math.min(selectedRowLimit, chartRowLimit)`; passing only the dropdown mvalue would stay silent when the chart's own `row_limit` is what truncates (chart `row_limit` 100, page size 1000 → 100 rows, no warning). A new optional `effectiveRowLimit` prop carries that value through. Because the count and the selector can now both read "100 rows", the selector is prefixed with "Limit" so it reads as a control. This required exposing antd's existing `prefix` prop on the shared `Select` (one line in `AntdExposedProps`; Superset's `Select` already spreads it through to antd). The samples pane shares `TableControls` and had the same bug; it is fixed by the same change. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF - before <img width="1440" height="900" alt="0-dashboard" src="https://github.com/user-attachments/assets/45ca5b31-7a68-4ccf-8fb8-89f3e15ef55f" /> - after <img width="1440" height="900" alt="0-dashboard" src="https://github.com/user-attachments/assets/1453c179-13b9-496d-819f-0bbebdc48451" /> - before <img width="1440" height="900" alt="1-full-default-1000" src="https://github.com/user-attachments/assets/46eb5e06-f0ab-4d62-8eca-7cc3701ccecb" /> - after <img width="1440" height="900" alt="1-full-default-1000" src="https://github.com/user-attachments/assets/bda52999-1f32-47d4-9614-9e36a4cc4c95" /> - before <img width="900" height="675" alt="1-modal-default-1000" src="https://github.com/user-attachments/assets/814166c7-6e61-4af4-b6e5-4791f2629ea0" /> - after <img width="900" height="675" alt="1-modal-default-1000" src="https://github.com/user-attachments/assets/04066da9-12b3-4d2e-a99c-cbb9f6b4dc16" /> - before <img width="1440" height="900" alt="2-full-pagesize-100" src="https://github.com/user-attachments/assets/01739524-6a4b-400b-b86f-b45580b7bfea" /> - after <img width="1440" height="900" alt="2-full-pagesize-100" src="https://github.com/user-attachments/assets/7aeda401-f216-4158-924a-96f992433c39" /> - before <img width="900" height="675" alt="2-modal-pagesize-100" src="https://github.com/user-attachments/assets/3aefcc6b-8b5a-4859-b936-891bf7b61a25" /> - after <img width="900" height="675" alt="2-modal-pagesize-100" src="https://github.com/user-attachments/assets/b24dc26d-8696-4563-a3af-5950b1daf602" /> - before <img width="828" height="59" alt="3-controls-strip" src="https://github.com/user-attachments/assets/3da16a56-cc59-446d-95e8-4ef28f1afd24" /> - after <img width="828" height="59" alt="3-controls-strip" src="https://github.com/user-attachments/assets/2b4b7e9d-57f6-4521-97fd-d892729e8734" /> - after <img width="1440" height="900" alt="4-full-tooltip" src="https://github.com/user-attachments/assets/b83c8c6c-6745-49d6-9392-35d7596e766b" /> <img width="900" height="675" alt="4-modal-tooltip" src="https://github.com/user-attachments/assets/51ac4e94-2b9d-47ec-80ba-ace61c0bca33" /> - before https://github.com/user-attachments/assets/7ee5e298-ce05-49a2-888f-b395842db6e3 - after https://github.com/user-attachments/assets/9a3b9656-0c4c-4668-9d5d-5dd4eaf015d6 | | page size 100 | |---|---| | **Before** | selector `100 rows`, no row count label anywhere | | **After** | selector `Limit 100 rows`, red `100 rows` pill with the limit-reached tooltip | <!-- attach comparison-controls-zoom.png and comparison-before-after.mp4 --> ### TESTING INSTRUCTIONS 1. Create a table chart over `birth_names` grouped by `name` with `SUM(num)` and `row_limit` 10000 (250 distinct names), and add it to a dashboard. 2. Open the chart's kebab menu → **View as table**. With the default limit (1k rows) the label reads `250 rows` in its normal styling. 3. Change the selector to **100 rows**. The table shows 100 rows, the label reads `100 rows` in red, and hovering it shows "The row limit set for the chart was reached. The chart may show partial data." 4. Repeat in Explore's **Results** and **Samples** panes. Unit tests: `npm run test -- src/explore/components/DataTablesPane` ### 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: - [ ] 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]
