Open adrientetar opened 1 year ago
Thanks, we'll discuss this with the team.
@m-sasha have any update on the discussion?
I apologize for taking a long time; we were busy with M1 and Kotlinconf. And now our team lead is on vacation, so unfortunately it'll take a little longer.
Hi. So, these suggestions are good, but right now we're focusing on other issues for the desktop. We should, however, add material3 soon-ish, which should address some of the requests here. And of course, we will get to polishing our context menu APIs some time.
In the meantime, I've put together a library that adds quite a bit of this missing functionality (icons, dividers, sub-menus, styling, etc): https://github.com/dzirbel/compose-material-context-menu. I hope this can cover most use cases until the team can dedicate time toward the builtin representation.
I also ran into a few limitations along the way, which I'll raise in a separate issue for discussion.
a simple modifier in context menu and a composable function to ContextMenuItem would be awesome! It lacks customization and that rect shape looks terrible😅
Right now, only the colors of DefaultContextMenuRepresentation can be customized. It would be nice to be able to customize the margins and text size etc. of both the menu and the menu items.
modifier
parameter applied to the Column inner composable.Right now, it's not possible to display an icon or a keyboard shortcut in the menu. It is spec'ed in Material Design context menus, though:![image](https://user-images.githubusercontent.com/1250894/224387674-ffa351d4-3dbb-43a0-9894-b2fb0275771f.png)
Right now, it's not possible to add a divider to a context menu (and customize divider styling), see #1357
Right now, it's not possible to have a disabled menu item
Right now, it's not possible to add an item with a submenu
Styling: