You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "LevisNgigi (via GitHub)" <gi...@apache.org> on 2026/03/09 13:01:06 UTC
[PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38517:
URL: https://github.com/apache/superset/pull/38517#issuecomment-4023595089
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38517:
URL: https://github.com/apache/superset/pull/38517#issuecomment-4036955214
## **Sequence Diagram**
This PR updates theme configuration so that when a theme overrides the primary color without explicitly setting a link color, the link color is derived from the primary color both during initial theme creation and later configuration updates.
```mermaid
sequenceDiagram
participant Caller
participant Theme
participant AntDesign
Caller->>Theme: fromConfig(user theme, base theme)
Theme->>Theme: Merge base and user themes
Theme->>Theme: If primary set and link missing, set link to primary
Theme-->>Caller: Return Theme instance with updated tokens
Caller->>Theme: setConfig(new theme config)
Theme->>Theme: Normalize config and default link from primary if missing
Theme->>AntDesign: Compute design tokens
AntDesign-->>Theme: Return computed tokens
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38517:
URL: https://github.com/apache/superset/pull/38517#issuecomment-4029664831
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "LevisNgigi (via GitHub)" <gi...@apache.org>.
LevisNgigi closed pull request #38517: fix(theme): ensure colorLink follows colorPrimary when not explicitly set
URL: https://github.com/apache/superset/pull/38517
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38517:
URL: https://github.com/apache/superset/pull/38517#issuecomment-4032862502
## **Sequence Diagram**
This PR updates theme creation and configuration so that when a user sets a primary color but does not set a link color, the link color is derived from the primary color before Ant Design tokens are computed, while still respecting any explicit link color overrides.
```mermaid
sequenceDiagram
participant Caller
participant Theme
participant AntdTokens
participant UI
Caller->>Theme: Create or update theme with user and base config
Theme->>Theme: Merge base and user config
Theme->>Theme: If primary set and link missing, set link to primary
Theme->>AntdTokens: Compute Ant Design tokens from updated config
AntdTokens-->>Theme: Return design tokens including link color
Theme-->>UI: Provide theme where links follow primary color
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38517:
URL: https://github.com/apache/superset/pull/38517#issuecomment-4045696210
## **Sequence Diagram**
This PR ensures link color follows the primary color when users override only primary color in theme config. It applies the same derivation during both theme creation and runtime theme updates, while preserving explicitly provided link colors.
```mermaid
sequenceDiagram
participant UI
participant Theme
participant AntDesign
UI->>Theme: Apply theme config via fromConfig or setConfig
Theme->>Theme: Normalize config and merge with base theme when provided
alt Primary set and link not set
Theme->>Theme: Set link color equal to primary color
else Link explicitly set
Theme->>Theme: Keep explicit link color
end
Theme->>AntDesign: Compute design tokens from final config
AntDesign-->>Theme: Return tokens with final link color
Theme-->>UI: Return updated Superset theme
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "LevisNgigi (via GitHub)" <gi...@apache.org>.
LevisNgigi closed pull request #38517: fix(theme): ensure colorLink follows colorPrimary when not explicitly set
URL: https://github.com/apache/superset/pull/38517
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38517:
URL: https://github.com/apache/superset/pull/38517#issuecomment-4024052645
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "michaelmorera-preset (via GitHub)" <gi...@apache.org>.
michaelmorera-preset commented on PR #38517:
URL: https://github.com/apache/superset/pull/38517#issuecomment-4088648557
The testing for this ticket was completed. The application is working as expected. Ant design is working correctly when the user uses the primary color changed.
Scenario
Verify that all links follow the primary color palette instead of appearing teal/green. (default)
## Steps
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).
## Expected
- Links follow the primary color palette instead of appearing teal/green. :white_check_mark:
- Explicitly setting colorLink in the theme config still overrides the derived value. :white_check_mark:
- If we choose to "inherit" link and info color in ant design theme builder, it should be respected. :white_check_mark:
## Ant Design JSON - Just Primary
> {
> "token": {
> "colorPrimary": "#eb2f96"
> },
> "algorithm": "default"
> }
## Ant Design JSON - Color Link
> {
> "token":{
> "colorPrimary": "#ec4899",
> "colorLink": "#ff0000"
> }
> }
## Evidence
Ant design primary color testing
<img width="1913" height="1003" alt="Ant design primary color testing" src="https://github.com/user-attachments/assets/27474738-c94a-4559-9394-20e404169db5" />
Color link theme testing
<img width="1913" height="1003" alt="Color Link Theme testing" src="https://github.com/user-attachments/assets/7b8cb55f-0e5b-4a49-8f8f-43e8b3789ed4" />
Ant design theme editor testing primary color

--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "LevisNgigi (via GitHub)" <gi...@apache.org>.
LevisNgigi closed pull request #38517: fix(theme): ensure colorLink follows colorPrimary when not explicitly set
URL: https://github.com/apache/superset/pull/38517
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe merged PR #38517:
URL: https://github.com/apache/superset/pull/38517
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(theme): ensure colorLink follows colorPrimary when not explicitly set [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38517:
URL: https://github.com/apache/superset/pull/38517#issuecomment-4044376823
## **Sequence Diagram**
This PR updates theme application so link color is automatically aligned with primary color when users override primary color but do not provide link color. It preserves explicit link color overrides while ensuring merged and runtime theme updates produce consistent link styling.
```mermaid
sequenceDiagram
participant User
participant Theme
participant BaseTheme
participant AntdTokens
participant UI
User->>Theme: Apply theme config
Theme->>BaseTheme: Merge user config with base theme
alt colorPrimary set and colorLink missing
Theme->>Theme: Set colorLink to merged colorPrimary
else colorLink explicitly set
Theme->>Theme: Keep provided colorLink
end
Theme->>AntdTokens: Compute resolved design tokens
AntdTokens-->>Theme: Return final token values
Theme-->>UI: Render links using resolved colorLink
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org