Skip to content

Button: Adding back block, circular, disabledFocusable and outline props and making some styling fixes#18563

Merged
layershifter merged 17 commits intomicrosoft:masterfrom
khmakoto:buttonBlock
Jul 9, 2021
Merged

Button: Adding back block, circular, disabledFocusable and outline props and making some styling fixes#18563
layershifter merged 17 commits intomicrosoft:masterfrom
khmakoto:buttonBlock

Conversation

@khmakoto
Copy link
Member

@khmakoto khmakoto commented Jun 15, 2021

Pull request checklist

Description of changes

This PR does a couple of things:

  • Adds back the block, circular, disabledFocusable and outline props to the Button component and all its variants.
  • Fixes cursor styling for disabled Buttons.
  • Makes some styling fixes to iconOnly CompoundButtons.
  • Fixes the focus indicator for primary Buttons.
  • Adds a couple of missing and new visual regression tests.
  • Adds some missing state management for the disabledFocusable prop in the Link component.

@size-auditor
Copy link

size-auditor bot commented Jun 15, 2021

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-components-CompoundButton 29.946 kB 31.409 kB ExceedsTolerance     1.463 kB
office-ui-fabric-react fluentui-react-components-ToggleButton 35.42 kB 36.393 kB ExceedsBaseline     973 bytes
office-ui-fabric-react fluentui-react-components-Button 25.194 kB 25.967 kB ExceedsBaseline     773 bytes
office-ui-fabric-react fluentui-react-components-MenuButton 26.78 kB 27.552 kB ExceedsBaseline     772 bytes
office-ui-fabric-react fluentui-react-components-Link 14.708 kB 14.715 kB ExceedsBaseline     7 bytes

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

Baseline commit: a01de06788d167cf7303980683ec0f8a894d0dc9 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 15, 2021

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 781 772 5000
BaseButton mount 875 869 5000
Breadcrumb mount 2581 2533 1000
ButtonNext mount 496 517 5000
Checkbox mount 1456 1435 5000
CheckboxBase mount 1218 1243 5000
ChoiceGroup mount 4538 4585 5000
ComboBox mount 969 935 1000
CommandBar mount 9812 9799 1000
ContextualMenu mount 6114 6143 1000
DefaultButton mount 1126 1097 5000
DetailsRow mount 3693 3653 5000
DetailsRowFast mount 3658 3695 5000
DetailsRowNoStyles mount 3455 3456 5000
Dialog mount 2127 2087 1000
DocumentCardTitle mount 138 152 1000
Dropdown mount 3187 3143 5000
FluentProviderNext mount 7062 7121 5000
FocusTrapZone mount 1748 1707 5000
FocusZone mount 1768 1749 5000
IconButton mount 1650 1688 5000
Label mount 333 311 5000
Layer mount 1730 1726 5000
Link mount 461 458 5000
MakeStyles mount 1784 1782 50000
MenuButton mount 1433 1402 5000
MessageBar mount 1947 2013 5000
Nav mount 3200 3250 1000
OverflowSet mount 1002 1015 5000
Panel mount 2081 2076 1000
Persona mount 792 831 1000
Pivot mount 1400 1393 1000
PrimaryButton mount 1253 1270 5000
Rating mount 7547 7444 5000
SearchBox mount 1291 1291 5000
Shimmer mount 2448 2473 5000
Slider mount 1932 1912 5000
SpinButton mount 4876 4954 5000
Spinner mount 413 424 5000
SplitButton mount 3122 3085 5000
Stack mount 480 497 5000
StackWithIntrinsicChildren mount 1516 1529 5000
StackWithTextChildren mount 4538 4451 5000
SwatchColorPicker mount 10148 10048 5000
Tabs mount 1399 1403 1000
TagPicker mount 2395 2396 5000
TeachingBubble mount 11748 11847 5000
Text mount 408 413 5000
TextField mount 1338 1366 5000
ThemeProvider mount 1193 1187 5000
ThemeProvider virtual-rerender 591 592 5000
Toggle mount 778 784 5000
buttonNative mount 113 110 5000

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
AccordionMinimalPerf.default 144 131 1.1:1
ChatDuplicateMessagesPerf.default 292 272 1.07:1
ImageMinimalPerf.default 375 350 1.07:1
AvatarMinimalPerf.default 196 185 1.06:1
PortalMinimalPerf.default 184 175 1.05:1
TextMinimalPerf.default 348 332 1.05:1
TextAreaMinimalPerf.default 499 473 1.05:1
RadioGroupMinimalPerf.default 430 414 1.04:1
TableMinimalPerf.default 412 397 1.04:1
ToolbarMinimalPerf.default 939 903 1.04:1
DialogMinimalPerf.default 754 734 1.03:1
HeaderMinimalPerf.default 358 346 1.03:1
ListCommonPerf.default 614 597 1.03:1
ListWith60ListItems.default 631 611 1.03:1
AlertMinimalPerf.default 262 257 1.02:1
ButtonOverridesMissPerf.default 1665 1635 1.02:1
ButtonSlotsPerf.default 529 521 1.02:1
CheckboxMinimalPerf.default 2687 2625 1.02:1
DropdownManyItemsPerf.default 677 661 1.02:1
DropdownMinimalPerf.default 3084 3038 1.02:1
HeaderSlotsPerf.default 742 727 1.02:1
LayoutMinimalPerf.default 357 349 1.02:1
SkeletonMinimalPerf.default 338 331 1.02:1
GridMinimalPerf.default 329 326 1.01:1
SliderMinimalPerf.default 1549 1536 1.01:1
CustomToolbarPrototype.default 3760 3741 1.01:1
TreeMinimalPerf.default 776 767 1.01:1
BoxMinimalPerf.default 335 334 1:1
CarouselMinimalPerf.default 441 440 1:1
DividerMinimalPerf.default 356 356 1:1
EmbedMinimalPerf.default 4038 4041 1:1
FlexMinimalPerf.default 280 281 1:1
FormMinimalPerf.default 389 390 1:1
PopupMinimalPerf.default 557 559 1:1
ProviderMergeThemesPerf.default 1628 1620 1:1
ProviderMinimalPerf.default 980 978 1:1
IconMinimalPerf.default 611 609 1:1
AnimationMinimalPerf.default 396 398 0.99:1
AttachmentSlotsPerf.default 1033 1048 0.99:1
ChatMinimalPerf.default 623 632 0.99:1
InputMinimalPerf.default 1219 1229 0.99:1
ItemLayoutMinimalPerf.default 1174 1182 0.99:1
ListNestedPerf.default 534 537 0.99:1
MenuMinimalPerf.default 813 821 0.99:1
MenuButtonMinimalPerf.default 1509 1524 0.99:1
SegmentMinimalPerf.default 329 332 0.99:1
SplitButtonMinimalPerf.default 3626 3665 0.99:1
TooltipMinimalPerf.default 948 959 0.99:1
TreeWith60ListItems.default 173 175 0.99:1
CardMinimalPerf.default 528 540 0.98:1
DatepickerMinimalPerf.default 5135 5265 0.98:1
LoaderMinimalPerf.default 659 671 0.98:1
TableManyItemsPerf.default 1830 1867 0.98:1
VideoMinimalPerf.default 596 608 0.98:1
ListMinimalPerf.default 480 497 0.97:1
RosterPerf.default 1117 1151 0.97:1
RefMinimalPerf.default 228 235 0.97:1
StatusMinimalPerf.default 643 663 0.97:1
AttachmentMinimalPerf.default 151 158 0.96:1
ChatWithPopoverPerf.default 342 357 0.96:1
LabelMinimalPerf.default 366 380 0.96:1
ReactionMinimalPerf.default 344 363 0.95:1
ButtonMinimalPerf.default 148 163 0.91:1

