bito-code-review[bot] commented on code in PR #42053:
URL: https://github.com/apache/superset/pull/42053#discussion_r3732206898
##########
superset-frontend/packages/superset-ui-chart-controls/src/types.ts:
##########
@@ -494,7 +495,7 @@ export type ConditionalFormattingConfig = {
targetValueLeft?: number;
targetValueRight?: number;
column?: string;
- colorScheme?: string;
+ colorScheme?: RGBColor | string;
Review Comment:
<!-- Bito Reply -->
The reviewer's concern regarding the `a` (alpha) property is valid in the
context of type safety, but your observation about the destructuring pattern is
correct. Since `rgbaToHex` (and similar utility functions) typically use `const
{ r, g, b, a = 1 } = rgb;`, the code safely handles cases where `a` is
undefined by providing a default value of `1`. This pattern effectively
mitigates the risk of runtime errors when transitioning from a strict
`RgbaColor` type to a more flexible `RGBColor` type where `a` is optional.
--
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]