bito-code-review[bot] commented on code in PR #42053:
URL: https://github.com/apache/superset/pull/42053#discussion_r3707536962
##########
superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx:
##########
@@ -773,6 +769,7 @@ const config: ControlPanelConfig = {
(item: ConditionalFormattingConfig, index, array) => {
if (
item.colorScheme &&
+ typeof item.colorScheme === 'string' &&
!['Green', 'Red'].includes(item.colorScheme)
Review Comment:
<!-- Bito Reply -->
The suggestion is valid and addresses a potential issue where trend color
formatting flags could be lost during save operations. By explicitly checking
for 'Green' and 'Red' color schemes, the migration logic ensures that these
specific configurations are preserved rather than skipped, preventing the
silent loss of `columnFormatting` and `objectFormatting` flags.
**superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx**
```
if (
item.colorScheme &&
typeof item.colorScheme === 'string' &&
!['Green', 'Red'].includes(item.colorScheme)
```
--
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]