@khmakoto khmakoto changed the title Button: Adding back block prop Button: Adding back block, circular, disabledFocusable and outline props and making some styling fixes Jun 16, 2021
Copy link
Contributor

@smhigley smhigley 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 couple comments that you can decide whether you want to address or not. Otherwise, this looks good to me!

@khmakoto khmakoto requested a review from a team as a code owner July 8, 2021 19:43
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 8, 2021

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 252ded0:

Sandbox Source
Fluent UI Button Configuration
codesandbox-react-template Configuration
codesandbox-react-northstar-template Configuration

@khmakoto khmakoto enabled auto-merge (squash) July 8, 2021 19:59
@khmakoto khmakoto disabled auto-merge July 8, 2021 20:42
@layershifter layershifter merged commit 394b16b into microsoft:master Jul 9, 2021
@khmakoto khmakoto deleted the buttonBlock branch July 9, 2021 18:04
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-link@v9.0.0-alpha.55 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-button@v9.0.0-alpha.57 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-examples@v8.34.3 has been released which incorporates this pull request.:tada:

Handy links:

TristanWatanabe added a commit to TristanWatanabe/fluentui that referenced this pull request Jul 14, 2021
PeterDraex pushed a commit to PeterDraex/fluentui that referenced this pull request Aug 6, 2021
…ops and making some styling fixes (microsoft#18563)

* Clean git history.

* Button: Adding back block prop.

* Change files

* Change files

* Removing unused change files.

* Button: Adding disabledFocusable and outline props back to button.

* Adding vr tests.

* Change files

* Using theme value for circular styling.

* Adding checkedOutline styles to ToggleButton.

* Removing unwanted onClick callback in Button stories.

* Addressing PR feedback.

* Reverting prettier update.

* Reverting prettier update.

* Reverting prettier update.
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