feat(card, image, radio): add static classes - #20447
Conversation
📊 Bundle size reportUnchanged fixtures
|
|
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 609b1de:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 5caefa0b72c6c9d70c876377a49beccbf25c460a (build) |
| borderRadius: theme.borderRadiusMedium, | ||
|
|
||
| '> .fluentui-react-card-preview': { | ||
| [`> .${cardPreviewClassName}`]: { |
There was a problem hiding this comment.
I updated selector to use the constant, classnames in CardPreview were also updated.
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1040 | 1036 | 5000 | |
| BaseButton | mount | 1028 | 1020 | 5000 | |
| Breadcrumb | mount | 2768 | 2731 | 1000 | |
| ButtonNext | mount | 541 | 572 | 5000 | |
| Checkbox | mount | 1785 | 1740 | 5000 | |
| CheckboxBase | mount | 1490 | 1523 | 5000 | |
| ChoiceGroup | mount | 5212 | 5345 | 5000 | |
| ComboBox | mount | 1083 | 1081 | 1000 | |
| CommandBar | mount | 10552 | 10657 | 1000 | |
| ContextualMenu | mount | 6811 | 6811 | 1000 | |
| DefaultButton | mount | 1304 | 1263 | 5000 | |
| DetailsRow | mount | 4075 | 4055 | 5000 | |
| DetailsRowFast | mount | 4060 | 4148 | 5000 | |
| DetailsRowNoStyles | mount | 3923 | 3901 | 5000 | |
| Dialog | mount | 2668 | 2659 | 1000 | |
| DocumentCardTitle | mount | 185 | 184 | 1000 | |
| Dropdown | mount | 3514 | 3580 | 5000 | |
| FluentProviderNext | mount | 3307 | 3358 | 5000 | |
| FluentProviderWithTheme | mount | 221 | 218 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 97 | 109 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 239 | 252 | 10 | |
| FocusTrapZone | mount | 1961 | 1956 | 5000 | |
| FocusZone | mount | 1900 | 1862 | 5000 | |
| IconButton | mount | 1985 | 1954 | 5000 | |
| Label | mount | 378 | 363 | 5000 | |
| Layer | mount | 3200 | 3211 | 5000 | |
| Link | mount | 546 | 511 | 5000 | |
| MakeStyles | mount | 1883 | 1893 | 50000 | |
| MenuButton | mount | 1651 | 1674 | 5000 | |
| MessageBar | mount | 2200 | 2152 | 5000 | |
| Nav | mount | 3622 | 3526 | 1000 | |
| OverflowSet | mount | 1221 | 1187 | 5000 | |
| Panel | mount | 2555 | 2562 | 1000 | |
| Persona | mount | 900 | 887 | 1000 | |
| Pivot | mount | 1568 | 1551 | 1000 | |
| PrimaryButton | mount | 1432 | 1431 | 5000 | |
| Rating | mount | 8672 | 8763 | 5000 | |
| SearchBox | mount | 1560 | 1496 | 5000 | |
| Shimmer | mount | 2873 | 2859 | 5000 | |
| Slider | mount | 2118 | 2102 | 5000 | |
| SpinButton | mount | 5449 | 5329 | 5000 | |
| Spinner | mount | 460 | 472 | 5000 | |
| SplitButton | mount | 3500 | 3441 | 5000 | |
| Stack | mount | 545 | 573 | 5000 | |
| StackWithIntrinsicChildren | mount | 2100 | 1993 | 5000 | |
| StackWithTextChildren | mount | 5305 | 5320 | 5000 | |
| SwatchColorPicker | mount | 11482 | 11283 | 5000 | |
| TagPicker | mount | 2916 | 2933 | 5000 | |
| TeachingBubble | mount | 13567 | 13593 | 5000 | |
| Text | mount | 470 | 496 | 5000 | |
| TextField | mount | 1588 | 1516 | 5000 | |
| ThemeProvider | mount | 1260 | 1306 | 5000 | |
| ThemeProvider | virtual-rerender | 654 | 645 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 2108 | 2074 | 5000 | |
| Toggle | mount | 913 | 919 | 5000 | |
| buttonNative | mount | 150 | 151 | 5000 |
Perf Analysis (@fluentui/react-northstar)
Perf tests with no regressions
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| FlexMinimalPerf.default | 339 | 293 | 1.16:1 |
| ListCommonPerf.default | 777 | 709 | 1.1:1 |
| AvatarMinimalPerf.default | 236 | 220 | 1.07:1 |
| ListNestedPerf.default | 643 | 604 | 1.06:1 |
| RefMinimalPerf.default | 256 | 241 | 1.06:1 |
| TreeWith60ListItems.default | 211 | 199 | 1.06:1 |
| DividerMinimalPerf.default | 418 | 397 | 1.05:1 |
| BoxMinimalPerf.default | 388 | 372 | 1.04:1 |
| ChatDuplicateMessagesPerf.default | 352 | 338 | 1.04:1 |
| FormMinimalPerf.default | 478 | 459 | 1.04:1 |
| ListMinimalPerf.default | 575 | 555 | 1.04:1 |
| IconMinimalPerf.default | 706 | 681 | 1.04:1 |
| ButtonOverridesMissPerf.default | 2001 | 1935 | 1.03:1 |
| GridMinimalPerf.default | 383 | 373 | 1.03:1 |
| HeaderMinimalPerf.default | 421 | 408 | 1.03:1 |
| ImageMinimalPerf.default | 441 | 430 | 1.03:1 |
| ListWith60ListItems.default | 728 | 705 | 1.03:1 |
| LoaderMinimalPerf.default | 767 | 747 | 1.03:1 |
| PortalMinimalPerf.default | 187 | 181 | 1.03:1 |
| TableMinimalPerf.default | 456 | 442 | 1.03:1 |
| TextAreaMinimalPerf.default | 593 | 577 | 1.03:1 |
| TooltipMinimalPerf.default | 1147 | 1112 | 1.03:1 |
| VideoMinimalPerf.default | 707 | 688 | 1.03:1 |
| AttachmentMinimalPerf.default | 185 | 181 | 1.02:1 |
| CardMinimalPerf.default | 647 | 634 | 1.02:1 |
| DatepickerMinimalPerf.default | 5971 | 5870 | 1.02:1 |
| DialogMinimalPerf.default | 816 | 802 | 1.02:1 |
| HeaderSlotsPerf.default | 848 | 835 | 1.02:1 |
| CarouselMinimalPerf.default | 538 | 534 | 1.01:1 |
| EmbedMinimalPerf.default | 4723 | 4685 | 1.01:1 |
| MenuMinimalPerf.default | 951 | 938 | 1.01:1 |
| PopupMinimalPerf.default | 631 | 622 | 1.01:1 |
| RadioGroupMinimalPerf.default | 516 | 511 | 1.01:1 |
| SkeletonMinimalPerf.default | 397 | 393 | 1.01:1 |
| SliderMinimalPerf.default | 1875 | 1848 | 1.01:1 |
| SplitButtonMinimalPerf.default | 4728 | 4686 | 1.01:1 |
| StatusMinimalPerf.default | 776 | 765 | 1.01:1 |
| TreeMinimalPerf.default | 894 | 882 | 1.01:1 |
| AnimationMinimalPerf.default | 452 | 454 | 1:1 |
| ButtonSlotsPerf.default | 611 | 614 | 1:1 |
| ChatMinimalPerf.default | 730 | 732 | 1:1 |
| ProviderMinimalPerf.default | 1265 | 1260 | 1:1 |
| ToolbarMinimalPerf.default | 1027 | 1023 | 1:1 |
| CheckboxMinimalPerf.default | 2927 | 2962 | 0.99:1 |
| InputMinimalPerf.default | 1399 | 1415 | 0.99:1 |
| ItemLayoutMinimalPerf.default | 1359 | 1375 | 0.99:1 |
| MenuButtonMinimalPerf.default | 1800 | 1822 | 0.99:1 |
| ProviderMergeThemesPerf.default | 1778 | 1788 | 0.99:1 |
| TableManyItemsPerf.default | 2128 | 2142 | 0.99:1 |
| CustomToolbarPrototype.default | 4347 | 4397 | 0.99:1 |
| AccordionMinimalPerf.default | 177 | 180 | 0.98:1 |
| AlertMinimalPerf.default | 312 | 317 | 0.98:1 |
| AttachmentSlotsPerf.default | 1199 | 1220 | 0.98:1 |
| ReactionMinimalPerf.default | 414 | 421 | 0.98:1 |
| SegmentMinimalPerf.default | 380 | 386 | 0.98:1 |
| DropdownManyItemsPerf.default | 775 | 802 | 0.97:1 |
| DropdownMinimalPerf.default | 3335 | 3429 | 0.97:1 |
| LabelMinimalPerf.default | 450 | 462 | 0.97:1 |
| LayoutMinimalPerf.default | 394 | 410 | 0.96:1 |
| TextMinimalPerf.default | 375 | 390 | 0.96:1 |
| RosterPerf.default | 1282 | 1344 | 0.95:1 |
| ChatWithPopoverPerf.default | 408 | 436 | 0.94:1 |
| ButtonMinimalPerf.default | 205 | 220 | 0.93:1 |
tringakrasniqi
left a comment
There was a problem hiding this comment.
LGTM, @andrefcdias could you please confirm also the changes for Card component?
I merged the PR to unblock #20383, if there will be any comments - will be happy to address them in a follow up PR ☺ |
Pull request checklist
$ yarn changeDescription of changes
✅ Extracted from #20383, these changes passed conformance test on that PR
This PR adds static classes to components
@fluentui/react-card,@fluentui/react-image&@fluentui/react-radio.fui-ComponentNamecomponentNameClassName