Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Allow a location option when adding menu items #6270

@jessegrosjean

Description

@jessegrosjean

Right now when you add menu items they get inserted at the bottom of the specified menu. I would like to have some optional way to the specify a location when inserting menu items. From what I can tell this isn't possible now. Is anyone working on this already? If not and I create a solution what are the chances that I can get it merged into Atom?

My basic design would follow how I think Eclipse solves this problem. Haven't actually used Eclipse for years, but I think the basic idea is: Give each item an optional "location" attribute that's used to determine where the item is inserted relative to existing item IDs in the menu.

The ID of existing menu items would be an "ID" attribute if found, otherwise it would fallback to using "label", though that's problematic if menus will ever be localized.

The set of locations specifiers would be:

location="top" - The item will be inserted at the top of the menu.

location="bottom" - The item will be inserted at the bottom of the menu.

location="before:id" - The item will be inserted before the existing item with matching ID.

location="after:id" - The item will be inserted after the existing item with matching ID.

location="endof:id" - The item will be inserted at the end of the separator group with matching ID. (this means it will be inserted right before the next separator group starts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions