kokhlo commented on PR #44665: URL: https://github.com/apache/superset/pull/44665#issuecomment-5901631847
Good catch — this one is real, and it is a regression from this branch rather than a gap that was already there. A cell-bar rule can sit on a string column: the bar's reference column is picked from the numeric columns, but the rule's own column comes from all of them. For a string column the control renders a text input rather than a number input, so the target is persisted as a string, and `getColorFormatters` compares `Equal` with `value === targetValue`. Parsing the cell first turned `"1234"` into `1234`, and the rule could no longer match its own cell, so the bar disappeared. The new test isolates it: on the previous head `bars[0]` is `null`, and disabling only the coercion block turns that same test green, so the coercion is the sole cause. `targetValue` now travels with the formatter the way `operator` already does, and the coercion stands down when the target is text, next to the existing exception for text comparators. A numeric target on a numeric column still coerces, which is the case the block was written for. - `TableChart.test.tsx`: 106 passed before this commit with the new test failing, 107 passed after - chart-controls utils and `ConditionalFormattingControl`: 78 passed -- 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]
