-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use custom states for button and anchor button variants #31718
Merged
chrisdholt
merged 10 commits into
microsoft:master
from
chrisdholt:users/chhol/update-button-and-anchor-button-custom-states
Jun 17, 2024
Merged
feat: use custom states for button and anchor button variants #31718
chrisdholt
merged 10 commits into
microsoft:master
from
chrisdholt:users/chhol/update-button-and-anchor-button-custom-states
Jun 17, 2024
Conversation
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
📊 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
chrisdholt
force-pushed
the
users/chhol/update-button-and-anchor-button-custom-states
branch
from
June 14, 2024 20:16
3e187c3
to
d8d0612
Compare
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
janechu
approved these changes
Jun 14, 2024
davatron5000
approved these changes
Jun 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
chrisdholt
force-pushed
the
users/chhol/update-button-and-anchor-button-custom-states
branch
from
June 14, 2024 20:50
69746a2
to
58f4a6a
Compare
radium-v
reviewed
Jun 14, 2024
mlijanto
reviewed
Jun 14, 2024
mlijanto
approved these changes
Jun 14, 2024
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
chrisdholt
force-pushed
the
users/chhol/update-button-and-anchor-button-custom-states
branch
5 times, most recently
from
June 17, 2024 17:38
45609f3
to
5be3b98
Compare
chrisdholt
force-pushed
the
users/chhol/update-button-and-anchor-button-custom-states
branch
from
June 17, 2024 17:47
5be3b98
to
43cf404
Compare
chrisdholt
force-pushed
the
users/chhol/update-button-and-anchor-button-custom-states
branch
from
June 17, 2024 17:57
43cf404
to
863c207
Compare
radium-v
approved these changes
Jun 17, 2024
chrisdholt
deleted the
users/chhol/update-button-and-anchor-button-custom-states
branch
June 17, 2024 18:49
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
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
primary
buttons, if states are not supported,state--primary
will 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)