fix(table): ensure dimensions appear before metrics in column order#39346
Draft
mistercrunch wants to merge 1 commit intomasterfrom
Draft
fix(table): ensure dimensions appear before metrics in column order#39346mistercrunch wants to merge 1 commit intomasterfrom
mistercrunch wants to merge 1 commit intomasterfrom
Conversation
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 Report✅ All modified and coverable lines are covered by tests. ❌ 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
processColumnsfunction intransformProps.tsso 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
ADDITIONAL INFORMATION
🤖 Generated with Claude Code