Skip to content
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

Enhanced 'MenuButton' component #2230

Closed
lbwexler opened this issue Dec 12, 2020 · 7 comments
Closed

Enhanced 'MenuButton' component #2230

lbwexler opened this issue Dec 12, 2020 · 7 comments
Assignees

Comments

@lbwexler
Copy link
Member

I was unable to figure out how to use the MenuButton component. It seems to have a very different API than what I would expect for a wrapped up control. In particular, it requires a Model be provided, rather just dropping in data for its items.

I understand that our Menu API is extremely mixed, but it would be nice if this control were a little simpler to drop in.

(Also could use a toolbox example of this)

@lbwexler
Copy link
Member Author

Update -- I see now that I need to actually place and render the menu myself. So the button really doesn't give me too much, other than a consistent way to render itself, and the little click handler to open the menu!

@TomTirapani
Copy link
Member

The comment kind of says it all:

Convenience Button preconfigured for use as a trigger for a dropdown menu operation.

We have a bunch of 'preconfigured' buttons like this, across desktop and mobile, which are simply there to offer a consistent way to render and a click handler (e.g. FeedbackButton, OptionsButton, LogoutButton)

@lbwexler
Copy link
Member Author

Yes, my bad for not remembering that and wasting time. But the other three are really appropriate to be just simple triggers and can stay like that. There is no other code needed.

Applications really need something like a MenuButton that takes arbitrary menu items and does the work for you of placement etc.! This is similar to our SplitButton project on Desktop, and could perhaps be folded in together in terms of adding something with consistent naming.

@lbwexler lbwexler changed the title Mobile MenuButton issues Need Enhanced 'MenuButton' component Dec 14, 2020
@TomTirapani
Copy link
Member

Definitely agree that a component that does the work of creating and placing the menu for you would be much better - I'll see what can be done!

@TomTirapani TomTirapani self-assigned this Dec 14, 2020
@TomTirapani TomTirapani mentioned this issue Dec 16, 2020
6 tasks
@amcclain amcclain changed the title Need Enhanced 'MenuButton' component Enhanced 'MenuButton' component Dec 17, 2020
@amcclain
Copy link
Member

Is this all specific to mobile? Note #1800 for earlier discussion from last spring about building a desktop MenuButton (as a more general / first-order add to support notion of a SplitButton).

@lbwexler
Copy link
Member Author

Tom and I discussed this in-detail, and I gave him a few minor suggestions. Some big points we agreed on:

  • We are going to have to live with the bifurcation between mobile/desktop menus and menuitems for a while, maybe long-term. But this change will really make a big step in the right direction.

  • We need general popover like support on mobile to support apps like the big client mobile app we are currently working on. This is a seperate (but critical) project, and Tom is going to make a ticket for that.

@lbwexler
Copy link
Member Author

lbwexler commented Jan 28, 2021

To answer your question ATM, we think it would be good to keep MenuButton API similar to what we think might be a SplitButton API, but no plans to make this cross-platform at this time (but eager to get your thoughts there)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants