rusackas opened a new pull request, #41800:
URL: https://github.com/apache/superset/pull/41800

   ### SUMMARY
   
   Removes the deprecated `AVOID_COLORS_COLLISION` feature flag. It has 
defaulted to `True` (marked `@lifecycle: deprecated` in `config.py`), so the 
color-collision avoidance in `CategoricalColorScale` is now permanently enabled 
— same pattern as the `GENERIC_CHART_AXES` / `DASHBOARD_NATIVE_FILTERS` 
removals.
   
   Scrapped from:
   - `superset/config.py` (deprecated section) — 
`docs/static/feature-flags.json` regenerated via 
`scripts/extract_feature_flags.py`
   - `tests/integration_tests/superset_test_config.py` override
   - the frontend `FeatureFlag` enum
   - both gated branches in `CategoricalColorScale.getColor` (new-label 
collision fallback, and dashboard-sourced collision reassignment)
   
   **Test changes worth a look:**
   - The flag-off cases are gone: the "reproduces the bug without the fix" test 
(asserting two labels *could* share a color) is removed since that behavior no 
longer exists, and the "conditionally calls getNextAvailableColor" test is 
rewritten to pin the always-on behavior.
   - Two `getNextAvailableColor` tests now seed usage counts directly on 
`chartLabelsColorMap` instead of via `getColor` — with avoidance always on, 
`getColor` redistributes collisions during setup, which silently changed the 
usage counts those tests assumed.
   - The suite's `beforeEach` now resets the labels-color-map singleton (map + 
`source`) — one test's `finally` was leaking `source = Dashboard` into 
unrelated tests, a latent hygiene bug the flag-off default previously masked.
   - The color-recycling test asserts palette-bounded, all-colors-used 
distribution rather than a uniform 2/2/2 split, since avoidance intentionally 
redistributes recycled colors.
   
   Full `packages/superset-ui-core/test/color` suite: 122 tests pass. 
UPDATING.md entry added.
   
   Closes https://github.com/apache/superset/issues/41044
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — default behavior (flag on) is unchanged; only the ability to opt out 
is removed.
   
   ### TESTING INSTRUCTIONS
   
   - `npx jest packages/superset-ui-core/test/color` — 122 tests pass.
   - `grep -rn AVOID_COLORS_COLLISION` across `superset/`, 
`superset-frontend/`, `tests/`, `docs/static/` returns nothing.
   - Deployments that explicitly set `AVOID_COLORS_COLLISION: False` will see 
collision avoidance re-enabled (see UPDATING.md).
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: Closes 
https://github.com/apache/superset/issues/41044
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
   - [ ] Introduces new feature or API
   - [x] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to