fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

chore(nx): enable analyzeSourceFiles in order to build dependency graph based on source files instead statically defined package.json dependencies

Open Hotell opened this issue 1 year ago • 6 comments

Previous Behavior

monorepo dependency graph is build from manually maintained package.json

New Behavior

TL;DR: monorepo dependency graph is build dynamically by analyzing actual source code = no need to maintain things manually.

More context:

nx dep graph resolution also exposed various forbidden patterns in dependency land which this PR also partially addresses:

  • tight coupling within eslint-plugin test that created circular dependency ( context related rules )
  • using enzyme in v9 packages
  • missing scripts-cypress workspace devDependencies in packages that use it
  • cleaning up unused/missused production dependencies in react-migration-v8-v9

Todo:

  • [x] write a validator that will compare current package.json dependencies agains nx graph dependencies (using analyzeSourceFiles)
  • [x] verify the comparison data and proceed if everything (dep graph) is valid

full data source: analyze-source-dep-graph-comparison.tgz

Related Issue(s)

  • Implements partially https://github.com/microsoft/fluentui/issues/30267, https://github.com/microsoft/fluentui/issues/32292

Hotell avatar Aug 21 '24 16:08 Hotell

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 631 614 5000
Button mount 296 302 5000
Field mount 1146 1142 5000
FluentProvider mount 706 728 5000
FluentProviderWithTheme mount 87 89 10
FluentProviderWithTheme virtual-rerender 39 32 10
FluentProviderWithTheme virtual-rerender-with-unmount 77 87 10
MakeStyles mount 888 855 50000
Persona mount 1775 1730 5000
SpinButton mount 1400 1355 5000
SwatchPicker mount 1663 1628 5000

fabricteam avatar Aug 21 '24 16:08 fabricteam

📊 Bundle size report

✅ No changes found

fabricteam avatar Aug 21 '24 16:08 fabricteam

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
TableMinimalPerf.default 253 230 1.1:1
GridMinimalPerf.default 192 176 1.09:1
ButtonMinimalPerf.default 91 84 1.08:1
DividerMinimalPerf.default 222 205 1.08:1
CarouselMinimalPerf.default 273 256 1.07:1
TextAreaMinimalPerf.default 294 274 1.07:1
LayoutMinimalPerf.default 212 200 1.06:1
VideoMinimalPerf.default 454 428 1.06:1
AccordionMinimalPerf.default 88 84 1.05:1
ToolbarMinimalPerf.default 559 531 1.05:1
DialogMinimalPerf.default 453 437 1.04:1
ListMinimalPerf.default 312 299 1.04:1
LoaderMinimalPerf.default 193 185 1.04:1
SegmentMinimalPerf.default 204 196 1.04:1
SliderMinimalPerf.default 764 738 1.04:1
CardMinimalPerf.default 312 304 1.03:1
ItemLayoutMinimalPerf.default 722 704 1.03:1
MenuMinimalPerf.default 511 498 1.03:1
SkeletonMinimalPerf.default 199 193 1.03:1
StatusMinimalPerf.default 400 390 1.03:1
TooltipMinimalPerf.default 1262 1226 1.03:1
AnimationMinimalPerf.default 307 302 1.02:1
AttachmentSlotsPerf.default 643 630 1.02:1
BoxMinimalPerf.default 200 197 1.02:1
DropdownMinimalPerf.default 1440 1408 1.02:1
HeaderMinimalPerf.default 213 208 1.02:1
InputMinimalPerf.default 549 540 1.02:1
ListNestedPerf.default 336 330 1.02:1
ListWith60ListItems.default 364 356 1.02:1
MenuButtonMinimalPerf.default 962 940 1.02:1
PortalMinimalPerf.default 87 85 1.02:1
RadioGroupMinimalPerf.default 266 262 1.02:1
SplitButtonMinimalPerf.default 2238 2203 1.02:1
AlertMinimalPerf.default 164 163 1.01:1
ButtonSlotsPerf.default 317 315 1.01:1
EmbedMinimalPerf.default 1870 1847 1.01:1
FlexMinimalPerf.default 156 154 1.01:1
ImageMinimalPerf.default 223 221 1.01:1
LabelMinimalPerf.default 219 216 1.01:1
ListCommonPerf.default 397 393 1.01:1
IconMinimalPerf.default 379 375 1.01:1
ButtonOverridesMissPerf.default 652 653 1:1
DatepickerMinimalPerf.default 3563 3555 1:1
DropdownManyItemsPerf.default 392 393 1:1
FormMinimalPerf.default 215 216 1:1
PopupMinimalPerf.default 350 351 1:1
ProviderMergeThemesPerf.default 663 662 1:1
ProviderMinimalPerf.default 204 205 1:1
ReactionMinimalPerf.default 221 221 1:1
TableManyItemsPerf.default 1098 1099 1:1
CustomToolbarPrototype.default 1478 1472 1:1
RosterPerf.default 1615 1638 0.99:1
TextMinimalPerf.default 186 187 0.99:1
TreeMinimalPerf.default 486 491 0.99:1
AttachmentMinimalPerf.default 80 82 0.98:1
ChatMinimalPerf.default 438 447 0.98:1
HeaderSlotsPerf.default 457 464 0.98:1
RefMinimalPerf.default 111 113 0.98:1
ChatDuplicateMessagesPerf.default 150 154 0.97:1
CheckboxMinimalPerf.default 1099 1131 0.97:1
ChatWithPopoverPerf.default 188 201 0.94:1
AvatarMinimalPerf.default 110 118 0.93:1
TreeWith60ListItems.default 84 90 0.93:1

