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

DetailsList: Remove unnecessary styles #13540

Merged
merged 3 commits into from Jun 11, 2020
Merged

Conversation

phkuo
Copy link
Contributor

@phkuo phkuo commented Jun 9, 2020

Pull request checklist

Description of changes

Removes some styles that do nothing for the list. See attached workitem.

@msft-github-bot
Copy link
Contributor

msft-github-bot commented Jun 10, 2020

Perf Analysis

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 728 705 5000
ButtonNext mount 347 355 5000
Checkbox mount 1344 1315 5000
CheckboxBase mount 1082 1059 5000
CheckboxNext mount 1317 1404 5000
ChoiceGroup mount 4227 3998 5000
ComboBox mount 861 766 1000
CommandBar mount 6393 6399 1000
ContextualMenu mount 11230 11020 1000
DefaultButton mount 935 888 5000
DetailsRow mount 2893 3042 5000
DetailsRowFast mount 3120 2896 5000
DetailsRowNoStyles mount 2790 2748 5000
Dialog mount 1221 1248 1000
DocumentCardTitle mount 1459 1450 1000
Dropdown mount 2046 2230 5000
FocusZone mount 1450 1444 5000
IconButton mount 1506 1457 5000
Label mount 286 285 5000
Link mount 416 412 5000
LinkNext mount 420 410 5000
MenuButton mount 1177 1229 5000
Nav mount 2688 2736 1000
Panel mount 1228 1170 1000
Persona mount 703 730 1000
Pivot mount 1147 1160 1000
PivotNext mount 1142 1122 1000
PrimaryButton mount 1031 1045 5000
SearchBox mount 1219 1096 5000
Slider mount 1258 1265 5000
SliderNext mount 1591 1605 5000
Spinner mount 374 340 5000
SplitButton mount 2571 2542 5000
Stack mount 402 456 5000
StackWithIntrinsicChildren mount 1556 1642 5000
StackWithTextChildren mount 4124 4120 5000
TagPicker mount 2367 2383 5000
Text mount 333 333 5000
TextField mount 1165 1145 5000
ThemeProvider mount 2370 2309 5000
ThemeProvider virtual-rerender 439 419 5000
Toggle mount 741 739 5000
ToggleNext mount 721 721 5000
button mount 99 81 5000

Perf Analysis (Fluent)

Perf comparison
Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🎯 Avatar.Fluent 0.38 0.4 0.95:1 2000 751
🦄 Button.Fluent 0.09 0.15 0.6:1 5000 461
🔧 Checkbox.Fluent 0.49 0.27 1.81:1 1000 489
🎯 Dialog.Fluent 0.12 0.17 0.71:1 5000 587
🔧 Dropdown.Fluent 2.73 0.37 7.38:1 1000 2731
🔧 Icon.Fluent 0.11 0.04 2.75:1 5000 558
🦄 Image.Fluent 0.06 0.09 0.67:1 5000 286
🔧 Slider.Fluent 1.3 0.26 5:1 1000 1304
🔧 Text.Fluent 0.06 0.02 3:1 5000 296
🦄 Tooltip.Fluent 0.08 14.67 0.01:1 5000 406

🔧 Needs work     🎯 On target     🦄 Amazing

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ButtonSlotsPerf.default 545 484 1.13:1
SegmentMinimalPerf.default 296 263 1.13:1
ButtonMinimalPerf.default 147 133 1.11:1
CardMinimalPerf.default 468 420 1.11:1
HeaderSlotsPerf.default 654 601 1.09:1
FlexMinimalPerf.default 247 229 1.08:1
LayoutMinimalPerf.default 369 341 1.08:1
TreeWith60ListItems.default 180 168 1.07:1
ChatWithPopoverPerf.default 379 359 1.06:1
ListCommonPerf.default 819 774 1.06:1
IconMinimalPerf.default 531 500 1.06:1
Avatar.Fluent 751 711 1.06:1
ListMinimalPerf.default 387 368 1.05:1
ListNestedPerf.default 726 690 1.05:1
TableMinimalPerf.default 309 295 1.05:1
TextAreaMinimalPerf.default 385 368 1.05:1
AnimationMinimalPerf.default 507 487 1.04:1
TextMinimalPerf.default 287 276 1.04:1
ImageMinimalPerf.default 312 302 1.03:1
PortalMinimalPerf.default 93 90 1.03:1
RefMinimalPerf.default 181 175 1.03:1
StatusMinimalPerf.default 554 536 1.03:1
TooltipMinimalPerf.default 612 592 1.03:1
TreeMinimalPerf.default 708 690 1.03:1
ChatMinimalPerf.default 475 464 1.02:1
DropdownMinimalPerf.default 2973 2929 1.02:1
FormMinimalPerf.default 318 311 1.02:1
HierarchicalTreeMinimalPerf.default 329 322 1.02:1
MenuButtonMinimalPerf.default 1011 989 1.02:1
CustomToolbarPrototype.default 3247 3173 1.02:1
Checkbox.Fluent 489 480 1.02:1
Dialog.Fluent 587 578 1.02:1
Image.Fluent 286 281 1.02:1
AlertMinimalPerf.default 224 222 1.01:1
AvatarMinimalPerf.default 394 390 1.01:1
DialogMinimalPerf.default 582 574 1.01:1
DropdownManyItemsPerf.default 1242 1228 1.01:1
LoaderMinimalPerf.default 665 660 1.01:1
PopupMinimalPerf.default 219 216 1.01:1
ProviderMergeThemesPerf.default 1771 1755 1.01:1
ProviderMinimalPerf.default 711 701 1.01:1
GridMinimalPerf.default 555 556 1:1
ItemLayoutMinimalPerf.default 1075 1077 1:1
LabelMinimalPerf.default 332 333 1:1
Button.Fluent 461 461 1:1
Dropdown.Fluent 2731 2724 1:1
ChatDuplicateMessagesPerf.default 329 332 0.99:1
DividerMinimalPerf.default 300 303 0.99:1
RadioGroupMinimalPerf.default 343 346 0.99:1
SliderMinimalPerf.default 1282 1290 0.99:1
TableManyItemsPerf.default 1734 1760 0.99:1
AttachmentSlotsPerf.default 934 952 0.98:1
BoxMinimalPerf.default 286 293 0.98:1
CheckboxMinimalPerf.default 2363 2399 0.98:1
InputMinimalPerf.default 845 864 0.98:1
Tooltip.Fluent 406 418 0.97:1
CarouselMinimalPerf.default 354 367 0.96:1
HeaderMinimalPerf.default 276 288 0.96:1
ReactionMinimalPerf.default 305 317 0.96:1
SplitButtonMinimalPerf.default 2755 2862 0.96:1
ToolbarMinimalPerf.default 719 747 0.96:1
Slider.Fluent 1304 1354 0.96:1
ListWith60ListItems.default 896 943 0.95:1
Text.Fluent 296 310 0.95:1
MenuMinimalPerf.default 696 743 0.94:1
AccordionMinimalPerf.default 104 114 0.91:1
AttachmentMinimalPerf.default 105 115 0.91:1
Icon.Fluent 558 623 0.9:1
EmbedMinimalPerf.default 1552 1753 0.89:1
VideoMinimalPerf.default 447 506 0.88:1

@size-auditor
Copy link

size-auditor bot commented Jun 10, 2020

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react office-ui-fabric-react-ShimmeredDetailsList 222.33 kB 222.253 kB BelowBaseline     -77 bytes
office-ui-fabric-react fluentui-react-next-ShimmeredDetailsList 222.33 kB 222.253 kB BelowBaseline     -77 bytes
office-ui-fabric-react fluentui-react-next-DetailsList 211.617 kB 211.54 kB BelowBaseline     -77 bytes
office-ui-fabric-react office-ui-fabric-react-DetailsList 211.617 kB 211.54 kB BelowBaseline     -77 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 52da3b627c30777bfc11db0b87f68494c6a6a86a (build)

@msft-github-bot
Copy link
Contributor

Hello @phkuo!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msft-github-bot) and give me an instruction to get started! Learn more here.

@paulgildea
Copy link
Member

paulgildea commented Jun 10, 2020

Just being cautious here, but any time we usually touch styling that has the potential to break others - especially if are changing/removing behavior.

Do folks have an idea of how impactful these changes are?

@phkuo phkuo removed the AutoMerge label Jun 10, 2020
@phkuo
Copy link
Contributor Author

phkuo commented Jun 11, 2020

@paulgildea Yes I understand the concern. We do have several visual regression tests in place here in FluentUI run as part of the PR. I've been playing around with these changes in SharePoint in different lists to verify that there won't be regressions for the big big lists there.

I've also consulted Thomas, who has more experience than me in this feature area. He's actually piloted removing the pixel-based in-width from the header already, and can confirm that it works as expected.

Regarding the removal of the background, that'd actually be buggy if anyone were taking advantage of it.

@@ -218,7 +217,6 @@ export class DetailsHeaderBase extends React.Component<IDetailsHeaderBaseProps,
ref={this._onRootRef}
onMouseMove={this._onRootMouseMove}
data-automationid="DetailsHeader"
style={{ minWidth: rowWidth }}
direction={FocusZoneDirection.horizontal}
Copy link
Member

Choose a reason for hiding this comment

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

I think this will shrink the header to a smaller width than rows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it does not in my testing, because each column has a width set anyways
i've been testing with column resize as well
i'm honestly not sure why rowWidth exists in the first place if each field's width needs to be calculated individually anyways
@ThomasMichon any thoughts?

@dzearing dzearing merged commit ce15e35 into microsoft:master Jun 11, 2020
@phkuo phkuo deleted the phkuo/listCss branch June 11, 2020 22:52
@msft-github-bot
Copy link
Contributor

🎉office-ui-fabric-react@v7.120.0 has been released which incorporates this pull request.:tada:

Handy links:

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.

DetailsList styles clean-up
7 participants