Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

fix: Color consistency #1406

Merged
merged 12 commits into from
Nov 2, 2021
Merged

fix: Color consistency #1406

merged 12 commits into from
Nov 2, 2021

Conversation

geido
Copy link
Member

@geido geido commented Oct 13, 2021

SUMMARY

This PR adds the ability to reset the forced colors of a namespace. It also returns a fresh new color scale instance every time in order for the ordinal scale to work as intended.

This PR is a prerequisite for the related Superset PR apache/superset#17089

TESTING INSTRUCTIONS

Please follow each test case in the related Superset PR apache/superset#17089

ADDITIONAL INFORMATION

Associated issues: apache/superset#11677 apache/superset#16970 apache/superset#16891 apache/superset#16961 apache/superset#16980 apache/superset#16979

@geido geido requested a review from a team as a code owner October 13, 2021 14:29
@vercel
Copy link

vercel bot commented Oct 13, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/superset/superset-ui/9e9SRbL79YhKiD2p4REf7rN6QfJr
✅ Preview: https://superset-ui-git-fork-geido-fix-colorconsistency-superset.vercel.app

@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

Merging #1406 (38909cb) into master (6bf1c57) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1406      +/-   ##
==========================================
- Coverage   30.43%   30.39%   -0.04%     
==========================================
  Files         497      497              
  Lines       10000     9995       -5     
  Branches     1689     1688       -1     
==========================================
- Hits         3043     3038       -5     
  Misses       6711     6711              
  Partials      246      246              
Impacted Files Coverage Δ
...perset-ui-chart-controls/src/sections/sections.tsx 100.00% <ø> (ø)
...et-ui-chart-controls/src/shared-controls/index.tsx 35.71% <ø> (-0.29%) ⬇️
packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
...set-ui-core/src/color/CategoricalColorNamespace.ts 95.23% <0.00%> (-4.77%) ⬇️
...uperset-ui-core/src/color/CategoricalColorScale.ts 100.00% <ø> (ø)
...gins/legacy-plugin-chart-chord/src/controlPanel.ts 0.00% <ø> (ø)
.../legacy-plugin-chart-histogram/src/controlPanel.ts 0.00% <ø> (ø)
...legacy-plugin-chart-partition/src/controlPanel.tsx 0.00% <ø> (ø)
...gins/legacy-plugin-chart-rose/src/controlPanel.tsx 0.00% <ø> (ø)
...egacy-plugin-chart-sankey-loop/src/controlPanel.ts 0.00% <ø> (ø)
... and 20 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 6bf1c57...38909cb. Read the comment docs.

Copy link
Contributor

@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.

2 non blocking comments, looks good!

@geido geido merged commit c54aa08 into apache-superset:master Nov 2, 2021
@serenajiang
Copy link
Contributor

Hi @geido, in our last weekly release, we saw a bug where Time Series Area Charts have no fill color. I am guessing it is related to this change. Can you take a look?

Current behavior (superset apache/master, 2021-11-04)

image

Previous behavior (superset apache/master, 2021-10-28)
image

@kgabryje
Copy link
Contributor

Hey @serenajiang! This bug was introduced in #1447 and has been fixed by #1464. The fix should be included in superset-ui 0.18.23.
CC @villebro

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants