From 9889bf4d1a323ff39f3eddb992fd4652ffeb0013 Mon Sep 17 00:00:00 2001 From: David Pordomingo Date: Wed, 31 Jul 2019 21:58:19 +0200 Subject: [PATCH] Make srcdMain the default palette for SUPERSET_DEFAULT key Superset is using 'SUPERSET_DEFAULT' as the default CategoricalScheme key i.e. https://github.com/apache-superset/superset-ui/blob/master/packages/superset-ui-color/src/CategoricalSchemeRegistrySingleton.ts This commit assigns 'srcdMain' palette for 'SUPERSET_DEFAULT' key Signed-off-by: David Pordomingo --- srcd/superset/assets/src/customization/index.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/srcd/superset/assets/src/customization/index.jsx b/srcd/superset/assets/src/customization/index.jsx index 319543b9..f04abdb8 100644 --- a/srcd/superset/assets/src/customization/index.jsx +++ b/srcd/superset/assets/src/customization/index.jsx @@ -1,12 +1,18 @@ import { getCategoricalSchemeRegistry } from '@superset-ui/color'; import srcdColors from './srcdColors'; +export const defaultScheme = 'SUPERSET_DEFAULT'; + +const srcdPaletteId = 'srcdMain'; function setupColors() { const categoricalSchemeRegistry = getCategoricalSchemeRegistry(); [srcdColors].forEach((group) => { group.forEach((scheme) => { categoricalSchemeRegistry.registerValue(scheme.id, scheme); + if (scheme.id === srcdPaletteId) { + categoricalSchemeRegistry.registerValue(defaultScheme, scheme); + } }); }); }