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

feat: decouple react-conformance-griffel from react-conformance #22120

Closed

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Mar 16, 2022

Current Behavior

  • v7,8 packages are used in v9

New Behavior

  • v9 uses only v9 as direct dependencies

Related Issue(s)

Fixes #21980

Remarks

Future goal should be to create conformance-core which would be extended by specialized pluggable packages

@@ -0,0 +1,109 @@
import type { ElementType, ComponentType } from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explicitly importing types only

import * as React from 'react';
import { ComponentDoc } from 'react-docgen-typescript';
import * as ts from 'typescript';
import type { ElementType, ComponentType } from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to match griffel types 1:1

@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 78ebb04:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Mar 16, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: df62b071cf725c01cf639e3cf559c99f2ae8cb00 (build)

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1086 1077 5000
Button mount 629 661 5000
FluentProvider mount 2115 2062 5000
FluentProviderWithTheme mount 320 330 10
FluentProviderWithTheme virtual-rerender 250 252 10
FluentProviderWithTheme virtual-rerender-with-unmount 330 325 10
MakeStyles mount 1831 1875 50000

@fabricteam
Copy link
Collaborator

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
priority-overflow
createOverflowManager
2.836 kB
1.209 kB
react-accordion
Accordion (including children components)
74.792 kB
22.516 kB
react-avatar
Avatar
45.18 kB
13.128 kB
react-badge
Badge
20.895 kB
6.567 kB
react-badge
CounterBadge
21.848 kB
6.883 kB
react-badge
PresenceBadge
21.951 kB
6.565 kB
react-button
Button
28.013 kB
8.059 kB
react-button
CompoundButton
33.508 kB
9.092 kB
react-button
MenuButton
29.796 kB
8.665 kB
react-button
SplitButton
36.268 kB
9.863 kB
react-button
ToggleButton
37.395 kB
8.68 kB
react-card
Card - All
53.619 kB
15.372 kB
react-card
Card
48.904 kB
14.089 kB
react-card
CardFooter
7.686 kB
3.264 kB
react-card
CardHeader
9.251 kB
3.78 kB
react-card
CardPreview
7.658 kB
3.291 kB
react-combobox
Combobox
6.817 kB
2.901 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
176.084 kB
49.112 kB
react-components
react-components: FluentProvider & webLightTheme
32.526 kB
10.645 kB
react-divider
Divider
15.385 kB
5.539 kB
react-image
Image
10.109 kB
3.958 kB
react-input
Input
21.635 kB
7.166 kB
react-label
Label
8.371 kB
3.504 kB
react-link
Link
11.106 kB
4.507 kB
react-menu
Menu (including children components)
105.847 kB
32.431 kB
react-menu
Menu (including selectable components)
109.026 kB
32.895 kB
react-popover
Popover
96.782 kB
29.558 kB
react-portal
Portal
6.267 kB
2.168 kB
react-positioning
usePopper
23.21 kB
8.084 kB
react-priority-overflow
hooks only
10.606 kB
4.087 kB
react-provider
FluentProvider
14.009 kB
5.25 kB
react-select
Select
7.853 kB
3.297 kB
react-slider
Slider
25.402 kB
8.251 kB
react-spinner
Spinner
6.815 kB
2.9 kB
react-switch
Switch
24.279 kB
8.001 kB
react-text
Text - Default
10.797 kB
4.233 kB
react-text
Text - Wrappers
14.113 kB
4.576 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
29.426 kB
6.551 kB
react-theme
Teams: Light theme
18.42 kB
5.27 kB
react-tooltip
Tooltip
42.789 kB
14.712 kB
react-utilities
SSRProvider
189 B
161 B
🤖 This report was generated against df62b071cf725c01cf639e3cf559c99f2ae8cb00

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ListNestedPerf.default 482 409 1.18:1
BoxMinimalPerf.default 294 253 1.16:1
SkeletonMinimalPerf.default 294 254 1.16:1
LoaderMinimalPerf.default 582 531 1.1:1
StatusMinimalPerf.default 575 526 1.09:1
ButtonMinimalPerf.default 152 142 1.07:1
LabelMinimalPerf.default 336 313 1.07:1
RefMinimalPerf.default 216 202 1.07:1
DialogMinimalPerf.default 652 614 1.06:1
TableMinimalPerf.default 349 330 1.06:1
TextAreaMinimalPerf.default 424 399 1.06:1
AttachmentMinimalPerf.default 135 128 1.05:1
ImageMinimalPerf.default 322 307 1.05:1
SegmentMinimalPerf.default 301 288 1.05:1
TreeWith60ListItems.default 155 147 1.05:1
AnimationMinimalPerf.default 470 454 1.04:1
DividerMinimalPerf.default 312 301 1.04:1
LayoutMinimalPerf.default 307 296 1.04:1
ListMinimalPerf.default 456 440 1.04:1
RadioGroupMinimalPerf.default 383 368 1.04:1
TooltipMinimalPerf.default 877 843 1.04:1
AccordionMinimalPerf.default 130 126 1.03:1
AlertMinimalPerf.default 234 228 1.03:1
HeaderSlotsPerf.default 650 632 1.03:1
IconMinimalPerf.default 533 518 1.03:1
TreeMinimalPerf.default 694 675 1.03:1
VideoMinimalPerf.default 577 561 1.03:1
AttachmentSlotsPerf.default 927 910 1.02:1
CarouselMinimalPerf.default 400 392 1.02:1
ChatDuplicateMessagesPerf.default 267 263 1.02:1
GridMinimalPerf.default 290 283 1.02:1
SplitButtonMinimalPerf.default 3656 3573 1.02:1
ButtonOverridesMissPerf.default 1436 1423 1.01:1
CardMinimalPerf.default 473 467 1.01:1
FlexMinimalPerf.default 246 244 1.01:1
FormMinimalPerf.default 337 334 1.01:1
InputMinimalPerf.default 1089 1083 1.01:1
MenuButtonMinimalPerf.default 1428 1418 1.01:1
PopupMinimalPerf.default 534 527 1.01:1
PortalMinimalPerf.default 153 152 1.01:1
CheckboxMinimalPerf.default 2249 2251 1:1
HeaderMinimalPerf.default 308 307 1:1
ItemLayoutMinimalPerf.default 996 1000 1:1
MenuMinimalPerf.default 722 722 1:1
RosterPerf.default 955 957 1:1
ProviderMergeThemesPerf.default 1428 1423 1:1
SliderMinimalPerf.default 1418 1419 1:1
ReactionMinimalPerf.default 317 319 0.99:1
CustomToolbarPrototype.default 3422 3474 0.99:1
ToolbarMinimalPerf.default 797 807 0.99:1
AvatarMinimalPerf.default 168 172 0.98:1
ButtonSlotsPerf.default 463 473 0.98:1
ProviderMinimalPerf.default 952 969 0.98:1
ChatWithPopoverPerf.default 323 334 0.97:1
DatepickerMinimalPerf.default 4598 4729 0.97:1
ListCommonPerf.default 522 545 0.96:1
TextMinimalPerf.default 274 285 0.96:1
ChatMinimalPerf.default 595 625 0.95:1
DropdownMinimalPerf.default 2444 2570 0.95:1
EmbedMinimalPerf.default 3244 3490 0.93:1
TableManyItemsPerf.default 1486 1622 0.92:1
DropdownManyItemsPerf.default 552 608 0.91:1
ListWith60ListItems.default 494 548 0.9:1

@Hotell Hotell marked this pull request as ready for review March 16, 2022 10:51
@Hotell Hotell requested review from a team as code owners March 16, 2022 10:51
@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 690 713 5000
Breadcrumb mount 2093 2064 1000
Checkbox mount 1139 1301 5000
CheckboxBase mount 1100 955 5000
ChoiceGroup mount 4070 4048 5000
ComboBox mount 832 830 1000
CommandBar mount 8872 8964 1000
ContextualMenu mount 9657 10319 1000
DefaultButton mount 980 953 5000
DetailsRow mount 3198 3152 5000
DetailsRowFast mount 3217 3096 5000
DetailsRowNoStyles mount 3053 3130 5000
Dialog mount 1833 1766 1000
DocumentCardTitle mount 150 140 1000
Dropdown mount 2684 2854 5000
FocusTrapZone mount 1580 1493 5000
FocusZone mount 1543 1595 5000
IconButton mount 1446 1465 5000
Label mount 275 305 5000
Layer mount 2491 2531 5000
Link mount 386 395 5000
MenuButton mount 1228 1171 5000
MessageBar mount 1837 1788 5000
Nav mount 2751 2676 1000
OverflowSet mount 940 838 5000
Panel mount 1778 1858 1000
Persona mount 679 740 1000
Pivot mount 1187 1230 1000
PrimaryButton mount 1048 1122 5000
Rating mount 6396 6439 5000
SearchBox mount 1122 1141 5000
Shimmer mount 2204 2177 5000
Slider mount 1679 1636 5000
SpinButton mount 4400 4255 5000
Spinner mount 377 383 5000
SplitButton mount 2727 2691 5000
Stack mount 447 460 5000
StackWithIntrinsicChildren mount 1892 1919 5000
StackWithTextChildren mount 4397 4507 5000
SwatchColorPicker mount 9762 9719 5000
TagPicker mount 2273 2264 5000
TeachingBubble mount 88474 83428 5000
Text mount 361 324 5000
TextField mount 1204 1232 5000
ThemeProvider mount 1006 982 5000
ThemeProvider virtual-rerender 498 499 5000
ThemeProvider virtual-rerender-with-unmount 1455 1551 5000
Toggle mount 640 622 5000
buttonNative mount 124 107 5000

@@ -27,11 +27,13 @@
"peerDependencies": {
"@types/react": ">=16.8.0 <18.0.0",
"@types/react-dom": ">=16.8.0 <18.0.0",
"@types/enzyme": "^3.10.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just hit the realization, that in theory react-conformance should also be a peer depedency, since there's no reason to use this package without it 😵😵😵

The I realized that maybe we can stick a really large dependency range on react-conformance as a peer dep instead of this ? like @fluentui/react-conformance: <=1.0.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I know right :D

as I mentioned, I don't think this is ideal solution. Ideal ==
image

@ecraig12345
Copy link
Member

Related issue for overall react-conformance refactor: #21665

@Hotell
Copy link
Contributor Author

Hotell commented Mar 16, 2022

Related issue for overall react-conformance refactor: #21665

Closing in favour of ↑

@Hotell Hotell closed this Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

react-conformance-griffel: remove v8 packages from dependencies
5 participants