Conversation
Code Review Agent Run #c1a222Actionable Suggestions - 0Additional Suggestions - 4
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Sequence DiagramThis PR introduces Superset specific theme tokens for Published Draft and Physical Virtual labels. During rendering, label components now read these tokens from the active theme and fall back to existing default colors when custom values are not set. sequenceDiagram
participant Admin as Theme Author
participant Theme as Theme System
participant UI as Dashboard UI
participant Label as Label Component
Admin->>Theme: Set custom label tokens in theme config
Theme->>Theme: Register custom token names
UI->>Label: Render status or dataset label
Label->>Theme: Resolve label and icon style tokens
Theme-->>Label: Return custom values or defaults
Label-->>UI: Display styled label
Generated by CodeAnt AI |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Also as a side note i think we should move our common styling customizations to superset default theme whenever we can so that people can adjust them to their needs |
Code Review Agent Run #9150ecActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
...set-frontend/packages/superset-ui-core/src/components/Label/reusable/PublishedLabel.test.tsx
Outdated
Show resolved
Hide resolved
| function renderWithTokens( | ||
| ui: ReactElement, | ||
| tokenOverrides: Record<string, string>, | ||
| ) { | ||
| const customTheme = Theme.fromConfig({ token: tokenOverrides }); | ||
| return render(<ThemeProvider theme={customTheme.theme}>{ui}</ThemeProvider>); | ||
| } |
There was a problem hiding this comment.
There are some more of this function scattered across the repo. It might be worthwile to have a follow up for consolidating those as well. I think it's out of scope for this pr though.
|
Yes, the renderWithDefaultTheme and renderWithTokens functions in PublishedLabel.test.tsx are identical to those in DatasetTypeLabel.test.tsx. Both are new files in this PR with duplicate helper functions. superset-frontend/packages/superset-ui-core/src/components/Label/reusable/PublishedLabel.test.tsx superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.test.tsx |
|
Some notes on testing.
|
Code Review Agent Run #66c686Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
|
||
| test('uses default primary color for physical label', () => { | ||
| renderWithTheme(<DatasetTypeLabel datasetType="physical" />); | ||
| const tag = screen.getByText('Physical').closest('.ant-tag'); |
There was a problem hiding this comment.
Do you think it would be better to use a data-test instead of relying on an Ant Design class name that might change across versions?
User description
SUMMARY
Add superset specific tokens to make different labels customizable through theming.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After:

TESTING INSTRUCTIONS
Published/Draft (dashboard status):
Physical/Virtual (dataset type):
tokens should work when set through theming
ADDITIONAL INFORMATION
CodeAnt-AI Description
Add customizable theme tokens for Published/Draft and Physical/Virtual labels
What Changed
Impact
✅ Customizable label colors via theme✅ Consistent dashboard status visuals when theming✅ Fewer manual CSS overrides when applying custom themes💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.