Skip to content
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

fix(useOnClickOutside): use conditional handler window event #18323

Merged
merged 4 commits into from
May 25, 2021

Conversation

ling1726
Copy link
Member

Workaround already used by v0 to handle facebook/react#20074

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ yarn change

Description of changes

(give an overview)

Focus areas to test

(optional)

@ling1726 ling1726 requested a review from layershifter May 25, 2021 13:48
@size-auditor
Copy link

size-auditor bot commented May 25, 2021

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-components-Menu 100.335 kB 100.703 kB ExceedsBaseline     368 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 1cfbb7aa8acd04ebc7b924740ed98b9b02465916 (build)

@codesandbox-ci
Copy link

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 4ef5126:

Sandbox Source
Fluent UI Button Configuration
codesandbox-react-template Configuration
codesandbox-react-northstar-template Configuration

@ling1726 ling1726 enabled auto-merge (squash) May 25, 2021 14:23
@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 824 816 5000
BaseButton mount 865 838 5000
Breadcrumb mount 2568 2580 1000
ButtonNext mount 460 500 5000
Checkbox mount 1479 1466 5000
CheckboxBase mount 1237 1225 5000
ChoiceGroup mount 4636 4510 5000
ComboBox mount 944 953 1000
CommandBar mount 9857 9843 1000
ContextualMenu mount 5962 5935 1000
DefaultButton mount 1067 1081 5000
DetailsRow mount 3602 3577 5000
DetailsRowFast mount 3672 3627 5000
DetailsRowNoStyles mount 3369 3426 5000
Dialog mount 2069 2090 1000
DocumentCardTitle mount 131 152 1000
Dropdown mount 3115 3378 5000
FocusTrapZone mount 1736 1729 5000
FocusZone mount 1745 1744 5000
IconButton mount 1683 1671 5000
Label mount 334 338 5000
Layer mount 1725 1732 5000
Link mount 454 431 5000
MakeStyles mount 1779 1743 50000
MenuButton mount 1394 1409 5000
MessageBar mount 1969 1999 5000
Nav mount 3150 3142 1000
OverflowSet mount 979 1046 5000
Panel mount 2037 2007 1000
Persona mount 776 776 1000
Pivot mount 1353 1365 1000
PrimaryButton mount 1242 1235 5000
Rating mount 7323 7415 5000
SearchBox mount 1263 1281 5000
Shimmer mount 2475 2452 5000
Slider mount 1888 1869 5000
SpinButton mount 4924 4905 5000
Spinner mount 396 400 5000
SplitButton mount 3003 3114 5000
Stack mount 496 482 5000
StackWithIntrinsicChildren mount 1471 1448 5000
StackWithTextChildren mount 4391 4331 5000
SwatchColorPicker mount 9768 9858 5000
Tabs mount 1340 1444 1000
TagPicker mount 2381 2385 5000
TeachingBubble mount 11592 11680 5000
Text mount 401 390 5000
TextField mount 1351 1349 5000
ThemeProvider mount 1160 1123 5000
ThemeProvider virtual-rerender 589 602 5000
ThemeProviderNext mount 6709 6731 5000
Toggle mount 775 772 5000
buttonNative mount 107 121 5000

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
IconMinimalPerf.default 627 561 1.12:1
AvatarMinimalPerf.default 192 173 1.11:1
DropdownManyItemsPerf.default 688 640 1.08:1
DividerMinimalPerf.default 365 342 1.07:1
PortalMinimalPerf.default 168 157 1.07:1
AttachmentMinimalPerf.default 152 143 1.06:1
ButtonSlotsPerf.default 540 510 1.06:1
ChatWithPopoverPerf.default 334 316 1.06:1
FormMinimalPerf.default 390 369 1.06:1
AnimationMinimalPerf.default 412 392 1.05:1
FlexMinimalPerf.default 283 269 1.05:1
LayoutMinimalPerf.default 357 339 1.05:1
AlertMinimalPerf.default 259 250 1.04:1
ChatMinimalPerf.default 621 595 1.04:1
LabelMinimalPerf.default 376 361 1.04:1
ButtonMinimalPerf.default 157 153 1.03:1
ListCommonPerf.default 613 593 1.03:1
ListNestedPerf.default 537 519 1.03:1
SkeletonMinimalPerf.default 355 343 1.03:1
SplitButtonMinimalPerf.default 3677 3584 1.03:1
AccordionMinimalPerf.default 134 131 1.02:1
AttachmentSlotsPerf.default 1131 1109 1.02:1
BoxMinimalPerf.default 330 323 1.02:1
DatepickerMinimalPerf.default 5344 5228 1.02:1
DialogMinimalPerf.default 732 715 1.02:1
GridMinimalPerf.default 326 320 1.02:1
HeaderMinimalPerf.default 356 348 1.02:1
MenuMinimalPerf.default 818 804 1.02:1
ProviderMinimalPerf.default 951 935 1.02:1
SegmentMinimalPerf.default 336 329 1.02:1
CustomToolbarPrototype.default 3691 3622 1.02:1
TreeMinimalPerf.default 749 732 1.02:1
VideoMinimalPerf.default 591 581 1.02:1
CardMinimalPerf.default 529 522 1.01:1
CheckboxMinimalPerf.default 2674 2636 1.01:1
DropdownMinimalPerf.default 3006 2982 1.01:1
ItemLayoutMinimalPerf.default 1222 1215 1.01:1
RadioGroupMinimalPerf.default 417 414 1.01:1
StatusMinimalPerf.default 648 640 1.01:1
TextAreaMinimalPerf.default 478 473 1.01:1
HeaderSlotsPerf.default 730 732 1:1
InputMinimalPerf.default 1216 1213 1:1
ListMinimalPerf.default 472 470 1:1
ListWith60ListItems.default 618 619 1:1
LoaderMinimalPerf.default 673 673 1:1
MenuButtonMinimalPerf.default 1504 1504 1:1
SliderMinimalPerf.default 1503 1503 1:1
TextMinimalPerf.default 336 335 1:1
TooltipMinimalPerf.default 947 950 1:1
ButtonOverridesMissPerf.default 1617 1637 0.99:1
EmbedMinimalPerf.default 3967 3990 0.99:1
PopupMinimalPerf.default 532 538 0.99:1
TableManyItemsPerf.default 1805 1831 0.99:1
TableMinimalPerf.default 382 387 0.99:1
ToolbarMinimalPerf.default 903 908 0.99:1
CarouselMinimalPerf.default 441 448 0.98:1
ProviderMergeThemesPerf.default 1595 1627 0.98:1
RefMinimalPerf.default 231 235 0.98:1
ChatDuplicateMessagesPerf.default 276 285 0.97:1
ImageMinimalPerf.default 349 361 0.97:1
ReactionMinimalPerf.default 352 367 0.96:1
RosterPerf.default 1120 1188 0.94:1
TreeWith60ListItems.default 166 177 0.94:1

@ling1726 ling1726 merged commit 6ffca36 into microsoft:master May 25, 2021
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-tooltip@v9.0.0-alpha.38 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-utilities@v9.0.0-alpha.25 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-tabster@v9.0.0-alpha.28 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-theme-provider@v9.0.0-alpha.38 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-provider@v9.0.0-alpha.41 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-menu@v9.0.0-alpha.27 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-positioning@v9.0.0-alpha.23 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-portal@v9.0.0-alpha.16 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-flex@v9.0.0-alpha.32 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-label@v9.0.0-alpha.3 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-link@v9.0.0-alpha.40 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-image@v9.0.0-alpha.40 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-examples@v8.22.16 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-divider@v9.0.0-alpha.29 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-components@v9.0.0-alpha.51 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-cards@v1.0.0-beta.100 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-badge@v9.0.0-alpha.42 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-context-selector@v9.0.0-alpha.10 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-button@v9.0.0-alpha.40 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-avatar@v9.0.0-alpha.40 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-accordion@v9.0.0-alpha.33 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants