rusackas opened a new pull request, #21482: URL: https://github.com/apache/superset/pull/21482
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY The Table viz allows users to have little histogram/bar chart cells which can be gray, red when negative, or colorized via conditional formatting. Previously, these were implemented as the CSS background of the table cells, and a gradient was used to draw the bars, with gradient stops to set bar widths. This was problematic as people could not customized these with CSS, and it was also a potentially difficult to understand implementation from a maintenance standpoint. In this revised approach, divs are conditionally added to table cells to act as these bars, and they're positioned behind the text content. They use a few small functions to calculate width, offset, and color for their display. They're also rendered with a `cell-bar` class and (when applicable) a `negative` or `positive` class to indicate if they're positive or negative, for further customization options. <img width="381" alt="image" src="https://user-images.githubusercontent.com/812905/190426407-178e5a04-b5c8-49da-a4cb-6c7146d4b243.png"> ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF No visual changes here - just representing what was changed. But, this is the "after" FWIW. <img width="473" alt="image" src="https://user-images.githubusercontent.com/812905/190424363-46d1ce03-6b3a-4774-a0a3-8d19a4d7d40c.png"> <img width="472" alt="image" src="https://user-images.githubusercontent.com/812905/190425060-9f0899d1-94ec-4825-8fec-b7745333b6b9.png"> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> Test example tables, and throw different formatting options at the table. I think this covers all the use cases, but there's always a chance I missed something! ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
