Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin-chart-pivot-table): color weight of Conditional formatting metrics not work #20396

Merged
merged 2 commits into from
Jun 16, 2022

Conversation

stephenLYZ
Copy link
Member

SUMMARY

Since our color scheme uses hex values, the previous way of RGB is not working, so we fix it here.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

image

after

image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@pull-request-size pull-request-size bot added size/L and removed size/S labels Jun 16, 2022
@codecov
Copy link

codecov bot commented Jun 16, 2022

Codecov Report

Merging #20396 (0b1c5e7) into master (c3fdd52) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #20396      +/-   ##
==========================================
+ Coverage   66.67%   66.70%   +0.03%     
==========================================
  Files        1738     1739       +1     
  Lines       65097    65135      +38     
  Branches     6887     6897      +10     
==========================================
+ Hits        43405    43450      +45     
+ Misses      19942    19932      -10     
- Partials     1750     1753       +3     
Flag Coverage Δ
javascript 51.74% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...-ui-chart-controls/src/utils/getColorFormatters.ts 100.00% <100.00%> (ø)
...plore/components/controls/VizTypeControl/index.tsx 73.07% <0.00%> (-6.93%) ⬇️
...gins/plugin-chart-echarts/src/Pie/controlPanel.tsx 28.57% <0.00%> (-4.77%) ⬇️
...c/views/CRUD/data/database/DatabaseModal/index.tsx 32.16% <0.00%> (-0.18%) ⬇️
superset-frontend/src/components/Icons/index.tsx 100.00% <0.00%> (ø)
superset-frontend/src/components/Modal/Modal.tsx 88.05% <0.00%> (ø)
...frontend/src/SqlLab/components/SqlEditor/index.jsx 51.36% <0.00%> (ø)
.../src/explore/components/ControlPanelsContainer.tsx 79.80% <0.00%> (ø)
.../src/views/CRUD/data/savedquery/SavedQueryList.tsx 63.30% <0.00%> (ø)
...dashboard/components/SliceHeaderControls/index.tsx 64.28% <0.00%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c3fdd52...0b1c5e7. Read the comment docs.

@stevetracvc
Copy link
Contributor

@stephenLYZ this overlaps (and now conflicts) with #20353 so I'm trying to figure out the best way to fix my conflicts.

So is everything moving toward 8 digit hex colors for alpha, rather than 'rgba(R,G,B,A)' strings? Looks like it is so I'll assume so for now.

If so, there may be future issues in https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/color/utils.ts since it expects hex codes to be 3 or 6 digits.

@stephenLYZ
Copy link
Member Author

@stevetracvc hi, thanks for your work! At the moment I think color schemes are hex colors, so here I still use 8 digit hex colors for consistency, but we can't completely avoid using rgba, like linear-gradient property. so if you need to introduce rgba in your PR it's also acceptable. BTW, there is an emotion-rgba library that adds alpha channels to rgb. Not sure if we can use this directly.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants