Skip to content

fix(table): ensure dimensions appear before metrics in column order#39346

Draft
mistercrunch wants to merge 1 commit intomasterfrom
sc-102572-interactive-table-dim-order
Draft

fix(table): ensure dimensions appear before metrics in column order#39346
mistercrunch wants to merge 1 commit intomasterfrom
sc-102572-interactive-table-dim-order

Conversation

@mistercrunch
Copy link
Copy Markdown
Member

SUMMARY

In Interactive Table charts, newly added dimensions (e.g. via interactive groupby / cross-filtering) could appear after metric columns instead of being grouped with other dimensions.

This adds a stable sort to the processColumns function in transformProps.ts so that dimension columns always precede metrics and percent metrics, while preserving the relative order within each group.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: Newly added dimension columns appear after metric columns in the table.
After: All dimension columns are grouped together before metrics, regardless of when they were added.

TESTING INSTRUCTIONS

  1. Create an Interactive Table chart with at least one dimension and one metric
  2. Add a new dimension via cross-filtering (interactive groupby) or by editing the chart controls
  3. Verify the new dimension column appears alongside other dimensions, before any metric columns

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

🤖 Generated with Claude Code

When new dimensions are added (e.g. via interactive groupby / cross-filtering),
they could appear after metric columns in the rendered table. Sort the processed
columns so non-metric dimensions always precede metrics and percent metrics,
using a stable sort to preserve relative order within each group.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.42%. Comparing base (de98fdc) to head (fc2f2c0).
⚠️ Report is 8 commits behind head on master.

❌ Your project check has failed because the head coverage (99.81%) is below the target coverage (100.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #39346   +/-   ##
=======================================
  Coverage   64.42%   64.42%           
=======================================
  Files        2554     2554           
  Lines      132662   132666    +4     
  Branches    30780    30782    +2     
=======================================
+ Hits        85461    85466    +5     
+ Misses      45715    45714    -1     
  Partials     1486     1486           
Flag Coverage Δ
javascript 66.11% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant