LevisNgigi opened a new pull request, #38517: URL: https://github.com/apache/superset/pull/38517
<!--- fix(theme): ensure colorLink follows colorPrimary when not explicitly set --> ### SUMMARY This PR fixes an issue where Superset themes generated from the Ant Design Theme Builder did not correctly apply link colors when only colorPrimary was overridden. In Ant Design v5, colorLink is derived from colorInfo, not colorPrimary. When a user theme only defined colorPrimary, Superset rendered links using the base theme's default teal color instead of the intended palette. If colorPrimary is provided but colorLink is not, colorLink is derived from colorPrimary before computing Ant Design tokens. After merging the base theme and user config, if the user set colorPrimary but not colorLink, the merged colorLink is updated to match the merged colorPrimary. Explicit colorLink values provided by the user are always respected. The derivation only applies when colorLink is absent. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF BEFORE: <img width="1251" height="816" alt="Screenshot from 2026-03-09 15-56-59" src="https://github.com/user-attachments/assets/6db8ee06-450f-4678-b8c4-e5f58b725ce8" /> AFTER: <img width="1261" height="779" alt="Screenshot from 2026-03-09 15-55-22" src="https://github.com/user-attachments/assets/bcefd9a1-b0b0-4c01-bd21-335466378431" /> ### TESTING INSTRUCTIONS 1)Open the Ant Design Theme Builder. 2)Set the Primary Color to a custom color (e.g., #eb2f96). 3)Export the theme config 4)Apply this configuration as a Superset theme. 5)Navigate to pages containing links (e.g., dashboards list, charts list). Verify that: 6)Links follow the primary color palette instead of appearing teal/green. 7)Explicitly setting colorLink in the theme config still overrides the derived value. 8} If we choose to "inherit" link and info color in ant design theme builder, it should be respected. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [x ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
