-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 crash in ContextualMenu when Callout component is loaded asynchronously #19122
Fix crash in ContextualMenu when Callout component is loaded asynchronously #19122
Conversation
Asset size changes
Over Tolerance (1024 B) Over Baseline Below Baseline New Removed 1 kB = 1000 B Baseline commit: 329e03a514d8b4ddf371e8ca13a349e3002f14aa (build) |
📊 Bundle size report🤖 This report was generated against 329e03a514d8b4ddf371e8ca13a349e3002f14aa |
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 8aa8a53:
|
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 863 | 913 | 5000 | |
BaseButton | mount | 1010 | 987 | 5000 | |
Breadcrumb | mount | 2637 | 2658 | 1000 | |
ButtonNext | mount | 443 | 457 | 5000 | |
Checkbox | mount | 1637 | 1621 | 5000 | |
CheckboxBase | mount | 1423 | 1398 | 5000 | |
ChoiceGroup | mount | 5107 | 5088 | 5000 | |
ComboBox | mount | 1093 | 1033 | 1000 | |
CommandBar | mount | 10367 | 10351 | 1000 | |
ContextualMenu | mount | 6566 | 6507 | 1000 | |
DefaultButton | mount | 1235 | 1212 | 5000 | |
DetailsRow | mount | 3963 | 3902 | 5000 | |
DetailsRowFast | mount | 4070 | 4144 | 5000 | |
DetailsRowNoStyles | mount | 3871 | 4007 | 5000 | |
Dialog | mount | 2223 | 2191 | 1000 | |
DocumentCardTitle | mount | 160 | 172 | 1000 | |
Dropdown | mount | 3526 | 3586 | 5000 | |
FluentProviderNext | mount | 6912 | 6986 | 5000 | |
FocusTrapZone | mount | 1939 | 1847 | 5000 | |
FocusZone | mount | 1865 | 1909 | 5000 | |
IconButton | mount | 1900 | 1864 | 5000 | |
Label | mount | 341 | 347 | 5000 | |
Layer | mount | 1887 | 1892 | 5000 | |
Link | mount | 469 | 479 | 5000 | |
MakeStyles | mount | 1797 | 1831 | 50000 | |
MenuButton | mount | 1577 | 1612 | 5000 | |
MessageBar | mount | 2091 | 2130 | 5000 | |
Nav | mount | 3453 | 3521 | 1000 | |
OverflowSet | mount | 1064 | 1073 | 5000 | |
Panel | mount | 2170 | 2130 | 1000 | |
Persona | mount | 885 | 851 | 1000 | |
Pivot | mount | 1495 | 1458 | 1000 | |
PrimaryButton | mount | 1356 | 1371 | 5000 | |
Rating | mount | 8341 | 8587 | 5000 | |
SearchBox | mount | 1447 | 1445 | 5000 | |
Shimmer | mount | 2762 | 2799 | 5000 | |
Slider | mount | 2096 | 2109 | 5000 | |
SpinButton | mount | 5210 | 5318 | 5000 | |
Spinner | mount | 449 | 440 | 5000 | |
SplitButton | mount | 3440 | 3378 | 5000 | |
Stack | mount | 554 | 555 | 5000 | |
StackWithIntrinsicChildren | mount | 1753 | 1776 | 5000 | |
StackWithTextChildren | mount | 5165 | 5266 | 5000 | |
SwatchColorPicker | mount | 11097 | 11213 | 5000 | |
Tabs | mount | 1488 | 1513 | 1000 | |
TagPicker | mount | 2668 | 2699 | 5000 | |
TeachingBubble | mount | 12106 | 12168 | 5000 | |
Text | mount | 483 | 462 | 5000 | |
TextField | mount | 1505 | 1490 | 5000 | |
ThemeProvider | mount | 1246 | 1264 | 5000 | |
ThemeProvider | virtual-rerender | 629 | 611 | 5000 | |
Toggle | mount | 847 | 872 | 5000 | |
buttonNative | mount | 125 | 104 | 5000 |
Perf Analysis (@fluentui/react-northstar
)
Perf tests with no regressions
Scenario | Current PR Ticks | Baseline Ticks | Ratio |
---|---|---|---|
AttachmentMinimalPerf.default | 183 | 170 | 1.08:1 |
BoxMinimalPerf.default | 398 | 370 | 1.08:1 |
FlexMinimalPerf.default | 304 | 284 | 1.07:1 |
CardMinimalPerf.default | 677 | 636 | 1.06:1 |
LayoutMinimalPerf.default | 397 | 373 | 1.06:1 |
TextMinimalPerf.default | 413 | 391 | 1.06:1 |
DropdownManyItemsPerf.default | 752 | 714 | 1.05:1 |
ListMinimalPerf.default | 568 | 543 | 1.05:1 |
TreeWith60ListItems.default | 192 | 182 | 1.05:1 |
CarouselMinimalPerf.default | 543 | 523 | 1.04:1 |
HeaderMinimalPerf.default | 413 | 398 | 1.04:1 |
ImageMinimalPerf.default | 403 | 386 | 1.04:1 |
StatusMinimalPerf.default | 749 | 717 | 1.04:1 |
ButtonSlotsPerf.default | 632 | 611 | 1.03:1 |
MenuMinimalPerf.default | 936 | 913 | 1.03:1 |
RadioGroupMinimalPerf.default | 485 | 472 | 1.03:1 |
SegmentMinimalPerf.default | 391 | 381 | 1.03:1 |
TableManyItemsPerf.default | 2172 | 2103 | 1.03:1 |
HeaderSlotsPerf.default | 812 | 793 | 1.02:1 |
InputMinimalPerf.default | 1326 | 1302 | 1.02:1 |
PortalMinimalPerf.default | 179 | 175 | 1.02:1 |
AvatarMinimalPerf.default | 216 | 214 | 1.01:1 |
ChatDuplicateMessagesPerf.default | 317 | 313 | 1.01:1 |
CheckboxMinimalPerf.default | 2912 | 2894 | 1.01:1 |
GridMinimalPerf.default | 394 | 392 | 1.01:1 |
ItemLayoutMinimalPerf.default | 1324 | 1306 | 1.01:1 |
LabelMinimalPerf.default | 416 | 410 | 1.01:1 |
ListCommonPerf.default | 697 | 691 | 1.01:1 |
ListNestedPerf.default | 594 | 590 | 1.01:1 |
ProviderMinimalPerf.default | 1077 | 1070 | 1.01:1 |
SliderMinimalPerf.default | 1623 | 1610 | 1.01:1 |
IconMinimalPerf.default | 674 | 669 | 1.01:1 |
ToolbarMinimalPerf.default | 1051 | 1036 | 1.01:1 |
TooltipMinimalPerf.default | 1106 | 1100 | 1.01:1 |
AnimationMinimalPerf.default | 445 | 446 | 1:1 |
AttachmentSlotsPerf.default | 1177 | 1177 | 1:1 |
ButtonOverridesMissPerf.default | 1852 | 1854 | 1:1 |
DatepickerMinimalPerf.default | 5658 | 5649 | 1:1 |
DropdownMinimalPerf.default | 3202 | 3215 | 1:1 |
EmbedMinimalPerf.default | 4395 | 4381 | 1:1 |
FormMinimalPerf.default | 441 | 441 | 1:1 |
ListWith60ListItems.default | 674 | 675 | 1:1 |
LoaderMinimalPerf.default | 720 | 718 | 1:1 |
ProviderMergeThemesPerf.default | 1709 | 1707 | 1:1 |
RefMinimalPerf.default | 230 | 231 | 1:1 |
SkeletonMinimalPerf.default | 380 | 381 | 1:1 |
TableMinimalPerf.default | 447 | 449 | 1:1 |
TextAreaMinimalPerf.default | 573 | 572 | 1:1 |
CustomToolbarPrototype.default | 4106 | 4086 | 1:1 |
ChatWithPopoverPerf.default | 402 | 405 | 0.99:1 |
PopupMinimalPerf.default | 625 | 629 | 0.99:1 |
TreeMinimalPerf.default | 860 | 866 | 0.99:1 |
AlertMinimalPerf.default | 294 | 300 | 0.98:1 |
DialogMinimalPerf.default | 781 | 795 | 0.98:1 |
RosterPerf.default | 1297 | 1330 | 0.98:1 |
ReactionMinimalPerf.default | 404 | 413 | 0.98:1 |
SplitButtonMinimalPerf.default | 4135 | 4227 | 0.98:1 |
VideoMinimalPerf.default | 687 | 702 | 0.98:1 |
ButtonMinimalPerf.default | 192 | 198 | 0.97:1 |
ChatMinimalPerf.default | 759 | 780 | 0.97:1 |
MenuButtonMinimalPerf.default | 1767 | 1815 | 0.97:1 |
AccordionMinimalPerf.default | 167 | 176 | 0.95:1 |
DividerMinimalPerf.default | 392 | 412 | 0.95:1 |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
…nously (microsoft#19122) PR microsoft#15625 moved the `hostElement` ref from an inner `div` of ContextualMenu, to the root `Callout` element. If the Callout component is loaded asynchronously, this can cause a crash when the ref doesn't refer to a fully loaded element. This change un-merges the `forwardedRef` and `hostElement` ref. It still applies the forwarded ref to the root Callout (to maintain the fix from microsoft#15625), but puts the `hostElement` ref back to the inner `div`.
Pull request checklist
$ yarn change
Description of changes
PR #15625 moved the
hostElement
ref from an innerdiv
of ContextualMenu, to the rootCallout
element. However, when the Callout component is loaded asynchronously, this can cause a crash when the ref doesn't refer to a fully loaded element.This change un-merges the
forwardedRef
andhostElement
ref. It still applies the forwarded ref to the root Callout (to maintain the fix from #15625), but puts thehostElement
ref back to the innerdiv
.