microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.03k stars 2.69k forks source link

[Feature]: Keep hover selection on L1 menu item when hovering on L2 (submenu) menu items #31840

Open abhpande09 opened 5 days ago

abhpande09 commented 5 days ago

Library

React Components / v9 (@fluentui/react-components)

Describe the feature that you would like added

When hovering on submenu items (L2 Menu) the hover selection on parent Menu (L1 Menu) should stay as is.

Sharing a snapshot of the existing behavior in V9 Menus (notice no hover selection is there on Insert Menu Item)- image

Sharing a snapshot of what the desired behavior should be like (notice hover selection is there on Insert Menu Item)- image

Have you discussed this feature with our team

ling1726

Additional context

No response

Validations

Priority

Normal

ling1726 commented 4 days ago

This can already be achieved by controlling stete and applying css overrides. Will need to follow up with design to make sure that this is desirable for v9

smhigley commented 10 hours ago

@abhpande09 here's an example of overriding our default styles to keep hover styles when the submenu is expanded: https://stackblitz.com/edit/qyp5zv?file=src%2Fexample.tsx

Would that work for your use case?