-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(react-aria): creates ARIAButtonComponent type #24893
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
Closed
bsunderhus
wants to merge
2
commits into
microsoft:master
from
bsunderhus:feat--creates-ARIAButtonComponent-notion
Closed
feat(react-aria): creates ARIAButtonComponent type #24893
bsunderhus
wants to merge
2
commits into
microsoft:master
from
bsunderhus:feat--creates-ARIAButtonComponent-notion
Conversation
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
Collaborator
📊 Bundle size reportUnchanged fixtures
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit bf82641:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 92bc886e6e3e5ec43847752941456666eb69d32b (build) |
4bb4999 to
bf1ad5e
Compare
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1333 | 1342 | 5000 | |
| Button | mount | 953 | 965 | 5000 | |
| FluentProvider | mount | 1577 | 1582 | 5000 | |
| FluentProviderWithTheme | mount | 631 | 647 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 591 | 601 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 635 | 635 | 10 | |
| MakeStyles | mount | 1901 | 1923 | 50000 | |
| SpinButton | mount | 2550 | 2544 | 5000 |
bf1ad5e to
19ffe6c
Compare
Contributor
Author
|
Blocked by #24960 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.

Current Behavior
At the moment main usages for
ARIAButtonare:Buttoncomponent itselfAccordionHeaderbutton slotPopoverTrigger,MenuTrigger,DialogTrigger)When those usages are combined (which is the case for Triggers +
Buttonnormally), it means that multiple invocations ofuseARIAButtonPropshook will be provided (one from the Button itself, and one from the trigger that encapsulates theButton)New Behavior
Inspired on
FluentTriggerComponentfluentui/packages/react-components/react-utilities/src/trigger/types.ts
Lines 15 to 17 in 92bc886
This PR Provides proper flag mechanism to ensure that
useARIAButtonPropsdoesn't need to add more handlers on elements that already handle button properties correctly by adding proper typeARIAButtonComponent.Main usage for this will be to ensure that a given component already implements all the proper behaviours of an
ARIAButton, this follows the same idea provided on Trigger components, here'sMenuTriggeras an example:fluentui/packages/react-components/react-menu/src/components/MenuTrigger/MenuTrigger.tsx
Lines 7 to 18 in 92bc886
This
isFluentTriggerComponent = trueindicates to other triggers that that specific element is a trigger and can be properly concatenated, allowing the usage of multiple trigger in a single child without causing conflict.Following this approach
Buttonwill be like: