Skip to content

Commit

Permalink
chore(config): remove deprecated AVOID_COLORS_COLLISION flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rusackas committed Jan 16, 2025
1 parent ab60456 commit 68e53ad
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 22 deletions.
1 change: 0 additions & 1 deletion RESOURCES/FEATURE_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -216,14 +212,6 @@ describe('CategoricalColorScale', () => {
);

getNextAvailableColorSpy.mockClear();

window.featureFlags = {
[FeatureFlag.AvoidColorsCollision]: false,
};

scale.getColor('testValue3');

expect(getNextAvailableColorSpy).not.toHaveBeenCalled();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 68e53ad

Please sign in to comment.