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

chore: Add option to set a custom color scheme as default #16540

Merged
merged 9 commits into from
Sep 14, 2021

Conversation

suddjian
Copy link
Member

@suddjian suddjian commented Sep 1, 2021

SUMMARY

Allows setting an extra color scheme as default instead of the standard Superset theme.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Add config for a custom categorical color scheme, with "isDefault": True
  2. Create a chart, verify custom color scheme is used

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #16540 (f0bb761) into master (37c2020) will decrease coverage by 0.26%.
The diff coverage is 79.71%.

❗ Current head f0bb761 differs from pull request most recent head cd66c72. Consider uploading reports for the commit cd66c72 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16540      +/-   ##
==========================================
- Coverage   76.64%   76.38%   -0.27%     
==========================================
  Files        1003     1007       +4     
  Lines       53959    54725     +766     
  Branches     7330     7620     +290     
==========================================
+ Hits        41358    41800     +442     
- Misses      12362    12682     +320     
- Partials      239      243       +4     
Flag Coverage Δ
hive 81.30% <86.56%> (?)
mysql ?
postgres ?
presto ?
python 81.30% <86.56%> (-0.57%) ⬇️
sqlite ?

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

Impacted Files Coverage Δ
superset-frontend/src/components/Menu/Menu.tsx 71.22% <ø> (+1.43%) ⬆️
superset-frontend/src/dashboard/actions/hydrate.js 1.69% <0.00%> (-0.03%) ⬇️
...et-frontend/src/dashboard/components/Dashboard.jsx 79.59% <ø> (+0.74%) ⬆️
...src/dashboard/components/gridComponents/Column.jsx 91.11% <ø> (+3.23%) ⬆️
...nd/src/dashboard/components/gridComponents/Row.jsx 90.24% <ø> (+3.57%) ⬆️
...mponents/nativeFilters/FiltersConfigModal/utils.ts 73.17% <ø> (-0.45%) ⬇️
...nd/src/dashboard/components/nativeFilters/utils.ts 58.26% <ø> (+2.01%) ⬆️
superset-frontend/src/views/App.tsx 0.00% <0.00%> (ø)
...c/views/CRUD/data/database/DatabaseModal/index.tsx 45.15% <0.00%> (+0.90%) ⬆️
superset/charts/api.py 85.82% <ø> (ø)
... and 90 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 37c2020...cd66c72. Read the comment docs.

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

Small catch

superset-frontend/src/setup/setupColors.ts Outdated Show resolved Hide resolved
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
@rusackas rusackas closed this Sep 13, 2021
@rusackas rusackas reopened this Sep 13, 2021
@suddjian suddjian merged commit 540277e into master Sep 14, 2021
@suddjian suddjian deleted the default-color-scheme branch September 14, 2021 18:09
stevenuray pushed a commit to preset-io/superset that referenced this pull request Sep 16, 2021
* upgrade superset-ui for new flag

* configurable default categorical scheme

* dry refactor

* doc example

* Update superset-frontend/src/setup/setupColors.ts

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>

* re-adding # type: ignore (suggestion from ville)

* ugh... missed a space.

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
(cherry picked from commit 540277e)
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
* upgrade superset-ui for new flag

* configurable default categorical scheme

* dry refactor

* doc example

* Update superset-frontend/src/setup/setupColors.ts

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>

* re-adding # type: ignore (suggestion from ville)

* ugh... missed a space.

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
* upgrade superset-ui for new flag

* configurable default categorical scheme

* dry refactor

* doc example

* Update superset-frontend/src/setup/setupColors.ts

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>

* re-adding # type: ignore (suggestion from ville)

* ugh... missed a space.

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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 preset-io size/M 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants