fluentui
fluentui copied to clipboard
fix: Make Menu openOnHover prop work again
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
📊 Bundle size report
| Package & Exports | Baseline (minified/GZIP) | PR | Change |
|---|---|---|---|
| react-components react-components: Accordion, Button, FluentProvider, Image, Menu, Popover |
188.672 kB52.359 kB |
188.689 kB52.37 kB |
17 B 11 B |
| react-menu Menu (including children components) |
116.572 kB35.778 kB |
116.589 kB35.777 kB |
17 B -1 B |
| react-menu Menu (including selectable components) |
119.641 kB36.297 kB |
119.658 kB36.296 kB |
17 B -1 B |
Unchanged fixtures
| Package & Exports | Size (minified/GZIP) |
|---|---|
| react-components react-components: FluentProvider & webLightTheme |
33.394 kB11.007 kB |
| react-portal-compat PortalCompatProvider |
5.851 kB1.964 kB |
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 |
Asset size changes
Size Auditor did not detect a change in bundle size for any component!
Baseline commit: 3f105cca41d951f161edbb90be116565311e72d1 (build)
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 |
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 😱😱
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)
@ling1726 @bsunderhus I've added a cypress e2e test.

