fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

fix: add type=button to button slots in react-link, react-accordion, and react-tabs

Open smhigley opened this issue 3 years ago • 4 comments

Related to #23334, I noticed that the accordion buttons were submitting a form when nested within one.

This PR adds type="button" by default to all button slots in react-components that don't already have type defined.

smhigley avatar Aug 10 '22 19:08 smhigley

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 4d5b7ab9453d6ab0028dd4bf0372ead644527847:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

codesandbox-ci[bot] avatar Aug 10 '22 19:08 codesandbox-ci[bot]

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-accordion
Accordion (including children components)
79.485 kB
24.082 kB
79.499 kB
24.09 kB
14 B
8 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
188.604 kB
51.784 kB
188.618 kB
51.787 kB
14 B
3 B
react-link
Link
12.197 kB
4.912 kB
12.231 kB
4.925 kB
34 B
13 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: FluentProvider & webLightTheme
32.688 kB
10.736 kB
🤖 This report was generated against 5d985fac3569513a2808a9f3b93ad73907325e55

fabricteam avatar Aug 10 '22 19:08 fabricteam

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1146 1186 5000
Button mount 924 847 5000
FluentProvider mount 1503 1424 5000
FluentProviderWithTheme mount 570 556 10
FluentProviderWithTheme virtual-rerender 522 537 10
FluentProviderWithTheme virtual-rerender-with-unmount 569 566 10
MakeStyles mount 1708 1699 50000
SpinButton mount 2364 2318 5000

fabricteam avatar Aug 10 '22 19:08 fabricteam

Asset size changes

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

Baseline commit: 5d985fac3569513a2808a9f3b93ad73907325e55 (build)

size-auditor[bot] avatar Aug 10 '22 19:08 size-auditor[bot]