Skip to content

<Fabric> element does not affect global button styling.#9076

Merged
jdhuntington merged 1 commit intomicrosoft:masterfrom
jdhuntington:fix-button-global-styling
May 20, 2019
Merged

<Fabric> element does not affect global button styling.#9076
jdhuntington merged 1 commit intomicrosoft:masterfrom
jdhuntington:fix-button-global-styling

Conversation

@jdhuntington
Copy link
Copy Markdown
Contributor

@jdhuntington jdhuntington commented May 13, 2019

Pull request checklist

Description of changes

<Fabric> performed a global style reset of <button> in order to fix #3691 . This change reduces that scope of reset to elements within a <Fabric> element.

Note that packages/office-ui-fabric-react/src/components/Fabric/Fabric.styles.ts is the only code change; all other modified files are snapshots.

Microsoft Reviewers: Open in CodeFlow

@msft-github-bot
Copy link
Copy Markdown
Contributor

msft-github-bot commented May 13, 2019

Component perf results:

Scenario Target branch avg total (ms) PR avg total (ms) Target branch avg per item (ms) PR avg per item (ms) Is significant change Is regression
PrimaryButton 73.766 76.795 0.738 0.768 false false
BaseButton 29.263 30.942 0.293 0.309 false false
NewButton 105.939 106.172 1.059 1.062 false false
button 4.843 4.846 0.048 0.048 false false
DetailsRows without styles 166.768 167.293 1.668 1.673 false false
DetailsRows 191.610 192.755 1.916 1.928 false false
Toggles 45.243 45.547 0.452 0.455 false false
NewToggle 65.503 65.164 0.655 0.652 false false
DocumentCardTitle with truncation 23.866 24.227 0.239 0.242 false false

@size-auditor
Copy link
Copy Markdown

size-auditor bot commented May 13, 2019

Bundle test Size (minified) Diff from master
MessageBar 175.036 kB ExceedsBaseline     2 bytes
Pickers 259.362 kB ExceedsBaseline     2 bytes
Dropdown 215.311 kB ExceedsBaseline     2 bytes
DocumentCard 197.405 kB ExceedsBaseline     2 bytes
SearchBox 172.088 kB ExceedsBaseline     2 bytes
SelectedItemsList 209.787 kB ExceedsBaseline     2 bytes
Dialog 194.13 kB ExceedsBaseline     2 bytes
CommandBar 185.564 kB ExceedsBaseline     2 bytes
ComboBox 223.784 kB ExceedsBaseline     2 bytes
SpinButton 178.379 kB ExceedsBaseline     2 bytes
Panel 184.105 kB ExceedsBaseline     2 bytes
TeachingBubble 180.054 kB ExceedsBaseline     2 bytes
Button 177.479 kB ExceedsBaseline     2 bytes
Breadcrumb 184.084 kB ExceedsBaseline     2 bytes
FloatingPicker 220.552 kB ExceedsBaseline     2 bytes
Facepile 193.774 kB BelowBaseline     -39 bytes
Nav 174.639 kB BelowBaseline     -39 bytes
Pivot 173.633 kB BelowBaseline     -39 bytes
SwatchColorPicker 179.358 kB BelowBaseline     -39 bytes
Grid 168.303 kB BelowBaseline     -39 bytes
Persona 113.499 kB BelowBaseline     -48 bytes
Tooltip 88.762 kB BelowBaseline     -48 bytes
KeytipLayer 102.384 kB BelowBaseline     -48 bytes
Callout 83.354 kB BelowBaseline     -48 bytes
Keytip 79.53 kB BelowBaseline     -48 bytes
HoverCard 99.005 kB BelowBaseline     -48 bytes
PersonaCoin 113.499 kB BelowBaseline     -48 bytes
Coachmark 97.505 kB BelowBaseline     -48 bytes
Fabric 39.555 kB BelowBaseline     -48 bytes
ShimmeredDetailsList 225.95 kB BelowBaseline     -48 bytes
ContextualMenu 148.95 kB BelowBaseline     -48 bytes
DatePicker 203.63 kB BelowBaseline     -48 bytes
DetailsList 214.952 kB BelowBaseline     -48 bytes
Modal 93.755 kB BelowBaseline     -48 bytes
PositioningContainer 76.573 kB BelowBaseline     -48 bytes
Layer 49.231 kB BelowBaseline     -48 bytes

ExceedsTolerance  Exceeds Tolerance     ExceedsBaseline  Exceeds Baseline     BelowBaseline  Below Baseline     1 kB = 1000 bytes

@Vitalius1
Copy link
Copy Markdown
Contributor

@jdhuntington screener is showing a visible change to the Calendar. Might be worth investigating before merging. Nothing else changed so it's probably something specific only to Calendar.

@jdhuntington
Copy link
Copy Markdown
Contributor Author

Looks like the specificity of the selector caused by this change is going to cause more problems down the road. Going to try another approach.

@Vitalius1
Copy link
Copy Markdown
Contributor

@jdhuntington there is a PR (#9037) dealing with the exact same issue. Which one needs to be kept open?

@jdhuntington jdhuntington force-pushed the fix-button-global-styling branch from 14ab063 to f5e6054 Compare May 14, 2019 23:46
@hoovercj
Copy link
Copy Markdown
Member

@Vitalius1 I opened #9037 only as a reference. I have now closed it in favor of this pull request.

@hoovercj
Copy link
Copy Markdown
Member

Looks like the specificity of the selector caused by this change is going to cause more problems down the road. Going to try another approach.

@jdhuntington - there was a comment in the initial PR by @micahgodbolt regarding specificity issues of different solutions.

@msft-github-bot
Copy link
Copy Markdown
Contributor

Hello @jdhuntington!

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 and give me an instruction to get started! Learn more here.

Copy link
Copy Markdown
Member

@khmakoto khmakoto left a comment

Choose a reason for hiding this comment

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

Left a little comment but otherwise LGTM 👍

{
"packageName": "@uifabric/experiments",
"comment": "<Fabric> element does not affect global button styling.",
"type": "minor"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't these be of type patch since this is not changing the API surface?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think minor is appropriate as it will affect global styles for anyone that uses the <Fabric> element.

@jdhuntington jdhuntington merged commit 2bbb305 into microsoft:master May 20, 2019
@msft-github-bot
Copy link
Copy Markdown
Contributor

🎉@uifabric/experiments@v6.77.0 has been released which incorporates this pull request.:tada:

Handy links:

@msft-github-bot
Copy link
Copy Markdown
Contributor

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

Handy links:

@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global styles applied to "button" SplitButton: In Safari, the SplitButton has mismatched heights

10 participants