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

Fixes broken CSS selectors and disables prettier for web component styles. #18982

Conversation

chrisdholt
Copy link
Member

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ yarn change

Description of changes

This PR fixes a regression due to the current version of prettier. The formatting tool is adding spaces for interpolated selectors which breaks the selector chain and causes styles to not apply. Unfortunately, the only fix for now is either to go off the single version policy of the repository or temporarily ignore the style files. This change implements the latter.

Focus areas to test

(optional)

@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 122cd4c:

Sandbox Source
Fluent UI React Starter Configuration

@size-auditor
Copy link

size-auditor bot commented Jul 16, 2021

Asset size changes

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

Baseline commit: a1f1516008a6490297b30f73dd9eaa188df8cf5d (build)

@fabricteam
Copy link
Collaborator

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-divider
Divider
15.889 kB
5.747 kB
react-image
Image
10.642 kB
4.264 kB
react-make-styles
makeStaticStyles (runtime)
7.59 kB
3.321 kB
react-make-styles
makeStyles + mergeClasses (runtime)
22.135 kB
8.356 kB
react-make-styles
makeStyles + mergeClasses (build time)
2.557 kB
1.202 kB
react-menu
Menu - Default
113.947 kB
34.389 kB
react-menu
Menu - Selectable
115.959 kB
34.649 kB
react-popover
Popover
140.938 kB
41.968 kB
react-theme
Teams: all themes
31.935 kB
6.49 kB
react-theme
Teams: Light theme
19.527 kB
5.504 kB
🤖 This report was generated against a1f1516008a6490297b30f73dd9eaa188df8cf5d

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react)

Scenario Render type Master Ticks PR Ticks Iterations Status
Panel mount 2051 1359 1000 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 799 816 5000
BaseButton mount 912 893 5000
Breadcrumb mount 2614 2667 1000
ButtonNext mount 531 515 5000
Checkbox mount 1504 1522 5000
CheckboxBase mount 1315 1312 5000
ChoiceGroup mount 4619 4783 5000
ComboBox mount 964 950 1000
CommandBar mount 10038 10050 1000
ContextualMenu mount 6262 6201 1000
DefaultButton mount 1133 1121 5000
DetailsRow mount 3657 3698 5000
DetailsRowFast mount 3759 3671 5000
DetailsRowNoStyles mount 3548 3526 5000
Dialog mount 2110 2119 1000
DocumentCardTitle mount 146 148 1000
Dropdown mount 3178 3171 5000
FluentProviderNext mount 7191 7190 5000
FocusTrapZone mount 1744 1759 5000
FocusZone mount 1775 1766 5000
IconButton mount 1733 1717 5000
Label mount 331 340 5000
Layer mount 1751 1753 5000
Link mount 464 464 5000
MakeStyles mount 1829 1793 50000
MenuButton mount 1448 1465 5000
MessageBar mount 1999 2106 5000
Nav mount 3275 3232 1000
OverflowSet mount 1050 1030 5000
Panel mount 2051 1359 1000 Possible regression
Persona mount 803 827 1000
Pivot mount 1416 1390 1000
PrimaryButton mount 1279 1271 5000
Rating mount 7431 7445 5000
SearchBox mount 1276 1290 5000
Shimmer mount 2480 2453 5000
Slider mount 1931 1929 5000
SpinButton mount 4872 4894 5000
Spinner mount 416 420 5000
SplitButton mount 3078 3100 5000
Stack mount 505 500 5000
StackWithIntrinsicChildren mount 1481 1468 5000
StackWithTextChildren mount 4370 4412 5000
SwatchColorPicker mount 9932 9991 5000
Tabs mount 1377 1364 1000
TagPicker mount 2405 2408 5000
TeachingBubble mount 11743 11765 5000
Text mount 407 411 5000
TextField mount 1336 1340 5000
ThemeProvider mount 1179 1172 5000
ThemeProvider virtual-rerender 609 609 5000
Toggle mount 798 809 5000
buttonNative mount 113 121 5000

Perf Analysis (@fluentui/react-northstar)

⚠️ 1 potential perf regressions detected

Potential regressions comparing to master

