You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "alexandrusoare (via GitHub)" <gi...@apache.org> on 2026/03/12 14:58:24 UTC
[PR] fix(button): Theming configurations for button elements is not consistent [superset]
alexandrusoare opened a new pull request, #38604:
URL: https://github.com/apache/superset/pull/38604
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### 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:
- [ ] 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(button): Theming configurations for button elements is not consistent [superset]
Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on code in PR #38604:
URL: https://github.com/apache/superset/pull/38604#discussion_r2959031041
##########
superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx:
##########
@@ -30,6 +31,59 @@ import type {
OnClickHandler,
} from './types';
+/**
+ * Secondary Button Theming
+ *
+ * Ant Design's "filled" variant (used for secondary buttons) has no component-level
+ * tokens for customization. To enable full theming of secondary buttons, we use
+ * Superset-specific tokens (buttonSecondary*) with fallbacks to Ant Design's
+ * colorPrimary* derived tokens.
+ *
+ * Implementation approach (follows PR #38679 pattern for label tokens):
+ * - Default state: Applied via inline `style` prop (higher specificity than CSS classes)
+ * - Hover/Active states: Applied via `css` prop with !important (pseudo-selectors
+ * cannot be applied via inline styles)
+ *
+ * Available tokens (all optional, with sensible fallbacks):
+ * - buttonSecondaryColor: Text color (fallback: colorPrimary)
+ * - buttonSecondaryBg: Background color (fallback: colorPrimaryBg)
+ * - buttonSecondaryBorderColor: Border color (fallback: transparent)
+ * - buttonSecondaryHoverColor: Hover text color (fallback: colorPrimary)
+ * - buttonSecondaryHoverBg: Hover background (fallback: colorPrimaryBgHover)
+ * - buttonSecondaryHoverBorderColor: Hover border (fallback: transparent)
+ * - buttonSecondaryActiveColor: Active/pressed text color (fallback: colorPrimary)
+ * - buttonSecondaryActiveBg: Active/pressed background (fallback: colorPrimaryBorder)
+ * - buttonSecondaryActiveBorderColor: Active/pressed border (fallback: transparent)
+ */
+
+/**
+ * Generates inline styles for secondary buttons (default state).
+ * Inline styles have higher specificity than CSS classes, so no !important needed.
+ */
+export const getSecondaryButtonStyle = (theme: SupersetTheme) => ({
+ color: theme.buttonSecondaryColor ?? theme.colorPrimary,
+ backgroundColor: theme.buttonSecondaryBg ?? theme.colorPrimaryBg,
+ borderColor: theme.buttonSecondaryBorderColor ?? 'transparent',
+});
+
+/**
+ * Generates CSS styles for secondary button hover/active states.
+ * Must use CSS (not inline styles) since pseudo-selectors cannot be applied via style prop.
+ * Uses !important to override Ant Design's default styles.
+ */
+export const getSecondaryButtonHoverStyles = (theme: SupersetTheme) => ({
+ '&:hover': {
+ color: `${theme.buttonSecondaryHoverColor ?? theme.colorPrimary} !important`,
+ backgroundColor: `${theme.buttonSecondaryHoverBg ?? theme.colorPrimaryBgHover} !important`,
+ borderColor: `${theme.buttonSecondaryHoverBorderColor ?? 'transparent'} !important`,
+ },
+ '&:active': {
+ color: `${theme.buttonSecondaryActiveColor ?? theme.colorPrimary} !important`,
+ backgroundColor: `${theme.buttonSecondaryActiveBg ?? theme.colorPrimaryBorder} !important`,
+ borderColor: `${theme.buttonSecondaryActiveBorderColor ?? 'transparent'} !important`,
+ },
+});
+
Review Comment:
After a discussion i think this is fine to do to avoid !important as much as we can
--
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(button): Theming configurations for button elements is not consistent [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38604:
URL: https://github.com/apache/superset/pull/38604#issuecomment-4083498305
<!-- Bito Reply -->
The implementation uses a dual approach—inline styles for the default state (higher specificity than CSS classes) and CSS with !important for hover/active states (since pseudo-selectors can't be applied via the style prop). This follows the pattern from PR #38679 and is necessary for proper theming of secondary buttons.
--
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(button): Theming configurations for button elements is not consistent [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38604:
URL: https://github.com/apache/superset/pull/38604#issuecomment-4089693525
## **Sequence Diagram**
This PR enables full theming of secondary buttons by adding Superset specific tokens and registering them as valid theme keys. At render time, the Button component resolves these tokens with fallbacks and applies default plus hover and active styles to the Antd button.
```mermaid
sequenceDiagram
participant User
participant ThemeEditor
participant ThemeSystem
participant ButtonComponent
participant AntdButton
User->>ThemeEditor: Configure secondary button theme tokens
ThemeEditor->>ThemeSystem: Save custom tokens in theme config
ThemeSystem->>ButtonComponent: Provide resolved theme tokens
ButtonComponent->>ButtonComponent: Compute default secondary style with fallbacks
ButtonComponent->>ButtonComponent: Compute hover and active styles with fallbacks
ButtonComponent->>AntdButton: Render secondary button with inline and css styles
AntdButton-->>User: Display themed secondary button
```
---
*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(button): Theming configurations for button elements is not consistent [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #38604:
URL: https://github.com/apache/superset/pull/38604#discussion_r2959660401
##########
superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx:
##########
@@ -132,12 +193,10 @@ export function Button(props: ButtonProps) {
'& > span > :first-of-type': {
marginRight: firstChildMargin,
},
- ':not(:hover)': effectiveButtonStyle === 'secondary' &&
- !disabled && {
- // NOTE: This is the best we can do contrast wise for the secondary button using antd tokens
- // and abusing the semantics. Should be revisited when possible. https://github.com/apache/superset/pull/34253#issuecomment-3104834692
- color: `${theme.colorPrimaryTextHover} !important`,
- },
+ // Secondary button hover/active states via CSS
+ ...(effectiveButtonStyle === 'secondary' &&
+ !disabled &&
+ getSecondaryButtonHoverStyles(theme)),
}}
icon={icon}
{...restProps}
Review Comment:
**Suggestion:** The new secondary theming style is applied before `{...restProps}`, so any caller-provided `style` prop in `restProps` overwrites it entirely. This breaks the intended secondary theme tokens whenever consumers pass unrelated inline styles (for example margin), because the secondary color/background/border styles are dropped. Apply `restProps` first and then set a merged `style` object so secondary theme styles are preserved while still allowing explicit caller overrides. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Secondary token styling lost when inline style is passed.
- ⚠️ Button Storybook gallery shows incorrect secondary theming behavior.
- ⚠️ External consumers may unintentionally disable secondary theme tokens.
```
</details>
```suggestion
{...restProps}
style={
effectiveButtonStyle === 'secondary' && !disabled
? { ...getSecondaryButtonStyle(theme), ...(restProps.style ?? {}) }
: restProps.style
}
css={{
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
lineHeight: 1,
fontSize: fontSizeSM,
fontWeight: fontWeightStrong,
height,
padding: `0px ${padding}px`,
minWidth: cta ? theme.sizeUnit * 36 : undefined,
minHeight: cta ? theme.sizeUnit * 8 : undefined,
marginLeft: 0,
'& + .superset-button:not(.ant-btn-compact-item)': {
marginLeft: theme.sizeUnit * 2,
},
'& > span > :first-of-type': {
marginRight: firstChildMargin,
},
// Secondary button hover/active states via CSS
...(effectiveButtonStyle === 'secondary' &&
!disabled &&
getSecondaryButtonHoverStyles(theme)),
}}
icon={icon}
```
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Open `ButtonGallery` in
`superset-frontend/packages/superset-ui-core/src/components/Button/Button.stories.tsx:73-92`;
it iterates styles including `'secondary'` (`:33-39`) and passes `style={{ marginRight:
20, marginBottom: 10 }}` to every `<Button>` (`:79-85`).
2. This calls `Button` in
`superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx`; `style` is
part of `ButtonProps` via `Omit<AntdButtonProps, 'css'>` in `types.ts:44`, and is captured
inside `...restProps` (`index.tsx:103-117`).
3. In the render path, secondary theme inline styles are set with `style={secondaryStyle}`
(`index.tsx` PR hunk line 177), but then `{...restProps}` is applied later (`line 202`),
so `restProps.style` replaces the whole `style` prop.
4. Result: `getSecondaryButtonStyle()` output (`index.tsx:63-67`) is dropped whenever
caller supplies any inline style object; secondary token-based default colors/border are
not applied.
```
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx
**Line:** 177:202
**Comment:**
*Logic Error: The new secondary theming style is applied before `{...restProps}`, so any caller-provided `style` prop in `restProps` overwrites it entirely. This breaks the intended secondary theme tokens whenever consumers pass unrelated inline styles (for example margin), because the secondary color/background/border styles are dropped. Apply `restProps` first and then set a merged `style` object so secondary theme styles are preserved while still allowing explicit caller overrides.
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.
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F38604&comment_hash=348c6de66edbfa35eb8e022243454b88bfe3cbea69979d2a607772a627af61f7&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F38604&comment_hash=348c6de66edbfa35eb8e022243454b88bfe3cbea69979d2a607772a627af61f7&reaction=dislike'>👎</a>
--
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(button): Theming configurations for button elements is not consistent [superset]
Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on code in PR #38604:
URL: https://github.com/apache/superset/pull/38604#discussion_r2954334041
##########
superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx:
##########
@@ -30,6 +31,59 @@ import type {
OnClickHandler,
} from './types';
+/**
+ * Secondary Button Theming
+ *
+ * Ant Design's "filled" variant (used for secondary buttons) has no component-level
+ * tokens for customization. To enable full theming of secondary buttons, we use
+ * Superset-specific tokens (buttonSecondary*) with fallbacks to Ant Design's
+ * colorPrimary* derived tokens.
+ *
+ * Implementation approach (follows PR #38679 pattern for label tokens):
+ * - Default state: Applied via inline `style` prop (higher specificity than CSS classes)
+ * - Hover/Active states: Applied via `css` prop with !important (pseudo-selectors
+ * cannot be applied via inline styles)
+ *
+ * Available tokens (all optional, with sensible fallbacks):
+ * - buttonSecondaryColor: Text color (fallback: colorPrimary)
+ * - buttonSecondaryBg: Background color (fallback: colorPrimaryBg)
+ * - buttonSecondaryBorderColor: Border color (fallback: transparent)
+ * - buttonSecondaryHoverColor: Hover text color (fallback: colorPrimary)
+ * - buttonSecondaryHoverBg: Hover background (fallback: colorPrimaryBgHover)
+ * - buttonSecondaryHoverBorderColor: Hover border (fallback: transparent)
+ * - buttonSecondaryActiveColor: Active/pressed text color (fallback: colorPrimary)
+ * - buttonSecondaryActiveBg: Active/pressed background (fallback: colorPrimaryBorder)
+ * - buttonSecondaryActiveBorderColor: Active/pressed border (fallback: transparent)
+ */
+
+/**
+ * Generates inline styles for secondary buttons (default state).
+ * Inline styles have higher specificity than CSS classes, so no !important needed.
+ */
+export const getSecondaryButtonStyle = (theme: SupersetTheme) => ({
+ color: theme.buttonSecondaryColor ?? theme.colorPrimary,
+ backgroundColor: theme.buttonSecondaryBg ?? theme.colorPrimaryBg,
+ borderColor: theme.buttonSecondaryBorderColor ?? 'transparent',
+});
+
+/**
+ * Generates CSS styles for secondary button hover/active states.
+ * Must use CSS (not inline styles) since pseudo-selectors cannot be applied via style prop.
+ * Uses !important to override Ant Design's default styles.
+ */
+export const getSecondaryButtonHoverStyles = (theme: SupersetTheme) => ({
+ '&:hover': {
+ color: `${theme.buttonSecondaryHoverColor ?? theme.colorPrimary} !important`,
+ backgroundColor: `${theme.buttonSecondaryHoverBg ?? theme.colorPrimaryBgHover} !important`,
+ borderColor: `${theme.buttonSecondaryHoverBorderColor ?? 'transparent'} !important`,
+ },
+ '&:active': {
+ color: `${theme.buttonSecondaryActiveColor ?? theme.colorPrimary} !important`,
+ backgroundColor: `${theme.buttonSecondaryActiveBg ?? theme.colorPrimaryBorder} !important`,
+ borderColor: `${theme.buttonSecondaryActiveBorderColor ?? 'transparent'} !important`,
+ },
+});
+
Review Comment:
Should we just go with one approach here? Looks good to me otherwise
--
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(button): Theming configurations for button elements is not consistent [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38604:
URL: https://github.com/apache/superset/pull/38604#issuecomment-4047432682
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(button): Theming configurations for button elements is not consistent [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #38604:
URL: https://github.com/apache/superset/pull/38604#issuecomment-4047474022
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | f10b6cd03dc38f4d72791b4478d1bcb91e51b63d |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/69b2d491088c1c000786ea90 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-38604--superset-docs-preview.netlify.app](https://deploy-preview-38604--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-38604--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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(button): Theming configurations for button elements is not consistent [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38604:
URL: https://github.com/apache/superset/pull/38604#issuecomment-4090048946
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(button): Theming configurations for button elements is not consistent [superset]
Posted by "EnxDev (via GitHub)" <gi...@apache.org>.
EnxDev commented on code in PR #38604:
URL: https://github.com/apache/superset/pull/38604#discussion_r2958953932
##########
superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx:
##########
@@ -30,6 +31,59 @@ import type {
OnClickHandler,
} from './types';
+/**
+ * Secondary Button Theming
+ *
+ * Ant Design's "filled" variant (used for secondary buttons) has no component-level
+ * tokens for customization. To enable full theming of secondary buttons, we use
+ * Superset-specific tokens (buttonSecondary*) with fallbacks to Ant Design's
+ * colorPrimary* derived tokens.
+ *
+ * Implementation approach (follows PR #38679 pattern for label tokens):
+ * - Default state: Applied via inline `style` prop (higher specificity than CSS classes)
+ * - Hover/Active states: Applied via `css` prop with !important (pseudo-selectors
+ * cannot be applied via inline styles)
+ *
+ * Available tokens (all optional, with sensible fallbacks):
+ * - buttonSecondaryColor: Text color (fallback: colorPrimary)
+ * - buttonSecondaryBg: Background color (fallback: colorPrimaryBg)
+ * - buttonSecondaryBorderColor: Border color (fallback: transparent)
+ * - buttonSecondaryHoverColor: Hover text color (fallback: colorPrimary)
+ * - buttonSecondaryHoverBg: Hover background (fallback: colorPrimaryBgHover)
+ * - buttonSecondaryHoverBorderColor: Hover border (fallback: transparent)
+ * - buttonSecondaryActiveColor: Active/pressed text color (fallback: colorPrimary)
+ * - buttonSecondaryActiveBg: Active/pressed background (fallback: colorPrimaryBorder)
+ * - buttonSecondaryActiveBorderColor: Active/pressed border (fallback: transparent)
+ */
+
+/**
+ * Generates inline styles for secondary buttons (default state).
+ * Inline styles have higher specificity than CSS classes, so no !important needed.
+ */
+export const getSecondaryButtonStyle = (theme: SupersetTheme) => ({
+ color: theme.buttonSecondaryColor ?? theme.colorPrimary,
+ backgroundColor: theme.buttonSecondaryBg ?? theme.colorPrimaryBg,
+ borderColor: theme.buttonSecondaryBorderColor ?? 'transparent',
+});
Review Comment:
Just to confirm, are we assuming that passing an empty token here is acceptable?
--
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(button): Theming configurations for button elements is not consistent [superset]
Posted by "alexandrusoare (via GitHub)" <gi...@apache.org>.
alexandrusoare merged PR #38604:
URL: https://github.com/apache/superset/pull/38604
--
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