Skip to content

fix(charts): show non-filterable columns in metric section for table …#39524

Open
massucattoj wants to merge 1 commit intoapache:masterfrom
massucattoj:fix/non-filterable-columns-metric-display
Open

fix(charts): show non-filterable columns in metric section for table …#39524
massucattoj wants to merge 1 commit intoapache:masterfrom
massucattoj:fix/non-filterable-columns-metric-display

Conversation

@massucattoj
Copy link
Copy Markdown
Contributor

SUMMARY

Columns with Is filterable set to NO were not displayed in the metric section of Table, AG Grid Table, and Handlebars charts, even though they were successfully added to the chart config.

The root cause was that the metrics control's mapStateToProps incorrectly filtered columns by the filterable property. The filterable flag should only control whether a column appears in filter controls
(e.g., Filter Bar), not whether it can be used as a metric or dimension.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: Dragging a non-filterable column into the Metrics section adds it to the form data, but the metric pill is not rendered — the Metrics area appears empty even though the chart recognizes the metric.
Screenshot 2026-04-21 at 11 41 49

Screenshot 2026-04-21 at 11 42 40

After: Non-filterable columns display correctly as metric pills in the Metrics section after being added.
Screenshot 2026-04-21 at 11 40 32

Screenshot 2026-04-21 at 11 40 57 Screenshot 2026-04-21 at 11 41 14

TESTING INSTRUCTIONS

  1. Go to Datasets and edit any dataset (e.g., birth_names)
  2. In the Columns tab, uncheck "Is filterable" for a column (e.g., num)
  3. Save the dataset
  4. Create a new Table chart using that dataset
  5. Drag the non-filterable column from the left sidebar into the Metrics drop zone
  6. In the modal, confirm it shows the correct aggregation (e.g., SUM(num)) and click Save
  7. Verify the metric pill now appears in the Metrics section
  8. Also verify that clicking "Drop columns/metrics here or click" on Metrics shows the column in the Simple tab dropdown
  9. Repeat for Handlebars chart type to confirm the fix there as well

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented Apr 21, 2026

Code Review Agent Run #fcce81

Actionable Suggestions - 0
Review Details
  • Files reviewed - 4 · Commit Range: 5dd1d49..5dd1d49
    • superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx
    • superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/columns.tsx
    • superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx
    • superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot Bot added change:frontend Requires changing the frontend plugins labels Apr 21, 2026
Comment thread superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx Outdated
Comment thread superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx Outdated
@massucattoj massucattoj force-pushed the fix/non-filterable-columns-metric-display branch from 5dd1d49 to d0a3fbc Compare April 21, 2026 15:01
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented Apr 21, 2026

Code Review Agent Run #fd2c1a

Actionable Suggestions - 0
Review Details
  • Files reviewed - 4 · Commit Range: d0a3fbc..d0a3fbc
    • superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx
    • superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/columns.tsx
    • superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx
    • superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend plugins size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant