-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix(pivot-table): add bottom border to last grouped row #36081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Code Review Agent Run #53dce2Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Redundant calculation in row rendering loop ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.js | ✅ |
| superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a missing bottom border on the last row label in Pivot Table visualizations when grouping is expanded. The fix adds logic to detect cells that span to the last data row and applies a pvtRowLabelLast CSS class with appropriate border-bottom styling.
- Adds
totalRowsCountcalculation to track the number of visible rows - Applies
pvtRowLabelLastclass to row header cells that span to the last row - Adds CSS styling for the bottom border on last row labels
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| TableRenderers.jsx | Adds logic to calculate total row count and conditionally apply pvtRowLabelLast class to cells spanning to the last row |
| Styles.js | Adds CSS rule for bottom border on last row label cells |
| maxColVisible: Math.max(...visibleColKeys.map(k => k.length)), | ||
| rowAttrSpans: this.calcAttrSpans(visibleRowKeys, rowAttrs.length), | ||
| colAttrSpans: this.calcAttrSpans(visibleColKeys, colAttrs.length), | ||
| totalRowsCount: visibleRowKeys.length + (colTotals ? 1 : 0), |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The totalRowsCount calculation incorrectly includes the column totals row. The totals row is rendered separately via renderTotalsRow() and should not be counted when determining if a data row cell is the last row.
When colTotals is enabled, a cell in the last data row with rowSpan=1 will have rowIdx + rowSpan = N (where N is visibleRowKeys.length), but this will never equal totalRowsCount = N + 1, so the border will never be applied.
The calculation should be:
totalRowsCount: visibleRowKeys.length,| totalRowsCount: visibleRowKeys.length + (colTotals ? 1 : 0), | |
| totalRowsCount: visibleRowKeys.length, |
|
@igor-tech can we add some tests here? |
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx
Outdated
Show resolved
Hide resolved
|
Approving CI workflows, but deferring to @sadpandajoe otherwise ;) |
|
🎪 Showtime deployed environment on GHA for f6af157 • Environment: http://35.91.119.142:8080 (admin/admin) |
|
Works correctly. Thank you. |
SUMMARY
Fixes missing bottom border on the last row label when grouping is expanded in Pivot Table visualization.
Previously, when multiple groups were present and the last group was expanded, the bottom border was not rendered, creating a visual inconsistency. This PR adds logic to detect the last row and applies the
pvtRowLabelLastCSS class, which adds the missing border-bottom style.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:

After:

TESTING INSTRUCTIONS
ADDITIONAL INFORMATION