Skip to content

Use SUPERSET_DEFAULT as the default palette#257

Merged
dpordomingo merged 6 commits into
src-d:masterfrom
dpordomingo:schemes-set-defaults
Aug 16, 2019
Merged

Use SUPERSET_DEFAULT as the default palette#257
dpordomingo merged 6 commits into
src-d:masterfrom
dpordomingo:schemes-set-defaults

Conversation

@dpordomingo
Copy link
Copy Markdown
Contributor

@dpordomingo dpordomingo commented Aug 15, 2019

supersedes #241 (This PR is the first stage, as defined by #241 (comment))
blocks #259

This PR prepares our charts and selectors to use the default palette: SUPERSET_DEFAULT instead of the currently hardcoded palettes (bnbColors and blue_white_yellow).
The colors of the palettes are kept, so this PR does not contain branding at all.


List of changes:

  • e9366fe ba76c52 Set SUPERSET_DEFAULT as default for Categorical and Sequential Schemes instead of the currently hardcoded bnbColors and blue_white_yellow. It will also use it as the default on ColorScheme selectors (e.g. when creating a chart)
    It does not change the palettes currently configured in our charts, but the new charts if no other color is manually assigned.
  • dff62ff Make PRIMARY_COLOR fully configurable
  • 4fdf8bb Add custom palettes and usage examples
  • 3681458 Make SUPERSET_DEFAULT the default palette for AnnotationLayer
  • a72e223 Change our charts to use SUPERSET_DEFAULT, instead of the old bnbColors or d3Category10.

@dpordomingo dpordomingo requested a review from a team August 15, 2019 04:54
@dpordomingo dpordomingo self-assigned this Aug 15, 2019
@dpordomingo dpordomingo added the enhancement New feature or request label Aug 15, 2019
@dpordomingo dpordomingo force-pushed the schemes-set-defaults branch from 1d6e82c to 378e9da Compare August 15, 2019 07:14
Superset is using 'SUPERSET_DEFAULT' as the default CategoricalScheme and
SequentialScheme registries key

i.e. https://github.com/apache-superset/superset-ui/blob/v0.11.3/packages/superset-ui-color/src/CategoricalSchemeRegistrySingleton.ts
i.e. https://github.com/apache-superset/superset-ui/blob/v0.11.3/packages/superset-ui-color/src/SequentialSchemeRegistrySingleton.ts

This commit assigns the current default palettes: 'bnbColors', 'blue_white_yellow', for 'SUPERSET_DEFAULT' key, for each respective SchemeRegistry.

Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
It will set 'SUPERSET_DEFAULT' as the default option in 'Color Scheme'
selector, (e.g. when creating a chart)
This change modifies the current defaults: 'bnbColors' and
'blue_white_yellow' palettes for Categorical and Sequential schemes.

It does not change currently configured schemes, but it will affect
only the new charts if no other color is manually asigned.

Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
@dpordomingo dpordomingo force-pushed the schemes-set-defaults branch from 378e9da to 8330721 Compare August 16, 2019 06:16
Entrypoint to define our own colors, and use them in the application.

Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Instead of using 'bnbColors' or 'd3Category10' in our charts,
it will be used the default color_scheme: 'SUPERSET_DEFAULT'

Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
@dpordomingo dpordomingo force-pushed the schemes-set-defaults branch from 8330721 to a72e223 Compare August 16, 2019 07:47
@dpordomingo dpordomingo merged commit 5564d3f into src-d:master Aug 16, 2019
@dpordomingo
Copy link
Copy Markdown
Contributor Author

rebased adding:

  • dff62ff Make PRIMARY_COLOR fully configurable
  • 4fdf8bb Add custom palettes and usage examples

@dpordomingo dpordomingo deleted the schemes-set-defaults branch August 19, 2019 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants