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: Exclude SUPERSET_DEFAULT from the list of available color schemes #17018

Merged
merged 4 commits into from
Oct 11, 2021
Merged

fix: Exclude SUPERSET_DEFAULT from the list of available color schemes #17018

merged 4 commits into from
Oct 11, 2021

Conversation

geido
Copy link
Member

@geido geido commented Oct 7, 2021

SUMMARY

The SUPERSET_DEFAULT theme should not be considered as an independent color scheme as it is just a reference to an existing color scheme that is already part of the list of schemes. This PR excludes the SUPERSET_DEFAULT from the options of color schemes while keeping retro-compatibility with those that use SUPERSET_DEFAULT as a scheme.

BEFORE

See issue #16962

AFTER

Color.scheme.tes.mp4

TESTING INSTRUCTIONS

  1. Open a Dashboard and edit the properties
  2. View the color scheme options and make sure there are no duplicates
  3. Select the D3Category10 option and make sure the right color scheme is represented in the advanced - json metadata

ADDITIONAL INFORMATION

@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #17018 (935e943) into master (9e980b6) will decrease coverage by 0.04%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17018      +/-   ##
==========================================
- Coverage   76.94%   76.89%   -0.05%     
==========================================
  Files        1030     1031       +1     
  Lines       55088    55179      +91     
  Branches     7480     7506      +26     
==========================================
+ Hits        42385    42430      +45     
- Misses      12452    12497      +45     
- Partials      251      252       +1     
Flag Coverage Δ
javascript 70.82% <87.50%> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
...explore/components/controls/ColorSchemeControl.jsx 60.60% <87.50%> (-28.68%) ⬇️
...nd/src/views/CRUD/data/dataset/AddDatasetModal.tsx 54.54% <0.00%> (-8.32%) ⬇️
...et-frontend/src/components/TableSelector/index.tsx 74.52% <0.00%> (-3.03%) ⬇️
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 71.60% <0.00%> (-2.23%) ⬇️
.../src/explore/components/controls/SelectControl.jsx 77.61% <0.00%> (-1.08%) ⬇️
...ts/nativeFilters/FiltersConfigModal/FilterTabs.tsx 85.71% <0.00%> (-0.96%) ⬇️
...e/components/controls/SelectAsyncControl/index.tsx 80.48% <0.00%> (-0.60%) ⬇️
...mponents/nativeFilters/FiltersConfigModal/utils.ts 70.37% <0.00%> (-0.52%) ⬇️
...c/views/CRUD/data/database/DatabaseModal/index.tsx 43.57% <0.00%> (-0.23%) ⬇️
... and 5 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 9e980b6...935e943. Read the comment docs.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

Left a non-blocking suggestion.

geido and others added 2 commits October 11, 2021 11:41
…ontrol.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
…ontrol.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
@geido geido merged commit 14b7f6c into apache:master Oct 11, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
apache#17018)

* Handle SUPERSET_DEFAULT theme

* Update superset-frontend/src/explore/components/controls/ColorSchemeControl.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/explore/components/controls/ColorSchemeControl.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
@eschutho eschutho added the v1.4 label Nov 23, 2021
eschutho pushed a commit that referenced this pull request Nov 23, 2021
#17018)

* Handle SUPERSET_DEFAULT theme

* Update superset-frontend/src/explore/components/controls/ColorSchemeControl.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/explore/components/controls/ColorSchemeControl.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
(cherry picked from commit 14b7f6c)
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
apache#17018)

* Handle SUPERSET_DEFAULT theme

* Update superset-frontend/src/explore/components/controls/ColorSchemeControl.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/explore/components/controls/ColorSchemeControl.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
@mistercrunch mistercrunch added 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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/S v1.4 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🚢 1.5.0
Projects
None yet
4 participants