codeant-ai-for-open-source[bot] commented on code in PR #40985:
URL: https://github.com/apache/superset/pull/40985#discussion_r3417428981
##########
superset-frontend/packages/superset-core/src/theme/types.ts:
##########
@@ -237,6 +237,23 @@ export interface SupersetSpecificTokens {
* Fallback: transparent
*/
buttonSecondaryActiveBorderColor?: string;
+
+ // Component flexibility tokens (sizing, radius, behavior)
+ selectOptionActiveOutline?: boolean;
+ labelBorderRadius?: number;
+ buttonControlHeight?: number;
+ buttonControlHeightSM?: number;
+ buttonControlHeightXS?: number;
+ buttonPaddingInline?: number;
+ buttonPaddingInlineSM?: number;
+ buttonFontSize?: number;
+ buttonBorderRadius?: number;
+
+ // Dashboard tile tokens (opt-in, defaults to transparent/no border/shadow)
+ dashboardTileBg?: string;
+ dashboardTileBorder?: string;
+ dashboardTileBorderRadius?: number;
+ dashboardTileBoxShadow?: string;
Review Comment:
**🟠Architect Review — HIGH**
Newly added Superset-specific tokens (e.g., selectOptionActiveOutline,
labelBorderRadius, buttonControlHeight*, dashboardTile*) are declared in
SupersetSpecificTokens but not added to the SUPERSET_CUSTOM_TOKENS registry
used by theme validation, so using them in UI theme configs causes them to be
flagged as "unknown" tokens.
**Suggestion:** Add the new token names to SUPERSET_CUSTOM_TOKENS in
superset-frontend/src/theme/utils/antdTokenNames.ts and extend the associated
tests, so isValidTokenName recognizes these tokens as first-class Superset
custom tokens in theme editing flows.
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=47fbc546568e495aaf9db0ee8c240dfe&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=47fbc546568e495aaf9db0ee8c240dfe&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is an **Architect / Logical Review** comment left during a code review.
These reviews are first-class, important findings — not optional suggestions.
Do NOT dismiss this as a 'big architectural change' just because the title says
architect review; most of these can be resolved with a small, localized fix
once the intent is understood.
**Path:** superset-frontend/packages/superset-core/src/theme/types.ts
**Line:** 241:256
**Comment:**
*HIGH: Newly added Superset-specific tokens (e.g.,
selectOptionActiveOutline, labelBorderRadius, buttonControlHeight*,
dashboardTile*) are declared in SupersetSpecificTokens but not added to the
SUPERSET_CUSTOM_TOKENS registry used by theme validation, so using them in UI
theme configs causes them to be flagged as "unknown" tokens.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative
instruction. If no explicit code suggestion is given, you MUST still draft and
apply your own minimal, localized fix — do not punt back with 'no suggestion
provided, review manually'. Keep the change as small as possible: add a guard
clause, gate on a loading state, reorder an await, wrap in a conditional, etc.
Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
##########
superset-frontend/packages/superset-ui-core/src/components/DropdownButton/index.tsx:
##########
@@ -57,10 +58,10 @@ export const DropdownButton = ({
defaultBtnCss,
css`
.ant-btn {
- height: 30px;
- box-shadow: none;
- font-size: ${theme.fontSizeSM}px;
- font-weight: ${theme.fontWeightStrong};
+ height: ${styleConfig?.controlHeight ?? 30}px;
+ box-shadow: ${styleConfig?.boxShadow ?? 'none'};
+ font-size: ${styleConfig?.fontSize ?? theme.fontSizeSM}px;
+ font-weight: ${styleConfig?.fontWeight ?? theme.fontWeightStrong};
Review Comment:
**🟠Architect Review — HIGH**
DropdownButton ignores the new global button sizing tokens and instead
hardcodes/falls back to local values (height 30px, font size theme.fontSizeSM),
so theme-level button tokens (e.g., buttonControlHeight, buttonFontSize) do not
affect this component while they do affect Button.
**Suggestion:** Resolve DropdownButton defaults from the same token set used
by Button (buttonControlHeight, buttonFontSize, buttonBorderRadius, and related
spacing tokens) and layer the styleConfig prop on top as a per-instance
override, so global theming and per-instance customization behave consistently
across Button and DropdownButton.
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=d402a30a485b41c1acf133c9d2413a42&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=d402a30a485b41c1acf133c9d2413a42&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is an **Architect / Logical Review** comment left during a code review.
These reviews are first-class, important findings — not optional suggestions.
Do NOT dismiss this as a 'big architectural change' just because the title says
architect review; most of these can be resolved with a small, localized fix
once the intent is understood.
**Path:**
superset-frontend/packages/superset-ui-core/src/components/DropdownButton/index.tsx
**Line:** 61:64
**Comment:**
*HIGH: DropdownButton ignores the new global button sizing tokens and
instead hardcodes/falls back to local values (height 30px, font size
theme.fontSizeSM), so theme-level button tokens (e.g., buttonControlHeight,
buttonFontSize) do not affect this component while they do affect Button.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative
instruction. If no explicit code suggestion is given, you MUST still draft and
apply your own minimal, localized fix — do not punt back with 'no suggestion
provided, review manually'. Keep the change as small as possible: add a guard
clause, gate on a loading state, reorder an await, wrap in a conditional, etc.
Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</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: [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]