iTwin / iTwinUI

A design system for building beautiful and well-working web interfaces.
https://itwin.github.io/iTwinUI/
MIT License
92 stars 35 forks source link

Layered Dropdown Menu #2001

Open rohan-kadkol opened 2 weeks ago

rohan-kadkol commented 2 weeks ago

Changes

WIP

Creating this draft PR with my exploration steps. Once I realize the full scope of this task, will most likely be splitting this PR into smaller PRs.

Testing

Docs

mayank99 commented 2 weeks ago

Before we get too far down this rabbithole, I just want to remind/note that this needs to be a generic pattern that shouldn't be tied to DropdownMenu. There are valid cases for a "sliding" panel that can be triggered by any arbitrary button within an InformationPanel or SideNavigation (submenu) or an AppUI widget.

Some other important requirements:

It might be tricky to come up with the right abstraction for this, but that's part of the exploration work.

mayank99 commented 1 week ago

Sharing this example from Firefox as an inspiration. It's basically a multi-level popover (rather than a menu).

I like the subtle animation and I like that it moves focus (although it's questionable that the focus is so far down the second screen. I think it should be on the back button instead).

https://github.com/iTwin/iTwinUI/assets/9084735/3d3c2a5f-b5b0-47ea-b0a0-c83ce50658eb