codeant-ai-for-open-source[bot] commented on code in PR #40386:
URL: https://github.com/apache/superset/pull/40386#discussion_r3291480520


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx:
##########
@@ -1073,7 +1073,7 @@ export function TableRenderer(props: TableRendererProps) {
                 true,
               )}
             >
-              {t('Subtotal')}
+              {t('Subvalue')}

Review Comment:
   **Suggestion:** This change renames only one subtotal label instance, but 
the same renderer still emits `t('Subtotal')` for row subtotal headers, so 
users will see mixed terminology (`Subvalue` and `Subtotal`) in the same pivot 
table. Update the remaining subtotal label path(s) to keep the UI text 
consistent. [incomplete implementation]
   
   <details>
   <summary><b>Severity Level:</b> Minor ๐Ÿงน</summary>
   
   ```mdx
   - โš ๏ธ Pivot Table chart shows mixed subtotal/subvalue header labels.
   - โš ๏ธ Storybook Pivot Table example displays inconsistent terminology.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction โœ… </b></summary>
   
   ```mdx
   1. Open the Pivot Table Storybook story defined in
   
`superset-frontend/plugins/plugin-chart-pivot-table/src/stories/PivotTable.stories.tsx:2-46`,
   which renders a `SuperChart` with `chartType={VizType.PivotTable}` (line 72).
   
   2. In that story, ensure both `rowSubtotalPosition` and 
`colSubtotalPosition` args are set
   (they default to `'after'` in lines 11โ€“12 and are passed through to formData 
as
   `row_subtotal_position` and `col_subtotal_position` in lines 79โ€“88), 
enabling both row and
   column subtotals via the plugin's transformProps/TableOptions pipeline.
   
   3. This story uses the `PivotTableChartPlugin` 
(`src/plugin/index.ts:36-76`), whose
   `loadChart` loads `PivotTableChart.tsx` (line 71); `PivotTableChart.tsx` 
imports
   `PivotTable` from `./react-pivottable` (line 44), and 
`react-pivottable/PivotTable.tsx`
   renders `<TableRenderer {...props} />` (lines 21โ€“27), so `TableRenderer` is 
the component
   that actually builds the HTML table.
   
   4. When the table renders, the column subtotal header cell for buffered 
column keys uses
   the label `{t('Subvalue')}` in `TableRenderers.tsx:1063-1076`, while the row 
subtotal
   padding header cell still uses `{t('Subtotal')}` in 
`TableRenderers.tsx:1320-1337`,
   resulting in a single pivot table simultaneously showing "Subvalue" for 
column subtotals
   and "Subtotal" for row subtotals.
   ```
   </details>
   
   [Fix in 
Cursor](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=ffe5adf96c0448228bb38030db083f76&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 | [Fix in VSCode 
Claude](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=ffe5adf96c0448228bb38030db083f76&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx
   **Line:** 1076:1076
   **Comment:**
        *Incomplete Implementation: This change renames only one subtotal label 
instance, but the same renderer still emits `t('Subtotal')` for row subtotal 
headers, so users will see mixed terminology (`Subvalue` and `Subtotal`) in the 
same pivot table. Update the remaining subtotal label path(s) to keep the UI 
text consistent.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40386&comment_hash=6e0bf7781c6c4197758adfca1ca74f90ad0db927db8ea9d2be66ea66a101455f&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40386&comment_hash=6e0bf7781c6c4197758adfca1ca74f90ad0db927db8ea9d2be66ea66a101455f&reaction=dislike'>๐Ÿ‘Ž</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to