-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support primary and accent variants for toggle and menu buttons (#1934)
## π€¨ Rationale Fixes: #1906 ## π©βπ» Implementation - The ask was for the accent appearance variant on the menu button, but because the menu button uses the toggle button internally, I added the `appearance-variant` attribute to both toggle and menu button. - I added support for both primary and accent appearance variants. - When adding the new attribute states to the toggle and menu button matrix stories, I moved some common button state arrays to a new file in `patterns/buttons/tests`. - While examining visual designs/colors, I found and fixed several issues: - The `DigitalGreenDark` token value was incorrect, based on the Figma document. I updated this value, which affected block-accent button color and the rich-text mention font color. - Anchors in active, prominent, and prominent+active states were using the wrong color tokens. - The icon color for outline-accent buttons should match the text color, but didn't. - After consulting with Brandon, he directed me to change the active/pressed colors for the block-primary and block-accent button appearances so they would be consistent with other button active/pressed colors. Previously, they were slightly darker versions of the primary and accent colors (see below). This allowed me to remove the two, now-unused tokens: `buttonFillActivePrimaryColor` and `buttonFillAccentActiveColor`. ![image](https://github.com/ni/nimble/assets/7282195/29237669-5812-44dd-a426-5388ccac7262) To avoid increasing the size of this PR, Angular/Blazor support will be added in a follow-up PR. ## π§ͺ Testing Lots of manual state styling testing in Storybook. Also Chromatic visual tests. ## β Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Milan Raj <[email protected]>
- Loading branch information
Showing
26 changed files
with
449 additions
and
449 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-components-083cf44c-68b4-43f6-b689-efd81c8228b4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "major", | ||
"comment": "Support primary and accent variants for toggle and menu buttons. BREAKING CHANGE: Removed theme-aware tokens `buttonFillActivePrimaryColor` and `buttonFillAccentActiveColor`. Use `fillSelectedColor` instead.", | ||
"packageName": "@ni/nimble-components", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-tokens-12958de0-2edc-4e06-a0ff-61431c96010a.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Fix value of DigitalGreenDark", | ||
"packageName": "@ni/nimble-tokens", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.