GitHub user edison-lhk added a comment to the discussion: Conditional 
formatting improvements

@rusackas Hey Evan, as per the project requirement, we would like to share our 
purposed solution regarding to the issue to get some feedback!

For feature 1 (Add support for applying conditional formatting to boolean 
columns), we propose extending conditional formatting to support boolean 
fields. When a boolean column is selected, the rule editor will show 
type-specific operators — `is true`, `is false`, `is null`, and `is not null` — 
and hide options for other data types. Boolean rules are evaluated as 
categorical predicates (`true`/`false`/`null`) and apply a fixed color directly 
without gradients or thresholds. 

The change includes: 

1. ensuring boolean columns appear in the column picker wherever conditional 
formatting is configured
2. scoping operators by column type so only valid choices are shown
3. coloring the cell whenever its value satisfies the rule
4. keeping full backward compatibility so existing tables are unchanged unless 
a boolean rule is added.

For feature 2 (Add a flag to switch from a color gradient to the color itself 
without using a gradient), in order to address improving customization for 
colour formatting using fixed colours, we propose adding a boolean 
`useGradient` flag to conditional formatting to complement the current 
gradient-only approach. When `useGradient` is true (default), behaviour remains 
unchanged; when false, rules apply a fixed (solid) color at full opacity with 
no interpolation, improving readability for categorical/discrete data and for 
cases where clear thresholds or outliers need crisp highlighting. 

The change includes: 

1. adding `useGradient` to `ConditionalFormattingConfig` (default `true` for 
backward compatibility)
2. a checkbox in the UI to toggle it
3. updating colour computation to skip opacity calculations when disabled.

We’d really appreciate any feedback or suggestions you might have!

GitHub link: 
https://github.com/apache/superset/discussions/35269#discussioncomment-14652283

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


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

Reply via email to