kokhlo opened a new pull request, #44665: URL: https://github.com/apache/superset/pull/44665
### SUMMARY On a Table chart, a conditional-formatting rule with **Formatting object = cell bar** never rendered in Explore (#44663). The rule was dropped by two independent gates in `TableChart.tsx`: 1. The bar container only renders when `valueRange` is set, and `valueRange` was computed *before* formatters run, gated on the generic `Show cell bars` toggle — an unrelated control. With the toggle off, a `CELL_BAR` rule had nowhere to draw. 2. Even with the toggle on, the rule color was assigned inside `if (generalShowCellBars)`, so the custom color/rule still did not reach the bar. Additionally, numeric columns delivered as strings (`"1.00"`, common for DECIMAL columns) fell through every gate: `getValueRange` filters `typeof value === 'number'` (no range → no bar container) and the comparator's `Equal` is a strict `===` (`"1.00" === 1` never matches) — while the XLSX export interprets the same form data just fine. ### BEFORE/AFTER - `CELL_BAR` rule + toggle ON: rule color was applied to the generic gradient only; matched-vs-unmatched cells were indistinguishable by the rule itself → now the matched cells carry the rule color on their bars. - `CELL_BAR` rule + toggle OFF: nothing rendered at all → now the rule draws its bar on matching cells; the toggle keeps controlling only the default gradient. - Numeric-as-string columns: no bar, comparator never matched → now parsed for both bar geometry and comparator matching, mirroring how the export interprets them. ### TESTING INSTRUCTIONS 1. Open a Table chart (Raw records) with a numeric column. 2. Customize → Adaptive formatting → add a color formatter: column = the numeric column, Formatting object = **cell bar**, operator `=`, target value = a value present in the column, color = any hex. 3. Update chart → the matching cells now show in-cell bars in the rule color. 4. Toggle **Show cell bars for all columns** off → the rule's bars remain on matching cells, the generic gradient disappears. 5. Non-matching cells stay bare in both states. New regression tests in `test/TableChart.test.tsx`: - `renders a bar for a cell-bar conditional formatting rule regardless of the global toggle` (RED on master: bar never rendered with the toggle off; GREEN with the fix) - `cell-bar rule on string numeric cells matches the comparator numerically` (RED on master: `"1.00"` never matched `= 1234`) Full suite: 101/101 passed locally (`jest plugins/plugin-chart-table/test/TableChart.test.tsx`). ### ADDITIONAL INFORMATION - Frontend-only change; `TEXT_COLOR` and background-color formatter behavior untouched. - [x] Has associated issue: closes #44663 - [ ] Changes UI - [ ] Includes DB Migration - [ ] Commits are prefixed per repo convention Closes #44663 -- 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]
