This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch remove-AVOID_COLORS_COLLISION-flag
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to
refs/heads/remove-AVOID_COLORS_COLLISION-flag by this push:
new 68e53ad1d4 chore(config): remove deprecated AVOID_COLORS_COLLISION flag
68e53ad1d4 is described below
commit 68e53ad1d46ca941f7ba1554da67ddd02089cb4b
Author: Evan Rusackas <[email protected]>
AuthorDate: Thu Jan 16 11:54:54 2025 -0700
chore(config): remove deprecated AVOID_COLORS_COLLISION flag
---
RESOURCES/FEATURE_FLAGS.md | 1 -
UPDATING.md | 1 +
.../superset-ui-core/src/color/CategoricalColorScale.ts | 6 +-----
.../packages/superset-ui-core/src/utils/featureFlags.ts | 1 -
.../test/color/CategoricalColorScale.test.ts | 14 +-------------
.../dashboard/components/menu/BackgroundStyleDropdown.tsx | 6 +++++-
superset/config.py | 1 -
7 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/RESOURCES/FEATURE_FLAGS.md b/RESOURCES/FEATURE_FLAGS.md
index a09fb00b55..7064ac03ac 100644
--- a/RESOURCES/FEATURE_FLAGS.md
+++ b/RESOURCES/FEATURE_FLAGS.md
@@ -96,7 +96,6 @@ These features flags currently default to True and **will be
removed in a future
[//]: # "PLEASE KEEP THE LIST SORTED ALPHABETICALLY"
-- AVOID_COLORS_COLLISION
- DASHBOARD_CROSS_FILTERS
- DRILL_TO_DETAIL
- ENABLE_JAVASCRIPT_CONTROLS
diff --git a/UPDATING.md b/UPDATING.md
index ee9ec1fd96..ea89061195 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -23,6 +23,7 @@ This file documents any backwards-incompatible changes in
Superset and
assists people when migrating to a new version.
## Next
+- [X](x): The `AVOID_COLORS_COLLISION` flag (previously deprecated) has been
removed, and this is now the default behavior.
- [31774](https://github.com/apache/superset/pull/31774): Fixes the spelling
of the `USE-ANALAGOUS-COLORS` feature flag. Please update any
scripts/configuration item to use the new/corrected `USE-ANALOGOUS-COLORS` flag
spelling.
- [31582](https://github.com/apache/superset/pull/31582) Removed the legacy
Area, Bar, Event Flow, Heatmap, Histogram, Line, Sankey, and Sankey Loop
charts. They were all automatically migrated to their ECharts counterparts with
the exception of the Event Flow and Sankey Loop charts which were removed as
they were not actively maintained and not widely used. If you were using the
Event Flow or Sankey Loop charts, you will need to find an alternative solution.
- [31198](https://github.com/apache/superset/pull/31198) Disallows by default
the use of the following ClickHouse functions: "version", "currentDatabase",
"hostName".
diff --git
a/superset-frontend/packages/superset-ui-core/src/color/CategoricalColorScale.ts
b/superset-frontend/packages/superset-ui-core/src/color/CategoricalColorScale.ts
index 53a5b855bf..fdb4d63574 100644
---
a/superset-frontend/packages/superset-ui-core/src/color/CategoricalColorScale.ts
+++
b/superset-frontend/packages/superset-ui-core/src/color/CategoricalColorScale.ts
@@ -142,11 +142,7 @@ class CategoricalColorScale extends ExtensibleFunction {
if (isFeatureEnabled(FeatureFlag.UseAnalogousColors)) {
this.incrementColorRange();
}
- if (
- // feature flag to be deprecated (will become standard behaviour)
- isFeatureEnabled(FeatureFlag.AvoidColorsCollision) &&
- this.isColorUsed(color)
- ) {
+ if (this.isColorUsed(color)) {
// fallback to least used color
color = this.getNextAvailableColor(cleanedValue, color);
}
diff --git
a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
index 3bf3c0c6e3..8b7eed0c33 100644
--- a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
+++ b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
@@ -27,7 +27,6 @@ export enum FeatureFlag {
AlertReportTabs = 'ALERT_REPORT_TABS',
AlertReportSlackV2 = 'ALERT_REPORT_SLACK_V2',
AllowFullCsvExport = 'ALLOW_FULL_CSV_EXPORT',
- AvoidColorsCollision = 'AVOID_COLORS_COLLISION',
ChartPluginsExperimental = 'CHART_PLUGINS_EXPERIMENTAL',
ConfirmDashboardDiff = 'CONFIRM_DASHBOARD_DIFF',
/** @deprecated */
diff --git
a/superset-frontend/packages/superset-ui-core/test/color/CategoricalColorScale.test.ts
b/superset-frontend/packages/superset-ui-core/test/color/CategoricalColorScale.test.ts
index dbd72881a7..e46d7f9dd4 100644
---
a/superset-frontend/packages/superset-ui-core/test/color/CategoricalColorScale.test.ts
+++
b/superset-frontend/packages/superset-ui-core/test/color/CategoricalColorScale.test.ts
@@ -199,11 +199,7 @@ describe('CategoricalColorScale', () => {
const returnedColor = scale.getColor(value, sliceId);
expect(returnedColor).toBe(expectedColor);
});
- it('conditionally calls getNextAvailableColor', () => {
- window.featureFlags = {
- [FeatureFlag.AvoidColorsCollision]: true,
- };
-
+ it('calls getNextAvailableColor', () => {
scale.getColor('testValue1');
scale.getColor('testValue2');
scale.getColor('testValue1');
@@ -216,14 +212,6 @@ describe('CategoricalColorScale', () => {
);
getNextAvailableColorSpy.mockClear();
-
- window.featureFlags = {
- [FeatureFlag.AvoidColorsCollision]: false,
- };
-
- scale.getColor('testValue3');
-
- expect(getNextAvailableColorSpy).not.toHaveBeenCalled();
});
});
diff --git
a/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx
b/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx
index eb44ee81c0..ccf11bc854 100644
---
a/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx
+++
b/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx
@@ -62,7 +62,11 @@ const BackgroundStyleOption = styled.div`
${theme.colors.text.label} 25%,
transparent 25%
),
- linear-gradient(-45deg, ${theme.colors.text.label} 25%, transparent
25%),
+ linear-gradient(
+ -45deg,
+ ${theme.colors.text.label} 25%,
+ transparent 25%
+ ),
linear-gradient(45deg, transparent 75%, ${theme.colors.text.label}
75%),
linear-gradient(-45deg, transparent 75%, ${theme.colors.text.label}
75%);
background-size: ${theme.gridUnit * 2}px ${theme.gridUnit * 2}px;
diff --git a/superset/config.py b/superset/config.py
index f274cf31e5..ed8d16e652 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -543,7 +543,6 @@ DEFAULT_FEATURE_FLAGS: dict[str, bool] = {
# Users must check whether the DB engine supports SSH Tunnels
# otherwise enabling this flag won't have any effect on the DB.
"SSH_TUNNELING": False,
- "AVOID_COLORS_COLLISION": True,
# Do not show user info in the menu
"MENU_HIDE_USER_INFO": False,
# Allows users to add a ``superset://`` DB that can query across
databases. This is