-
Notifications
You must be signed in to change notification settings - Fork 15
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
[RFC] Apply our brand colors on source{d} charts #241
Conversation
Palette reassignmentsChanges applied on overview dashboard:
Changes applied on collaboration dashboard:
|
overview dashboardclick to see the palettes applied on each chart of overview dashboard
|
collaboration dashboardnote: Pull Requests Workflow chart could not be customized because its underlying type (Event Flow) does not allow to change its visual properties. click to see the palettes applied on each chart of collaboration dashboard
|
@@ -14,7 +14,7 @@ | |||
"datasource_name": "gitbase.admin admin-commit_merges-8X2HBrQre", | |||
"datasource_type": "table", | |||
"id": 9, | |||
"params": "{\"adhoc_filters\": [], \"annotation_layers\": [], \"bottom_margin\": \"auto\", \"color_scheme\": \"bnbColors\", \"comparison_type\": \"values\", \"contribution\": false, \"datasource\": \"14__table\", \"granularity_sqla\": \"commit_author_when\", \"groupby\": [\"commit_type\"], \"line_interpolation\": \"linear\", \"metrics\": [{\"aggregate\": null, \"column\": null, \"expressionType\": \"SQL\", \"fromFormData\": true, \"hasCustomLabel\": false, \"label\": \"COUNT(*)\", \"optionName\": \"metric_n4xn9emh55_60hid92bszp\", \"sqlExpression\": \"COUNT(*)\"}], \"order_desc\": true, \"resample_fillmethod\": null, \"resample_how\": null, \"resample_rule\": null, \"rich_tooltip\": true, \"rolling_type\": \"None\", \"row_limit\": 50000, \"show_brush\": \"auto\", \"show_controls\": false, \"show_legend\": true, \"slice_id\": 4, \"stacked_style\": \"stack\", \"time_grain_sqla\": \"P1M\", \"time_range\": \"100 years ago : \", \"timeseries_limit_metric\": null, \"viz_type\": \"area\", \"x_axis_format\": \"smart_date\", \"x_axis_label\": \"\", \"x_axis_showminmax\": false, \"x_ticks_layout\": \"auto\", \"y_axis_bounds\": [null, null], \"y_axis_format\": \".3s\", \"y_log_scale\": false, \"remote_id\": \"be4154a6-726c-4dcc-bcff-da20558aaa55\", \"datasource_name\": \"gitbase.admin admin-commit_merges-8X2HBrQre\", \"schema\": \"gitbase.admin admin-commit_merges-8X2HBrQre\", \"database_name\": \"gitbase\"}", | |||
"params": "{\"adhoc_filters\": [], \"annotation_layers\": [], \"bottom_margin\": \"auto\", \"color_scheme\": \"srcdRoyal\", \"comparison_type\": \"values\", \"contribution\": false, \"datasource\": \"14__table\", \"granularity_sqla\": \"commit_author_when\", \"groupby\": [\"commit_type\"], \"line_interpolation\": \"linear\", \"metrics\": [{\"aggregate\": null, \"column\": null, \"expressionType\": \"SQL\", \"fromFormData\": true, \"hasCustomLabel\": false, \"label\": \"COUNT(*)\", \"optionName\": \"metric_n4xn9emh55_60hid92bszp\", \"sqlExpression\": \"COUNT(*)\"}], \"order_desc\": true, \"resample_fillmethod\": null, \"resample_how\": null, \"resample_rule\": null, \"rich_tooltip\": true, \"rolling_type\": \"None\", \"row_limit\": 50000, \"show_brush\": \"auto\", \"show_controls\": false, \"show_legend\": true, \"slice_id\": 4, \"stacked_style\": \"stack\", \"time_grain_sqla\": \"P1M\", \"time_range\": \"100 years ago : \", \"timeseries_limit_metric\": null, \"viz_type\": \"area\", \"x_axis_format\": \"smart_date\", \"x_axis_label\": \"\", \"x_axis_showminmax\": false, \"x_ticks_layout\": \"auto\", \"y_axis_bounds\": [null, null], \"y_axis_format\": \".3s\", \"y_log_scale\": false, \"remote_id\": \"be4154a6-726c-4dcc-bcff-da20558aaa55\", \"datasource_name\": \"gitbase.admin admin-commit_merges-8X2HBrQre\", \"schema\": \"gitbase.admin admin-commit_merges-8X2HBrQre\", \"database_name\": \"gitbase\"}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this PR, but it came to my mind now.
@smacker is this the result of a json.dumps(params)
during export? If it is so, do you think that it could make sense to replace it with a json.dumps(params, indent=4)
where params
is an OrderedDict
? It should simplify the diff as each key would be in different rows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just edited current dashboards, but I agree with you @se7entyse7en; diffs would be better if we could have better formatted this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just edited current dashboards
Yup, I imagined that, and thanks for posting the screenshots! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a value from a database column which can be either empty string or serialized json. In theory, we can amend import/export to serialize it differently. But I wouldn't hack import/export anymore until apache/superset#7829 is merged into upstream, released and merged into our fork.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay! Thanks for the info! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so awesome @dpordomingo ✨ Thank you so much.
Eslint fails |
Now it passes again; thanks @smacker for noticing. |
This commit includes for new palettes for source{d} theme: - srcdMain, with the source{d} main colors from the branding docs. - srcdAll, with: - all colors from srcdMain - all other extra colors defined by the branding docs - one extra color from the gradients between main colors - srcdOpaques, with the six main source{d} colors. - srcdRoyal, with source{d} royal and source{d} deep royal Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
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 <David.Pordomingo.F@gmail.com>
It overrides the 'bnbColors' as defined by superset. Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
It will select 'srcdMain' palette from the 'Color Scheme' selector when creating a chart (instead of the current default: 'bnbColors') It does not change current selected 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>
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>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
|
After a call with @ricardobaeta we agree on splitting this PR in two:
This way, we could merge the first one without visual impact, and iterate later on the visual part, creating more curated palettes and documenting them properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, up to you to create new PRs or merge this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As agreed on Slack Call with @dpordomingo we're splitting this PR in two. My only request is to address just that.
Great work ✨
This PR was superseded by #257, #258 and #259 as agreed at #241 (comment) Thanks for your contributions, which let me improve the proposed change. |
This PR was superseded by #257, #258 and #259 as agreed at #241 (comment)
disclaimer: This PR applies our branding on current source{d} charts. It is done on different levels, as it can be seen in each commit. We can use this PR to discuss the process or do it in separate and sequential PRs. The proposed palettes should be approved or amended by @src-d/product
List of changes:
srcdMain
the default palette forSUPERSET_DEFAULT
(instead of the currentbnbColors
), and use it also as the default one when creating new charts.The final result can also be seen in the overview screenshot and in the collaboration screenshot.
TODO
I found some lines of code in superset still using original palettes
bnbColors
,d3Category10
andblue_white_yellow
, but since it does not have impact in our current dashboards (as far as I could validate in my tests, and can be seen in the screenshots below), I think that it could be addressed in a separate PR.Available palettes
These are the four new palettes (plus the current ones)