mirror of
https://github.com/apache/superset.git
synced 2026-04-26 19:44:58 +00:00
fix: Color consistency (#17089)
* Update label colors on the fly * Clean up * Improve getFormDataWithExtraFilters * Improve code structure * Remove labelColors from formData * Exclude label_colors from URL * Refactor color scheme implementation * Clean up * Refactor and simplify * Fix lint * Remove unnecessary ColorMapControl * Lint * Give json color scheme precedence * Add label_colors prop in metadata * Separate owners and dashboard meta requests * Remove label_colors control * bump superset-ui 0.18.19 * Fix end of file * Update tests * Fix lint * Update Cypress * Update setColorScheme method * Use Antd modal body
This commit is contained in:
@@ -132,7 +132,11 @@ export function getExploreUrlFromDashboard(formData) {
|
||||
// These are present when generating explore urls from the dashboard page.
|
||||
// This should be superseded by some sort of "exploration context" system
|
||||
// where form data and other context is referenced by id.
|
||||
const trimmedFormData = omit(formData, ['dataMask', 'url_params']);
|
||||
const trimmedFormData = omit(formData, [
|
||||
'dataMask',
|
||||
'url_params',
|
||||
'label_colors',
|
||||
]);
|
||||
return getExploreLongUrl(trimmedFormData, null, false);
|
||||
}
|
||||
|
||||
@@ -169,6 +173,11 @@ export function getExploreUrl({
|
||||
if (!formData.datasource) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// label_colors should not pollute the URL
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
delete formData.label_colors;
|
||||
|
||||
let uri = getChartDataUri({ path: '/', allowDomainSharding });
|
||||
if (curUrl) {
|
||||
uri = URI(URI(curUrl).search());
|
||||
|
||||
Reference in New Issue
Block a user