Copilot commented on code in PR #37756:
URL: https://github.com/apache/superset/pull/37756#discussion_r2775491518
##########
superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx:
##########
@@ -800,9 +798,8 @@ const config: ControlPanelConfig = {
? colnames.reduce((acc, colname, index) => {
if (
coltypes[index] === GenericDataType.Numeric ||
- (!hasTimeComparison &&
- (coltypes[index] === GenericDataType.String ||
- coltypes[index] === GenericDataType.Boolean))
+ coltypes[index] === GenericDataType.String ||
+ coltypes[index] === GenericDataType.Boolean
) {
Review Comment:
`numericColumns` now contains String/Boolean entries as well, so the name is
misleading and makes later logic harder to reason about. Rename to something
like `formattingColumns`/`eligibleColumns` (and update references) to reflect
the expanded set.
##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx:
##########
@@ -720,7 +718,9 @@ const config: ControlPanelConfig = {
? colnames
.filter(
(colname: string, index: number) =>
- coltypes[index] === GenericDataType.Numeric,
+ coltypes[index] === GenericDataType.Numeric ||
+ coltypes[index] === GenericDataType.String ||
+ coltypes[index] === GenericDataType.Boolean,
)
Review Comment:
`numericColumns` is no longer purely numeric after adding String/Boolean
types, so the variable name is inaccurate. Renaming it to something reflecting
the broader eligibility (e.g., `eligibleColumns`) would reduce confusion.
--
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]