-
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
Add missing peers on react/react-dom #23697
Conversation
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 6734c74:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 460a100b69c8d95cfbb3e33bf3340ec2a408581b (build) |
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 1381 | 1387 | 5000 | |
Button | mount | 1025 | 1053 | 5000 | |
FluentProvider | mount | 1722 | 1751 | 5000 | |
FluentProviderWithTheme | mount | 739 | 672 | 10 | |
FluentProviderWithTheme | virtual-rerender | 639 | 674 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 715 | 711 | 10 | |
MakeStyles | mount | 2118 | 2105 | 50000 |
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
BaseButton | mount | 784 | 788 | 5000 | |
Breadcrumb | mount | 2367 | 2348 | 1000 | |
Checkbox | mount | 1280 | 1293 | 5000 | |
CheckboxBase | mount | 1088 | 1083 | 5000 | |
ChoiceGroup | mount | 4060 | 4012 | 5000 | |
ComboBox | mount | 841 | 837 | 1000 | |
CommandBar | mount | 9130 | 9105 | 1000 | |
ContextualMenu | mount | 10262 | 10408 | 1000 | |
DefaultButton | mount | 977 | 997 | 5000 | |
DetailsRow | mount | 3288 | 3285 | 5000 | |
DetailsRowFast | mount | 3284 | 3302 | 5000 | |
DetailsRowNoStyles | mount | 3122 | 3158 | 5000 | |
Dialog | mount | 2465 | 2431 | 1000 | |
DocumentCardTitle | mount | 153 | 152 | 1000 | |
Dropdown | mount | 2906 | 2878 | 5000 | |
FocusTrapZone | mount | 1641 | 1596 | 5000 | |
FocusZone | mount | 1568 | 1581 | 5000 | |
IconButton | mount | 1511 | 1500 | 5000 | |
Label | mount | 291 | 298 | 5000 | |
Layer | mount | 2527 | 2532 | 5000 | |
Link | mount | 392 | 407 | 5000 | |
MenuButton | mount | 1283 | 1282 | 5000 | |
MessageBar | mount | 1854 | 1786 | 5000 | |
Nav | mount | 2834 | 2879 | 1000 | |
OverflowSet | mount | 948 | 939 | 5000 | |
Panel | mount | 1907 | 1853 | 1000 | |
Persona | mount | 866 | 853 | 1000 | |
Pivot | mount | 1259 | 1252 | 1000 | |
PrimaryButton | mount | 1121 | 1125 | 5000 | |
Rating | mount | 6684 | 6616 | 5000 | |
SearchBox | mount | 1116 | 1116 | 5000 | |
Shimmer | mount | 2104 | 2114 | 5000 | |
Slider | mount | 1675 | 1661 | 5000 | |
SpinButton | mount | 4322 | 4339 | 5000 | |
Spinner | mount | 365 | 387 | 5000 | |
SplitButton | mount | 2769 | 2733 | 5000 | |
Stack | mount | 444 | 441 | 5000 | |
StackWithIntrinsicChildren | mount | 1992 | 1989 | 5000 | |
StackWithTextChildren | mount | 4498 | 4540 | 5000 | |
SwatchColorPicker | mount | 10080 | 10025 | 5000 | |
TagPicker | mount | 2341 | 2324 | 5000 | |
TeachingBubble | mount | 85515 | 83672 | 5000 | |
Text | mount | 369 | 364 | 5000 | |
TextField | mount | 1209 | 1182 | 5000 | |
ThemeProvider | mount | 1026 | 1020 | 5000 | |
ThemeProvider | virtual-rerender | 560 | 560 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 1636 | 1601 | 5000 | |
Toggle | mount | 682 | 676 | 5000 | |
buttonNative | mount | 111 | 114 | 5000 |
change/@fluentui-font-icons-mdl2-c720e750-a204-450a-b3e4-9db39fc7df46.json
Outdated
Show resolved
Hide resolved
change/@fluentui-foundation-legacy-b274b498-4030-40e5-9781-ba71e6f1bba4.json
Outdated
Show resolved
Hide resolved
change/@fluentui-react-file-type-icons-49182d2c-44b2-4f9c-806d-b411535f96b3.json
Outdated
Show resolved
Hide resolved
change/@fluentui-react-focus-1c889139-1af0-4339-8bb5-296c7d90df21.json
Outdated
Show resolved
Hide resolved
change/@fluentui-react-icons-mdl2-83599bb5-c1db-4f67-9279-f0bcd535e3c6.json
Outdated
Show resolved
Hide resolved
change/@fluentui-react-shared-contexts-31929f78-f06e-4ca7-9254-417a9617c73b.json
Outdated
Show resolved
Hide resolved
change/@fluentui-scheme-utilities-35566e46-3444-4022-a7a5-bb4d436dc609.json
Outdated
Show resolved
Hide resolved
change/@fluentui-style-utilities-1127710a-5a49-4e70-b1eb-554c6dc4d1ee.json
Show resolved
Hide resolved
change/@fluentui-theme-badeaf5f-12f0-4fe2-a0e0-ae46cb4a6f74.json
Outdated
Show resolved
Hide resolved
change/@fluentui-theme-samples-d44100f9-18ce-4d13-a911-3e48187e5320.json
Outdated
Show resolved
Hide resolved
Do I correctly understand that it's a requirement created by I unblocked this PR, but anyway please address https://github.com/microsoft/fluentui/pull/23697/files#r909309590. |
You are correct, that this is in relation to midgard-yarn-strict. I have made a couple more updates to the PR, I would love to discuss with whoever needed |
@@ -31,6 +31,12 @@ | |||
"@fluentui/utilities": "^8.8.3", | |||
"tslib": "^2.1.0" | |||
}, | |||
"peerDependencies": { | |||
"@types/react": ">=16.8.0 <18.0.0", | |||
"@types/react-dom": ">=16.8.0 <18.0.0", |
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.
@types/* are devDependencies and shouldn't be required to be installed by any downstream dependency. Right?
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.
Also font-icons-mdl2 does not use react. I'm not understanding what's going on here.
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.
It is feasible that font-icons-mdl2 could have react/react-dom as a devDependency
if we were defining strict dependencies. This might be required for running tests at this layer in isolation, which would exercise the utilities paths. Peer dependencies would then be "resolved" at this point.
But a change like that should not affect downstream repos. A downstream repo who installs font-icons-mdl2 will still need to resolve the transient peer deps at that layer regardless of the resolution of the intermediate layers which don't directly depend on react.
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.
I don't understand the need for this change. If packages now need to be responsible for forwarding dependencies' peer requirements, we are in for a huge mess. Let's examine the need here.
FYI: I created an issue in |
This pull request has been automatically marked as stale because it was marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 5 days of this comment. Thank you for your contributions to Fluent UI! |
Current Behavior
Several packages are missing declarations of peer dependencies. Peers are declared on certain @FluentUI packages, then other @FluentUI packages which depend on them do not fulfil the peer requirements by "forwarding" them explicitly through declaring them as their own peers. This causes issues when attempting to use @FluentUI packages in a "strict" dependency environment.
The solution is to declare the peers as needed so they can be satisfied by the end consumer of the package.
New Behavior
Peers have been appropriately declared where needed
Related Issue(s)
#23110
Fixes #