fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

fix: Make Menu openOnHover prop work again

Open behowell opened this issue 3 years ago • 5 comments

Current Behavior

Regression from the refactoring in PR https://github.com/microsoft/fluentui/pull/24562, Menu no longer respects the openOnHover prop.

New Behavior

Use the openOnHover prop in Menu again. It defaults to isSubmenu but can be overridden.

Related Issue(s)

  • Fixes #24841

behowell avatar Sep 21 '22 23:09 behowell

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
188.672 kB
52.359 kB
188.689 kB
52.37 kB
17 B
11 B
react-menu
Menu (including children components)
116.572 kB
35.778 kB
116.589 kB
35.777 kB
17 B
-1 B
react-menu
Menu (including selectable components)
119.641 kB
36.297 kB
119.658 kB
36.296 kB
17 B
-1 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: FluentProvider & webLightTheme
33.394 kB
11.007 kB
react-portal-compat
PortalCompatProvider
5.851 kB
1.964 kB
🤖 This report was generated against 3f105cca41d951f161edbb90be116565311e72d1

fabricteam avatar Sep 21 '22 23:09 fabricteam

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 0baf43c1c532e3173e90da4c61314e6e5888c334:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration
wonderful-lake-fc3oi8 Issue #24841

codesandbox-ci[bot] avatar Sep 21 '22 23:09 codesandbox-ci[bot]

Asset size changes

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

Baseline commit: 3f105cca41d951f161edbb90be116565311e72d1 (build)

size-auditor[bot] avatar Sep 21 '22 23:09 size-auditor[bot]

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1305 1320 5000
Button mount 953 949 5000
FluentProvider mount 1691 1566 5000
FluentProviderWithTheme mount 643 634 10
FluentProviderWithTheme virtual-rerender 589 593 10
FluentProviderWithTheme virtual-rerender-with-unmount 636 629 10
MakeStyles mount 1897 1895 50000
SpinButton mount 2550 2575 5000

fabricteam avatar Sep 21 '22 23:09 fabricteam

Nice catch, and thx for the fix @behowell . Do you mind adding a cypress e2e test for this ? I'm quite surprised no test failed during the original refactor 😱😱

ling1726 avatar Sep 22 '22 07:09 ling1726

We caught this in Loop with a Jest JSDOM test, so that would also work (I don't know what's standard for your repo, however)

NotWoods avatar Sep 22 '22 17:09 NotWoods

@ling1726 @bsunderhus I've added a cypress e2e test.

behowell avatar Sep 22 '22 19:09 behowell