You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/08/09 23:34:13 UTC

[PR] fix(deckgl): normalize legend swatch alpha channel to 0-1 for CSS rgba() [superset]

rusackas opened a new pull request, #42942:
URL: https://github.com/apache/superset/pull/42942

   Follow-up to #40784.
   
   ### SUMMARY
   
   #40784 replaced the deck.gl legend's colour-tinted glyph swatch with a real
   CSS box whose `background-color`/`border` come from the category colour. That
   colour string is built as `rgba(${v.color?.join(', ')})`, but deck.gl colour
   arrays express alpha as 0-255 while CSS `rgba()` expects the alpha channel as
   0-1. As a result, any category with a semi-transparent colour rendered its
   legend swatch fully opaque instead of translucent.
   
   This normalizes the alpha channel by dividing it by 255 before building the
   `rgba()` string, matching what CSS expects.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable — the bug only affects the alpha channel of the legend swatch
   colour, which isn't visually distinct in a static screenshot without a
   side-by-side transparency comparison against the map layer.
   
   ### TESTING INSTRUCTIONS
   
   1. Configure a deck.gl chart (Polygon/Scatterplot/Arc/Path) with a categorical
      colour scheme where the underlying colours include an alpha value less
      than 255 (e.g. via a custom color scheme or opacity control).
   2. Open the chart and check the legend swatches: before this change, swatches
      for semi-transparent colours rendered fully opaque; after this change they
      render with the correct translucency.
   3. Added a unit test in `Legend.test.tsx` asserting the swatch's
      `background-color` divides the input alpha by 255.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] 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
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(deckgl): normalize legend swatch alpha channel to 0-1 for CSS rgba() [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42942:
URL: https://github.com/apache/superset/pull/42942#issuecomment-5234423319

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(deckgl): normalize legend swatch alpha channel to 0-1 for CSS rgba() [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #42942:
URL: https://github.com/apache/superset/pull/42942


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(deckgl): normalize legend swatch alpha channel to 0-1 for CSS rgba() [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #42942:
URL: https://github.com/apache/superset/pull/42942#issuecomment-5234462867

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42942?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 66.41%. Comparing base ([`3b164e4`](https://app.codecov.io/gh/apache/superset/commit/3b164e4270860ac07223d4df1a60ca7b56312362?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d0d1265`](https://app.codecov.io/gh/apache/superset/commit/d0d12659bd1040ce033b5c29f2adc4965b618dbf?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #42942   +/-   ##
   =======================================
     Coverage   66.41%   66.41%           
   =======================================
     Files        2858     2858           
     Lines      161446   161449    +3     
     Branches    37190    37193    +3     
   =======================================
   + Hits       107222   107225    +3     
     Misses      52187    52187           
     Partials     2037     2037           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/42942/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/42942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.27% <100.00%> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/42942?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org