Scenario Current PR Ticks Baseline Ticks Ratio Regression Analysis
ListWith60ListItems.default 624 602 1.04:1 analysis
Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
AvatarMinimalPerf.default 203 178 1.14:1
ButtonMinimalPerf.default 175 160 1.09:1
GridMinimalPerf.default 347 326 1.06:1
TreeWith60ListItems.default 178 170 1.05:1
AnimationMinimalPerf.default 404 389 1.04:1
LabelMinimalPerf.default 387 372 1.04:1
ListCommonPerf.default 633 608 1.04:1
RefMinimalPerf.default 241 232 1.04:1
IconMinimalPerf.default 609 588 1.04:1
CarouselMinimalPerf.default 450 439 1.03:1
DialogMinimalPerf.default 749 730 1.03:1
FormMinimalPerf.default 403 390 1.03:1
HeaderSlotsPerf.default 770 745 1.03:1
PortalMinimalPerf.default 178 173 1.03:1
ReactionMinimalPerf.default 366 357 1.03:1
CardMinimalPerf.default 540 531 1.02:1
ChatDuplicateMessagesPerf.default 288 282 1.02:1
ListMinimalPerf.default 501 492 1.02:1
TextAreaMinimalPerf.default 480 472 1.02:1
BoxMinimalPerf.default 339 336 1.01:1
ChatWithPopoverPerf.default 359 354 1.01:1
DropdownMinimalPerf.default 3047 3023 1.01:1
HeaderMinimalPerf.default 352 348 1.01:1
ItemLayoutMinimalPerf.default 1195 1181 1.01:1
LoaderMinimalPerf.default 686 678 1.01:1
MenuMinimalPerf.default 820 814 1.01:1
ProviderMergeThemesPerf.default 1667 1653 1.01:1
SkeletonMinimalPerf.default 348 346 1.01:1
ButtonOverridesMissPerf.default 1629 1625 1:1
ChatMinimalPerf.default 627 627 1:1
CheckboxMinimalPerf.default 2681 2689 1:1
DatepickerMinimalPerf.default 5326 5316 1:1
EmbedMinimalPerf.default 4041 4027 1:1
FlexMinimalPerf.default 280 281 1:1
ImageMinimalPerf.default 367 366 1:1
MenuButtonMinimalPerf.default 1591 1597 1:1
PopupMinimalPerf.default 582 582 1:1
TableManyItemsPerf.default 1852 1848 1:1
CustomToolbarPrototype.default 3718 3730 1:1
ToolbarMinimalPerf.default 908 907 1:1
TreeMinimalPerf.default 784 781 1:1
AlertMinimalPerf.default 256 258 0.99:1
AttachmentSlotsPerf.default 1047 1059 0.99:1
DropdownManyItemsPerf.default 656 661 0.99:1
InputMinimalPerf.default 1239 1246 0.99:1
LayoutMinimalPerf.default 355 357 0.99:1
ListNestedPerf.default 536 544 0.99:1
RosterPerf.default 1131 1138 0.99:1
ProviderMinimalPerf.default 945 956 0.99:1
SliderMinimalPerf.default 1506 1517 0.99:1
SplitButtonMinimalPerf.default 3662 3695 0.99:1
TextMinimalPerf.default 335 338 0.99:1
TooltipMinimalPerf.default 982 988 0.99:1
AttachmentMinimalPerf.default 146 149 0.98:1
StatusMinimalPerf.default 644 655 0.98:1
DividerMinimalPerf.default 335 345 0.97:1
RadioGroupMinimalPerf.default 427 442 0.97:1
TableMinimalPerf.default 388 399 0.97:1
ButtonSlotsPerf.default 522 542 0.96:1
AccordionMinimalPerf.default 144 151 0.95:1
SegmentMinimalPerf.default 326 343 0.95:1
VideoMinimalPerf.default 600 629 0.95:1

@chrisdholt chrisdholt merged commit ac8bc50 into microsoft:master Jul 16, 2021
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/web-components@v1.2.1 has been released which incorporates this pull request.:tada:

Handy links:

PeterDraex pushed a commit to PeterDraex/fluentui that referenced this pull request Aug 6, 2021
…yles. (microsoft#18982)

* ignore prettier for all styles files due to incorrect selector breaks introduced to template literals

* Change files
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.

5 participants