Skip to content

Fixed Theme Button component’s outline variant#3738

Open
veenaypokhriyal wants to merge 1 commit intoSalesforceCommerceCloud:developfrom
veenaypokhriyal:bugfix/3637--Fixed-Theme-Button-component’s-outline-variant

Hidden character warning

The head ref may contain hidden characters: "bugfix/3637--Fixed-Theme-Button-component\u2019s-outline-variant"
Open

Fixed Theme Button component’s outline variant#3738
veenaypokhriyal wants to merge 1 commit intoSalesforceCommerceCloud:developfrom
veenaypokhriyal:bugfix/3637--Fixed-Theme-Button-component’s-outline-variant

Conversation

@veenaypokhriyal
Copy link
Copy Markdown

Description

Removed the custom variant="outline" fallback logic from the button component.
Previously, the component overrode Chakra UI’s default outline variant when no explicit variant was provided. This prevented Chakra’s built‑in colorScheme styling from being applied correctly.

Default variant is already managed in

defaultProps: {
    colorScheme: 'blue'
}

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Changes

Removed the custom outline variant fallback so Chakra UI can handle the variant and colorScheme as intended.

How to Test-Drive This PR

Render a button without specifying a colorScheme and verify that Saleforce default outline styling is applied.
Render a button with specifying a colorScheme and verify that appropriate outline styling is applied.

Confirm that buttons using explicit variants continue to behave as expected.

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@veenaypokhriyal veenaypokhriyal requested a review from a team as a code owner March 11, 2026 12:49
@salesforce-cla
Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @veenaypokhriyal to sign the Salesforce Inc. Contributor License Agreement.

@cc-prodsec
Copy link
Copy Markdown
Collaborator

cc-prodsec commented Mar 11, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@veenaypokhriyal
Copy link
Copy Markdown
Author

Kindly include this PR in PWA Kit 3.14 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants