Skip to content

Conversation

@sopranopillow
Copy link
Contributor

Previous Behavior

DefaultButton has a margin set to 0 by default.

New Behavior

DefaultButton doesn't have a margin set to 0 by default.

For more detail on why the margin: 0 was added, see #25052. While it seems to be the correct fix, this caused a regression to Stack since the root style rule has the same specificity as the selector rule that stack uses for its childrenGap. This boils down to the following example.

Related Issue(s)

@size-auditor
Copy link

size-auditor bot commented Nov 22, 2022

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-TimePicker 225.98 kB 225.971 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-SwatchColorPicker 179.884 kB 179.875 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-TeachingBubble 193.689 kB 193.68 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-SpinButton 180.961 kB 180.952 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-DocumentCard 204.867 kB 204.858 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-SelectedItemsList 220.507 kB 220.498 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-ButtonGrid 170.192 kB 170.183 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Dropdown 220.451 kB 220.442 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Facepile 199.797 kB 199.788 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-FloatingPicker 230.063 kB 230.054 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-CommandBar 190.949 kB 190.94 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-ComboBox 237.039 kB 237.03 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Grid 170.192 kB 170.183 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Button 184.358 kB 184.349 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-SearchBox 177.063 kB 177.054 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Breadcrumb 189.918 kB 189.909 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-MessageBar 178.158 kB 178.149 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Nav 177.501 kB 177.492 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Panel 188.527 kB 188.518 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Pickers 279.607 kB 279.598 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Pivot 178.34 kB 178.331 kB BelowBaseline     -9 bytes
office-ui-fabric-react fluentui-react-Dialog 198.759 kB 198.75 kB BelowBaseline     -9 bytes

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

Baseline commit: 77b8194cfeefddf753b473be572233fc5defe186 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Nov 22, 2022

📊 Bundle size report

🤖 This report was generated against 77b8194cfeefddf753b473be572233fc5defe186

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 22, 2022

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 c724152:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration
adoring-napier-pgq5we Issue #25701

@fabricteam
Copy link
Collaborator

fabricteam commented Nov 22, 2022

🕵 fluentuiv8 Open the Visual Regressions report to inspect the 3 screenshots

✅ There was 0 screenshots added, 0 screenshots removed, 1036 screenshots unchanged, 0 screenshots with different dimensions and 3 screenshots with visible difference.

unknown 3 screenshots
Image Name Diff(in Pixels) Image Type
TagPicker.Root.chromium.png 141 Changed
TagPicker.Selected - RTL.chromium.png 141 Changed
TagPicker.Selected.chromium.png 141 Changed

@fabricteam
Copy link
Collaborator

fabricteam commented Nov 22, 2022

Perf Analysis (@fluentui/react)

Scenario Render type Master Ticks PR Ticks Iterations Status
CheckboxBase mount 2311 2638 5000 Possible regression
Dialog mount 4866 2963 1000 Possible regression
GroupedList virtual-rerender 1154 1393 2 Possible regression
OverflowSet mount 1661 1257 5000 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 1111 1158 5000
Breadcrumb mount 2767 2964 1000
Checkbox mount 2620 2567 5000
CheckboxBase mount 2311 2638 5000 Possible regression
ChoiceGroup mount 4135 4185 5000
ComboBox mount 1266 1162 1000
CommandBar mount 9294 9257 1000
ContextualMenu mount 12106 12287 1000
DefaultButton mount 1343 1392 5000
DetailsRow mount 3445 3504 5000
DetailsRowFast mount 3547 3419 5000
DetailsRowNoStyles mount 3286 3247 5000
Dialog mount 4866 2963 1000 Possible regression
DocumentCardTitle mount 538 535 1000
Dropdown mount 2927 3052 5000
FocusTrapZone mount 1915 1916 5000
FocusZone mount 1810 1920 5000
GroupedList mount 1818 2223 2
GroupedList virtual-rerender 1154 1393 2 Possible regression
GroupedList virtual-rerender-with-unmount 1656 1692 2
GroupedListV2 mount 659 571 2
GroupedListV2 virtual-rerender 549 548 2
GroupedListV2 virtual-rerender-with-unmount 571 565 2
IconButton mount 1912 1932 5000
Label mount 737 731 5000
Layer mount 4524 5096 5000
Link mount 840 753 5000
MenuButton mount 1627 1651 5000
MessageBar mount 2321 2183 5000
Nav mount 3221 3354 1000
OverflowSet mount 1661 1257 5000 Possible regression
Panel mount 2516 2460 1000
Persona mount 1190 1228 1000
Pivot mount 1645 1616 1000
PrimaryButton mount 1414 1512 5000
Rating mount 7012 9537 5000
SearchBox mount 1491 1480 5000
Shimmer mount 2879 2763 5000
Slider mount 2059 1984 5000
SpinButton mount 4733 4595 5000
Spinner mount 799 774 5000
SplitButton mount 3073 3112 5000
Stack mount 819 833 5000
StackWithIntrinsicChildren mount 2451 2374 5000
StackWithTextChildren mount 4858 4818 5000
SwatchColorPicker mount 10535 10494 5000
TagPicker mount 2699 2637 5000
TeachingBubble mount 97726 100988 5000
Text mount 765 758 5000
TextField mount 1554 1603 5000
ThemeProvider mount 1587 1460 5000
ThemeProvider virtual-rerender 1065 954 5000
ThemeProvider virtual-rerender-with-unmount 1973 2022 5000
Toggle mount 1041 1091 5000
buttonNative mount 516 507 5000

@sopranopillow sopranopillow merged commit e445a84 into microsoft:master Nov 23, 2022
@sopranopillow sopranopillow deleted the button/margin branch November 23, 2022 16:30
@idigra
Copy link

idigra commented Feb 15, 2023

This change reverted the fix for the original bug, leaving it unfixed (I actually discovered it the accidentally on our product). Are there any plans to re-fix the original bug?

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.

[Bug]: Regression - childrenGap on Stack with wrap breaks layout

5 participants