diff --git a/RESOURCES/FEATURE_FLAGS.md b/RESOURCES/FEATURE_FLAGS.md index a09fb00b556bc..7064ac03ac215 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 ee9ec1fd960c3..ea89061195063 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 53a5b855bf87e..fdb4d63574788 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 3bf3c0c6e394a..8b7eed0c33fe9 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 dbd72881a706f..e46d7f9dd4e6b 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 eb44ee81c0df2..ccf11bc854734 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 f274cf31e502f..ed8d16e652355 100644 --- a/superset/config.py +++ b/superset/config.py @@ -543,7 +543,6 @@ class D3TimeFormat(TypedDict, total=False): # 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