feat: use custom states for button and anchor button variants#31718
Merged
chrisdholt merged 10 commits intomicrosoft:masterfrom Jun 17, 2024
Merged
Conversation
Collaborator
📊 Bundle size report✅ No changes found |
fabricteam
reviewed
Jun 14, 2024
change/@fluentui-web-components-8fa1a0aa-7dd4-4129-89c3-fe350ad0fa58.json
Show resolved
Hide resolved
chrisdholt
commented
Jun 14, 2024
3e187c3 to
d8d0612
Compare
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
janechu
approved these changes
Jun 14, 2024
davatron5000
approved these changes
Jun 14, 2024
Contributor
davatron5000
left a comment
There was a problem hiding this comment.
LGTM, few questions but nothing blocking. Would probably like @radium-v's POV since he worked on buttons last and has done more element internals work than me.
69746a2 to
58f4a6a
Compare
radium-v
reviewed
Jun 14, 2024
mlijanto
reviewed
Jun 14, 2024
mlijanto
approved these changes
Jun 14, 2024
Contributor
Member
Author
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
45609f3 to
5be3b98
Compare
5be3b98 to
43cf404
Compare
43cf404 to
863c207
Compare
radium-v
approved these changes
Jun 17, 2024
EdDaWord
pushed a commit
to EdDaWord/fluentui
that referenced
this pull request
Jun 17, 2024
EdDaWord
pushed a commit
to EdDaWord/fluentui
that referenced
this pull request
Aug 14, 2024
chore(motion): add bundle size fixtures (microsoft#31730) fix(react-calendar-compat): fixed focus indicator cut off (microsoft#31596) feat: use custom states for button and anchor button variants (microsoft#31718) docs: add min-width styles to Table and DataGrid stories, add best practices (microsoft#31721) fix:react-nav-preview: High contrast issues (microsoft#31704) Pretty & lint & yarn change Somehow missed change files Fix one of the tests Fix React-text test Use hashed name for each semantic and control token
EdDaWord
pushed a commit
to EdDaWord/fluentui
that referenced
this pull request
Aug 14, 2024
chore(motion): add bundle size fixtures (microsoft#31730) fix(react-calendar-compat): fixed focus indicator cut off (microsoft#31596) feat: use custom states for button and anchor button variants (microsoft#31718) docs: add min-width styles to Table and DataGrid stories, add best practices (microsoft#31721) fix:react-nav-preview: High contrast issues (microsoft#31704) Pretty & lint & yarn change Somehow missed change files Fix one of the tests Fix React-text test Use hashed name for each semantic and control token
EdDaWord
pushed a commit
to EdDaWord/fluentui
that referenced
this pull request
Aug 16, 2024
EdDaWord
added a commit
that referenced
this pull request
Aug 19, 2024
Change most tokens in useButtonStyles file Give all the react-components a try chore(motion): add bundle size fixtures (#31730) fix(react-calendar-compat): fixed focus indicator cut off (#31596) feat: use custom states for button and anchor button variants (#31718) feat: update badge to use custom states (#31733) fix: Teaching bubble carousel tabs are visible in windows high contrast (#31734) fix:react-nav-preview: High contrast issues (#31704) Pretty & lint & yarn change Somehow missed change files Fix one of the tests Fix React-text test
EdDaWord
added a commit
that referenced
this pull request
Aug 19, 2024
Change most tokens in useButtonStyles file Give all the react-components a try fix: Teaching bubble carousel tabs are visible in windows high contrast (#31734) fix:react-nav-preview: High contrast issues (#31704) chore(motion): add bundle size fixtures (#31730) fix(react-calendar-compat): fixed focus indicator cut off (#31596) feat: use custom states for button and anchor button variants (#31718) docs: add min-width styles to Table and DataGrid stories, add best practices (#31721) fix:react-nav-preview: High contrast issues (#31704) Pretty & lint & yarn change Somehow missed change files Fix one of the tests Fix React-text test Use hashed name for each semantic and control token Build missed one Fix small mistake Fix small mistake Fix small mistake
EdDaWord
added a commit
that referenced
this pull request
Aug 19, 2024
Change most tokens in useButtonStyles file Give all the react-components a try fix: Teaching bubble carousel tabs are visible in windows high contrast (#31734) fix:react-nav-preview: High contrast issues (#31704) chore(motion): add bundle size fixtures (#31730) fix(react-calendar-compat): fixed focus indicator cut off (#31596) feat: use custom states for button and anchor button variants (#31718) docs: add min-width styles to Table and DataGrid stories, add best practices (#31721) fix:react-nav-preview: High contrast issues (#31704) Pretty & lint & yarn change Somehow missed change files Fix one of the tests Fix React-text test Use hashed name for each semantic and control token Build missed one Fix small mistake Fix small mistake Fix small mistake Fix Random YML File
EdDaWord
added a commit
that referenced
this pull request
Aug 20, 2024
Change most tokens in useButtonStyles file Give all the react-components a try fix: Teaching bubble carousel tabs are visible in windows high contrast (#31734) fix:react-nav-preview: High contrast issues (#31704) chore(motion): add bundle size fixtures (#31730) fix(react-calendar-compat): fixed focus indicator cut off (#31596) feat: use custom states for button and anchor button variants (#31718) docs: add min-width styles to Table and DataGrid stories, add best practices (#31721) fix:react-nav-preview: High contrast issues (#31704) Pretty & lint & yarn change Somehow missed change files Fix one of the tests Fix React-text test Use hashed name for each semantic and control token Build missed one Fix small mistake Fix small mistake Fix small mistake Fix Random YML File Fix rebase mistake
EdDaWord
added a commit
that referenced
this pull request
Aug 23, 2024
Change most tokens in useButtonStyles file Give all the react-components a try fix: Teaching bubble carousel tabs are visible in windows high contrast (#31734) fix:react-nav-preview: High contrast issues (#31704) chore(motion): add bundle size fixtures (#31730) fix(react-calendar-compat): fixed focus indicator cut off (#31596) feat: use custom states for button and anchor button variants (#31718) docs: add min-width styles to Table and DataGrid stories, add best practices (#31721) fix:react-nav-preview: High contrast issues (#31704) Pretty & lint & yarn change Somehow missed change files Fix one of the tests Fix React-text test Use hashed name for each semantic and control token Build missed one Fix small mistake Fix small mistake Fix small mistake Fix Random YML File Fix rebase mistake Fix mistake on number of quotes Fix any possible merge conflicts
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Previous Behavior
All styling hooked off attribute selectors.
New Behavior
All variants now get set using custom states via ElementInternals. In the case that states are not supported, an attribute with will be added to manage those scenario. So, for
primarybuttons, if states are not supported,state--primarywill be added.This gives long term benefits of being able to quickly remove the attribute fallback as custom state support grows in our matrix. It also has performance parity overall when including the attributes, making way for performance wins once that can be removed.
Related Issue(s)