fabricteam avatar Aug 21 '24 16:08 fabricteam

🕵 FluentUIV0 No visual regressions between this PR and main

fabricteam avatar Aug 21 '24 16:08 fabricteam

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 617 655 5000
Breadcrumb mount 1685 1696 1000
Checkbox mount 1697 1749 5000
CheckboxBase mount 1477 1479 5000
ChoiceGroup mount 3041 3028 5000
ComboBox mount 673 693 1000
CommandBar mount 6626 6619 1000
ContextualMenu mount 12310 12293 1000
DefaultButton mount 803 806 5000
DetailsRow mount 2293 2292 5000
DetailsRowFast mount 2229 2271 5000
DetailsRowNoStyles mount 2049 2055 5000
Dialog mount 2685 2909 1000
DocumentCardTitle mount 227 219 1000
Dropdown mount 2034 2002 5000
FocusTrapZone mount 1187 1155 5000
FocusZone mount 1065 1123 5000
GroupedList mount 42512 42786 2
GroupedList virtual-rerender 20348 20578 2
GroupedList virtual-rerender-with-unmount 52214 52455 2
GroupedListV2 mount 236 242 2
GroupedListV2 virtual-rerender 211 218 2
GroupedListV2 virtual-rerender-with-unmount 227 231 2
IconButton mount 1128 1158 5000
Label mount 344 342 5000
Layer mount 2745 2793 5000
Link mount 395 399 5000
MenuButton mount 989 984 5000
MessageBar mount 21875 21874 5000
Nav mount 2029 2059 1000
OverflowSet mount 795 799 5000
Panel mount 1839 1851 1000
Persona mount 739 765 1000
Pivot mount 925 933 1000
PrimaryButton mount 923 949 5000
Rating mount 4666 4780 5000
SearchBox mount 925 932 5000
Shimmer mount 1922 1895 5000
Slider mount 1340 1387 5000
SpinButton mount 2966 2918 5000
Spinner mount 398 386 5000
SplitButton mount 1868 1903 5000
Stack mount 430 415 5000
StackWithIntrinsicChildren mount 858 878 5000
StackWithTextChildren mount 2743 2756 5000
SwatchColorPicker mount 6515 6419 5000
TagPicker mount 1497 1470 5000
Text mount 389 390 5000
TextField mount 953 956 5000
ThemeProvider mount 856 858 5000
ThemeProvider virtual-rerender 579 597 5000
ThemeProvider virtual-rerender-with-unmount 1305 1308 5000
Toggle mount 623 621 5000
buttonNative mount 186 196 5000

fabricteam avatar Aug 21 '24 16:08 fabricteam

🕵 fluentui-web-components-v3 No visual regressions between this PR and main

fabricteam avatar Sep 13 '24 11:09 fabricteam