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

feat: Custom color schemes support #12210

Merged
merged 10 commits into from Jan 7, 2021

Conversation

amitmiran137
Copy link
Member

SUMMARY

Today colors schemes are loaded from @superset-ui/core
we should have support for individual deployments to inject their own sets of color scheme
the mechanism was copied from setup plugins logic

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

docs: add FAQ to custom color schemes
Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

LGTM with one nit.

I'm also wondering whether we should consolidate all setup extras to a single file and provide a somewhat more formalized API...

docs/src/pages/docs/frequently-asked-questions-page.mdx Outdated Show resolved Hide resolved
@villebro villebro closed this Jan 4, 2021
@villebro villebro reopened this Jan 4, 2021
@codecov-io
Copy link

codecov-io commented Jan 4, 2021

Codecov Report

Merging #12210 (861e0f3) into master (f3ab1f4) will decrease coverage by 7.14%.
The diff coverage is 80.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12210      +/-   ##
==========================================
- Coverage   66.20%   59.05%   -7.15%     
==========================================
  Files         996      951      -45     
  Lines       49174    46661    -2513     
  Branches     4993     4316     -677     
==========================================
- Hits        32554    27556    -4998     
- Misses      16476    19105    +2629     
+ Partials      144        0     -144     
Flag Coverage Δ
cypress 51.44% <78.94%> (+7.34%) ⬆️
javascript ?
python 63.33% <100.00%> (-0.89%) ⬇️

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

Impacted Files Coverage Δ
superset/views/base.py 75.21% <ø> (ø)
superset-frontend/src/setup/setupColors.js 77.77% <42.85%> (-22.23%) ⬇️
superset-frontend/src/preamble.ts 88.46% <100.00%> (+31.93%) ⬆️
superset/config.py 90.61% <100.00%> (+0.06%) ⬆️
...uperset-frontend/src/dashboard/util/dnd-reorder.js 0.00% <0.00%> (-100.00%) ⬇️
...rset-frontend/src/dashboard/util/getEmptyLayout.js 0.00% <0.00%> (-100.00%) ⬇️
...dashboard/components/resizable/ResizableHandle.jsx 0.00% <0.00%> (-100.00%) ⬇️
.../src/dashboard/util/getFilterScopeFromNodesTree.js 0.00% <0.00%> (-93.48%) ⬇️
...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx 11.76% <0.00%> (-88.24%) ⬇️
...src/dashboard/components/gridComponents/Header.jsx 10.52% <0.00%> (-86.85%) ⬇️
... and 429 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 f3ab1f4...861e0f3. Read the comment docs.

@amitmiran137 amitmiran137 reopened this Jan 4, 2021
@amitmiran137 amitmiran137 reopened this Jan 5, 2021
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

A few comments

docs/src/pages/docs/frequently-asked-questions-page.mdx Outdated Show resolved Hide resolved
docs/src/pages/docs/frequently-asked-questions-page.mdx Outdated Show resolved Hide resolved
@@ -20,6 +20,7 @@ import { setConfig as setHotLoaderConfig } from 'react-hot-loader';
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
import moment from 'moment';
import { configure } from '@superset-ui/core';
import ColorScheme from '@superset-ui/core/lib/color/ColorScheme';
Copy link
Member

Choose a reason for hiding this comment

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

We should probably export this (and other related ones) in @superset-ui/core.

superset-frontend/src/preamble.ts Outdated Show resolved Hide resolved
@amitmiran137 amitmiran137 reopened this Jan 6, 2021
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Would you be ok with moving the example to config.py? LGTM after that.

docs/src/pages/docs/frequently-asked-questions-page.mdx Outdated Show resolved Hide resolved
superset/config.py Outdated Show resolved Hide resolved
@villebro villebro merged commit 8214237 into apache:master Jan 7, 2021
@amitmiran137 amitmiran137 deleted the feat/custom_color_scheme branch January 7, 2021 17:50
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 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/M 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants