fix: Preventing blanket selectors from Fabric component from being applied via new preventBlanketFontInheritance prop#25453
Merged
khmakoto merged 8 commits intomicrosoft:masterfrom Nov 3, 2022
Conversation
… to specific components that use them.
Asset size changes
Baseline commit: 50d5f2ef0d6a06851e78f736055fcc313d61029b (build) |
|
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 e851b88:
|
Collaborator
📊 Bundle size report🤖 This report was generated against 50d5f2ef0d6a06851e78f736055fcc313d61029b |
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 1215 | 1200 | 5000 | |
| Breadcrumb | mount | 2804 | 2820 | 1000 | |
| Checkbox | mount | 2653 | 2634 | 5000 | |
| CheckboxBase | mount | 2384 | 2377 | 5000 | |
| ChoiceGroup | mount | 4286 | 4274 | 5000 | |
| ComboBox | mount | 1183 | 1181 | 1000 | |
| CommandBar | mount | 9335 | 9290 | 1000 | |
| ContextualMenu | mount | 10157 | 10220 | 1000 | |
| DefaultButton | mount | 1365 | 1381 | 5000 | |
| DetailsRow | mount | 3396 | 3368 | 5000 | |
| DetailsRowFast | mount | 3388 | 3374 | 5000 | |
| DetailsRowNoStyles | mount | 3255 | 3247 | 5000 | |
| Dialog | mount | 2987 | 2936 | 1000 | |
| DocumentCardTitle | mount | 577 | 593 | 1000 | |
| Dropdown | mount | 3342 | 3164 | 5000 | |
| FocusTrapZone | mount | 1955 | 1937 | 5000 | |
| FocusZone | mount | 1986 | 1973 | 5000 | |
| GroupedList | mount | 1824 | 2073 | 2 | |
| GroupedList | virtual-rerender | 1111 | 1100 | 2 | |
| GroupedList | virtual-rerender-with-unmount | 1613 | 1622 | 2 | |
| GroupedListV2 | mount | 565 | 576 | 2 | |
| GroupedListV2 | virtual-rerender | 549 | 549 | 2 | |
| GroupedListV2 | virtual-rerender-with-unmount | 578 | 564 | 2 | |
| IconButton | mount | 1788 | 1819 | 5000 | |
| Label | mount | 760 | 760 | 5000 | |
| Layer | mount | 4142 | 4266 | 5000 | |
| Link | mount | 871 | 854 | 5000 | |
| MenuButton | mount | 1621 | 1622 | 5000 | |
| MessageBar | mount | 2305 | 2394 | 5000 | |
| Nav | mount | 3037 | 3117 | 1000 | |
| OverflowSet | mount | 1443 | 1414 | 5000 | |
| Panel | mount | 2529 | 2511 | 1000 | |
| Persona | mount | 1263 | 1276 | 1000 | |
| Pivot | mount | 1550 | 1538 | 1000 | |
| PrimaryButton | mount | 1494 | 1513 | 5000 | |
| Rating | mount | 7028 | 6981 | 5000 | |
| SearchBox | mount | 1492 | 1525 | 5000 | |
| Shimmer | mount | 2927 | 2939 | 5000 | |
| Slider | mount | 2107 | 2104 | 5000 | |
| SpinButton | mount | 4263 | 4310 | 5000 | |
| Spinner | mount | 826 | 847 | 5000 | |
| SplitButton | mount | 2835 | 2879 | 5000 | |
| Stack | mount | 883 | 883 | 5000 | |
| StackWithIntrinsicChildren | mount | 2347 | 2329 | 5000 | |
| StackWithTextChildren | mount | 5082 | 5029 | 5000 | |
| SwatchColorPicker | mount | 9590 | 9585 | 5000 | |
| TagPicker | mount | 2334 | 2364 | 5000 | |
| TeachingBubble | mount | 77133 | 77561 | 5000 | |
| Text | mount | 832 | 844 | 5000 | |
| TextField | mount | 1561 | 1577 | 5000 | |
| ThemeProvider | mount | 1444 | 1456 | 5000 | |
| ThemeProvider | virtual-rerender | 1153 | 1146 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 2021 | 2025 | 5000 | |
| Toggle | mount | 1151 | 1126 | 5000 | |
| buttonNative | mount | 546 | 548 | 5000 |
spmonahan
reviewed
Nov 2, 2022
spmonahan
approved these changes
Nov 2, 2022
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Nov 3, 2022
* master: feat(scripts): improve API violation reporting (microsoft#25356) applying package updates fix: Preventing blanket selectors from Fabric component from being applied via new preventBlanketFontInheritance prop (microsoft#25453) feat(react-infobutton): Add initial implementation (microsoft#25247) chore(react-avatar, avatar-context): migrate to new package structure (microsoft#25473) chore(react-portal, portal-compat, portal-compat-context): migrate to new package structure (microsoft#25481) docs(react-infobutton): Adding component's spec (microsoft#25251) fix(screener-build workflow): scope package to build for v9 VR tests to speed up perf (microsoft#25494) chore(vr-tests-v9): Convert Button VR tests to CSF (microsoft#25108)
NotWoods
pushed a commit
to NotWoods/fluentui
that referenced
this pull request
Nov 18, 2022
…plied via new preventBlanketFontInheritance prop (microsoft#25453) * fix: Removing blanket selectors from Fabric component and adding them to specific components that use them. * Updating snapshots. * Updating snapshots. * Adding change file. * Gating behavior behind preventBlanketFontInheritance prop. * Updating change file. * Fixing incorrect condition. * Updating snapshots. Co-authored-by: Humberto Makoto Morimoto Burgos <makotom@microsoft.com> Co-authored-by: KHMakoto <humberto_makoto@hotmail.com>
Hotell
pushed a commit
to Hotell/fluentui
that referenced
this pull request
Feb 9, 2023
…plied via new preventBlanketFontInheritance prop (microsoft#25453) * fix: Removing blanket selectors from Fabric component and adding them to specific components that use them. * Updating snapshots. * Updating snapshots. * Adding change file. * Gating behavior behind preventBlanketFontInheritance prop. * Updating change file. * Fixing incorrect condition. * Updating snapshots. Co-authored-by: Humberto Makoto Morimoto Burgos <makotom@microsoft.com> Co-authored-by: KHMakoto <humberto_makoto@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous Behavior
The
Fabriccomponent had blanket selectors forbutton,inputandtextareadescendants to applyfont-family: inheritstyles to them. These are expensive selectors that are actually unneeded since all of the v8 components already havefont-familyapplied to them and it's not the library's responsibility to ensure that non-Fluent components inherit these styles.New Behavior
The
Fabriccomponent now has a newpreventBlanketFontInheritanceprop. If the prop is set to true, then theFabriccomponent no longer applies the blanket selectors forbutton,inputandtextareadescendants mentioned above, which should improve style recalculation. Anyone who decides to turn the prop on should see no impact on our components since they already definefont-familyin their styles.Related Issue(s)
Fixes #24260