-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[experiments] Fluent UI submenus #1319
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
When you're focused on "5" and press left arrow, I expected to move to "4". Is that an example of what you're talking about here? Other notes:
|
Yep exactly, we could build it as a new feature in the Composite component. |
I will look into what changes we would need to do to fix these things without doing any library changes |
I was wrong initially on using Composition as we use It's going to require some changes in Floating UI as well, as seems like this is not a supported feature, see https://codesandbox.io/p/sandbox/morning-haze-ztpr88?file=%2Fsrc%2FDropdownMenu.tsx&workspaceId=ws_LCQafiBEJ7ynffHYRMAZL |
I investigated a bit the Floating UI repo and found the issue. When deciding on opening submenus/stepping inside etc, Floating UI uses the orientation of the submenu to decide whether it should open/step into instead of the orientation of the parent. This is why when those two are different it's behaving unexpectedly. I will talk with James to see if it makes sense to change this behavior and open a PR there. |
I've created PR on the Floating UI side: floating-ui/floating-ui#3199, I will test the changes here and see if everything work as expected, but this should fix all issues. @colmtuite you can check the behavior in the linked PR. |
Preview: https://deploy-preview-1319--base-ui.netlify.app/experiments/menu-fluent-ui
This PR includes two experiments:
For making the Grid like navigation possible, I needed to expor the Composite.* components. It took me some time to figure out that there is a cols prop that I can use to make the Composite behave like a bi-directional grid :) I think these components are awesome and we should export them so people can use them in their components too.
On the composite grids that have cols, we may need a different loop-behavior, looping trough rows/cols, vs looping trough all elements.