Skip to content

Can we give menuitems a default command? #1326

@domfarolino

Description

@domfarolino

When working on #1324, I noticed that lots of code examples had repetitive command="show-menu" attributes:

Image

It's annoying to have to write this, and it feels unnecessarily repetitive and verbose. In reality, when you're using a <menuitem> with a commandfor attribute, you're probably using it to open another sub-menu. And when you're not, you'll need to specify the command anyways. So can we just make show-menu the "default command" for these elements? You can manually set command when you want to override this, but otherwise you won't have to provide it to get the normal sub-menu-invoking behavior, which seems pretty sensible to me.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    menuMenu elements proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions