You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by en...@apache.org on 2026/07/03 18:57:12 UTC
(superset) 01/08: feat(ag-grid): show the summary checkbox in raw records mode
This is an automated email from the ASF dual-hosted git repository.
EnxDev pushed a commit to branch feat/ag-grid-table-raw-records-summary
in repository https://gitbox.apache.org/repos/asf/superset.git
commit a4585a33d8631f12d5660ddbe58a08ff6a037c47
Author: Enzo Martellucci <en...@gmail.com>
AuthorDate: Fri Jul 3 17:06:30 2026 +0200
feat(ag-grid): show the summary checkbox in raw records mode
Co-Authored-By: Claude Fable 5 <no...@anthropic.com>
---
.../src/controlPanel.tsx | 4 +---
.../test/controlPanel.test.ts | 23 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx
index e219c495d2b..58571a9b626 100644
--- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx
+++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx
@@ -433,10 +433,8 @@ const config: ControlPanelConfig = {
label: t('Show summary'),
default: false,
description: t(
- 'Show total aggregations of selected metrics. Note that row limit does not apply to the result.',
+ 'Show a summary row of total aggregations: the selected metrics in aggregate mode, or the sum of numeric columns in raw records mode. Note that row limit does not apply to the result.',
),
- visibility: isAggMode,
- resetOnHide: false,
},
},
],
diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/test/controlPanel.test.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/controlPanel.test.ts
index e09034fe650..72f3310c497 100644
--- a/superset-frontend/plugins/plugin-chart-ag-grid-table/test/controlPanel.test.ts
+++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/controlPanel.test.ts
@@ -75,3 +75,26 @@ test('time_grain_sqla visibility should be case-insensitive', () => {
expect(vis(mkProps(['ORDERDATE']), controlState)).toBe(true);
expect(vis(mkProps(['some_other_col']), controlState)).toBe(false);
});
+
+test('show_totals is available in both query modes', () => {
+ let showTotals: CustomControlItem | undefined;
+ config.controlPanelSections.forEach(section => {
+ section?.controlSetRows.forEach(row => {
+ row.forEach(item => {
+ if (
+ typeof item === 'object' &&
+ item !== null &&
+ 'name' in item &&
+ (item as CustomControlItem).name === 'show_totals'
+ ) {
+ showTotals = item as CustomControlItem;
+ }
+ });
+ });
+ });
+
+ expect(showTotals).toBeDefined();
+ // No visibility gate: the summary checkbox must render in raw records
+ // mode as well as aggregate mode.
+ expect(showTotals?.config?.visibility).toBeUndefined();
+});