korbit-ai[bot] commented on code in PR #33844:
URL: https://github.com/apache/superset/pull/33844#discussion_r2159387511


##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -857,7 +855,7 @@ export default function TableChart<D extends DataRecord = 
DataRecord>(
                   valueRange,
                   alignPositiveNegative,
                 })}%`};
-                background-color: ${cellBackground({
+                background-color: ${backgroundColor || cellBackground({
                   value: value as number,
                   colorPositiveNegative,
                 })};

Review Comment:
   ### Invalid Cell Bar Background Color Handling <sub>![category 
Functionality](https://img.shields.io/badge/Functionality-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The cell bar background color logic doesn't properly handle the case when 
backgroundColor is an empty string, causing the fallback cellBackground to be 
ignored.
   
   
   ###### Why this matters
   If conditional formatting returns an empty string for backgroundColor, the 
cell bars will be invisible instead of using the fallback background color, 
breaking the visualization.
   
   ###### Suggested change ∙ *Feature Preview*
   Modify the background color logic to only use backgroundColor when it has a 
non-empty value:
   ```typescript
   background-color: ${(backgroundColor && backgroundColor.length > 0) 
                     ? backgroundColor 
                     : cellBackground({
                         value: value as number,
                         colorPositiveNegative,
                       })};
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/843c36e0-a2c7-49d7-ad66-e722cb84ebc0/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/843c36e0-a2c7-49d7-ad66-e722cb84ebc0?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/843c36e0-a2c7-49d7-ad66-e722cb84ebc0?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/843c36e0-a2c7-49d7-ad66-e722cb84ebc0?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/843c36e0-a2c7-49d7-ad66-e722cb84ebc0)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:846544b0-0395-43ad-aa59-db38fc8077f6 -->
   
   
   [](846544b0-0395-43ad-aa59-db38fc8077f6)



-- 
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