-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Disallow window and document access for @fluentui/react and related packages.
#30063
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
Disallow window and document access for @fluentui/react and related packages.
#30063
Conversation
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 621 | 632 | 5000 | |
| Button | mount | 299 | 300 | 5000 | |
| Field | mount | 1113 | 1126 | 5000 | |
| FluentProvider | mount | 668 | 697 | 5000 | |
| FluentProviderWithTheme | mount | 83 | 79 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 67 | 61 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 74 | 70 | 10 | |
| MakeStyles | mount | 852 | 867 | 50000 | |
| Persona | mount | 1771 | 1718 | 5000 | |
| SpinButton | mount | 1319 | 1363 | 5000 |
|
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 8dde521:
|
🕵 fluentuiv8 No visual regressions between this PR and main |
Perf Analysis (
|
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| SegmentMinimalPerf.default | 201 | 181 | 1.11:1 |
| ChatDuplicateMessagesPerf.default | 149 | 135 | 1.1:1 |
| ProviderMinimalPerf.default | 215 | 197 | 1.09:1 |
| ButtonSlotsPerf.default | 313 | 292 | 1.07:1 |
| DropdownManyItemsPerf.default | 406 | 384 | 1.06:1 |
| AttachmentMinimalPerf.default | 83 | 79 | 1.05:1 |
| ButtonMinimalPerf.default | 88 | 84 | 1.05:1 |
| DividerMinimalPerf.default | 211 | 201 | 1.05:1 |
| RefMinimalPerf.default | 108 | 103 | 1.05:1 |
| TreeWith60ListItems.default | 85 | 81 | 1.05:1 |
| AccordionMinimalPerf.default | 77 | 74 | 1.04:1 |
| AvatarMinimalPerf.default | 112 | 108 | 1.04:1 |
| ChatMinimalPerf.default | 436 | 421 | 1.04:1 |
| HeaderMinimalPerf.default | 204 | 197 | 1.04:1 |
| HeaderSlotsPerf.default | 469 | 452 | 1.04:1 |
| LoaderMinimalPerf.default | 200 | 193 | 1.04:1 |
| RosterPerf.default | 1599 | 1538 | 1.04:1 |
| TableMinimalPerf.default | 237 | 228 | 1.04:1 |
| TextMinimalPerf.default | 197 | 189 | 1.04:1 |
| BoxMinimalPerf.default | 193 | 187 | 1.03:1 |
| FlexMinimalPerf.default | 157 | 153 | 1.03:1 |
| GridMinimalPerf.default | 190 | 184 | 1.03:1 |
| InputMinimalPerf.default | 533 | 518 | 1.03:1 |
| SplitButtonMinimalPerf.default | 2282 | 2215 | 1.03:1 |
| StatusMinimalPerf.default | 401 | 388 | 1.03:1 |
| AnimationMinimalPerf.default | 297 | 291 | 1.02:1 |
| ImageMinimalPerf.default | 222 | 218 | 1.02:1 |
| TextAreaMinimalPerf.default | 291 | 285 | 1.02:1 |
| DatepickerMinimalPerf.default | 3694 | 3652 | 1.01:1 |
| DropdownMinimalPerf.default | 1452 | 1442 | 1.01:1 |
| EmbedMinimalPerf.default | 1855 | 1840 | 1.01:1 |
| MenuMinimalPerf.default | 486 | 482 | 1.01:1 |
| PopupMinimalPerf.default | 342 | 337 | 1.01:1 |
| ProviderMergeThemesPerf.default | 651 | 645 | 1.01:1 |
| SkeletonMinimalPerf.default | 191 | 190 | 1.01:1 |
| CustomToolbarPrototype.default | 1478 | 1469 | 1.01:1 |
| VideoMinimalPerf.default | 433 | 428 | 1.01:1 |
| AttachmentSlotsPerf.default | 641 | 642 | 1:1 |
| ItemLayoutMinimalPerf.default | 711 | 710 | 1:1 |
| ListWith60ListItems.default | 372 | 372 | 1:1 |
| MenuButtonMinimalPerf.default | 935 | 935 | 1:1 |
| PortalMinimalPerf.default | 83 | 83 | 1:1 |
| ReactionMinimalPerf.default | 209 | 208 | 1:1 |
| TooltipMinimalPerf.default | 1238 | 1235 | 1:1 |
| ListNestedPerf.default | 314 | 317 | 0.99:1 |
| SliderMinimalPerf.default | 729 | 735 | 0.99:1 |
| ToolbarMinimalPerf.default | 511 | 518 | 0.99:1 |
| TreeMinimalPerf.default | 468 | 472 | 0.99:1 |
| ButtonOverridesMissPerf.default | 636 | 646 | 0.98:1 |
| CardMinimalPerf.default | 300 | 306 | 0.98:1 |
| CarouselMinimalPerf.default | 266 | 271 | 0.98:1 |
| ChatWithPopoverPerf.default | 172 | 176 | 0.98:1 |
| DialogMinimalPerf.default | 422 | 431 | 0.98:1 |
| FormMinimalPerf.default | 218 | 222 | 0.98:1 |
| ListMinimalPerf.default | 294 | 299 | 0.98:1 |
| RadioGroupMinimalPerf.default | 248 | 256 | 0.97:1 |
| CheckboxMinimalPerf.default | 1128 | 1172 | 0.96:1 |
| LayoutMinimalPerf.default | 192 | 200 | 0.96:1 |
| ListCommonPerf.default | 388 | 406 | 0.96:1 |
| IconMinimalPerf.default | 375 | 389 | 0.96:1 |
| TableManyItemsPerf.default | 1083 | 1129 | 0.96:1 |
| LabelMinimalPerf.default | 215 | 226 | 0.95:1 |
| AlertMinimalPerf.default | 154 | 163 | 0.94:1 |
🕵 FluentUIV0 No visual regressions between this PR and main |
📊 Bundle size reportUnchanged fixtures
|
Asset size changes
Baseline commit: c43a582b1e7587da4abbe03b04b1fc84f0f15415 (build) |
🕵 fluentuiv9 No visual regressions between this PR and main |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 592 | 614 | 5000 | |
| Breadcrumb | mount | 1668 | 1650 | 1000 | |
| Checkbox | mount | 1666 | 1672 | 5000 | |
| CheckboxBase | mount | 1478 | 1457 | 5000 | |
| ChoiceGroup | mount | 3002 | 2951 | 5000 | |
| ComboBox | mount | 646 | 651 | 1000 | |
| CommandBar | mount | 6036 | 6072 | 1000 | |
| ContextualMenu | mount | 11601 | 11492 | 1000 | |
| DefaultButton | mount | 744 | 735 | 5000 | |
| DetailsRow | mount | 2182 | 2166 | 5000 | |
| DetailsRowFast | mount | 2150 | 2124 | 5000 | |
| DetailsRowNoStyles | mount | 1976 | 1997 | 5000 | |
| Dialog | mount | 2789 | 2794 | 1000 | |
| DocumentCardTitle | mount | 219 | 213 | 1000 | |
| Dropdown | mount | 1949 | 1996 | 5000 | |
| FocusTrapZone | mount | 1122 | 1106 | 5000 | |
| FocusZone | mount | 1043 | 1067 | 5000 | |
| GroupedList | mount | 40965 | 41279 | 2 | |
| GroupedList | virtual-rerender | 19793 | 19738 | 2 | |
| GroupedList | virtual-rerender-with-unmount | 49829 | 50395 | 2 | |
| GroupedListV2 | mount | 221 | 228 | 2 | |
| GroupedListV2 | virtual-rerender | 207 | 213 | 2 | |
| GroupedListV2 | virtual-rerender-with-unmount | 231 | 220 | 2 | |
| IconButton | mount | 1060 | 1083 | 5000 | |
| Label | mount | 339 | 333 | 5000 | |
| Layer | mount | 2692 | 2684 | 5000 | |
| Link | mount | 392 | 386 | 5000 | |
| MenuButton | mount | 916 | 910 | 5000 | |
| MessageBar | mount | 21386 | 21494 | 5000 | |
| Nav | mount | 1926 | 1937 | 1000 | |
| OverflowSet | mount | 793 | 774 | 5000 | |
| Panel | mount | 2035 | 1750 | 1000 | |
| Persona | mount | 719 | 727 | 1000 | |
| Pivot | mount | 865 | 857 | 1000 | |
| PrimaryButton | mount | 846 | 817 | 5000 | |
| Rating | mount | 4531 | 4577 | 5000 | |
| SearchBox | mount | 908 | 915 | 5000 | |
| Shimmer | mount | 1877 | 1877 | 5000 | |
| Slider | mount | 1329 | 1320 | 5000 | |
| SpinButton | mount | 2757 | 2835 | 5000 | |
| Spinner | mount | 363 | 384 | 5000 | |
| SplitButton | mount | 1749 | 1796 | 5000 | |
| Stack | mount | 407 | 402 | 5000 | |
| StackWithIntrinsicChildren | mount | 864 | 863 | 5000 | |
| StackWithTextChildren | mount | 2558 | 2547 | 5000 | |
| SwatchColorPicker | mount | 6045 | 6155 | 5000 | |
| TagPicker | mount | 1447 | 1444 | 5000 | |
| Text | mount | 373 | 372 | 5000 | |
| TextField | mount | 927 | 919 | 5000 | |
| ThemeProvider | mount | 817 | 829 | 5000 | |
| ThemeProvider | virtual-rerender | 585 | 576 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 1268 | 1254 | 5000 | |
| Toggle | mount | 616 | 586 | 5000 | |
| buttonNative | mount | 185 | 193 | 5000 |
4cfafe0 to
180e44b
Compare
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
281d435 to
c847424
Compare
f34fca4 to
41dde23
Compare
| @@ -0,0 +1,7 @@ | |||
| { | |||
| "type": "patch", | |||
| "comment": "chore: disallow document and window access", | |||
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.
tip for future: chore != patch, this added new api on public surface while refactoring under the hood. it should have been type:minor and feat
* master: (166 commits) Remove v0 dependency from v0 compat package (microsoft#30276) applying package updates Disallow `window` and `document` access for `@fluentui/react` and related packages. (microsoft#30063) Update Rating api and stories (microsoft#30092) TeachingPopover: Minor style changes (microsoft#30270) feat(scripts-gulp): replace lerna with nx (microsoft#30266) ci: remove canary and nightly functionality from northstar (microsoft#30264) List: Re-initialize on mount in React 18. (microsoft#29881) feat(scripts-monorepo): replace lerna/utils with pure nx apis (microsoft#30178) chore: remove react-timepicker-compat-preview (microsoft#30263) applying package updates feat(TimePicker-compat): stable release (microsoft#30217) feat: Implement onPositioningEnd callback (microsoft#30177) applying package updates v8 registerIcons compat (microsoft#30003) Adding Planner, ToDoItem and updated Project filetype icons. Updating FabricCDN url to latest datecode. (microsoft#30079) Scaffolds more Nav components (microsoft#30227) chore: migrate to nx 17.2 (microsoft#30187) applying package updates feat: Update position when target or container dimensions change (microsoft#30179) ...
Previous Behavior
You could directly use window or document.
New Behavior
You must get a reference to
windowordocumentfrom context.Related Issue(s)
documentandwindow#28145