From 8351f535ace6577e9a5a1a171f51e36505a12588 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:02:05 -0400 Subject: [PATCH] docs: use "id" instead of "label" for positions (#41859) Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Cedrik Ewers --- docs/api/menu-item.md | 8 ++++---- docs/api/menu.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/api/menu-item.md b/docs/api/menu-item.md index ad74bb57e68..3ad0c8e87cc 100644 --- a/docs/api/menu-item.md +++ b/docs/api/menu-item.md @@ -38,18 +38,18 @@ See [`Menu`](menu.md) for examples. `Menu.buildFromTemplate`. * `id` string (optional) - Unique within a single menu. If defined then it can be used as a reference to this item by the position attribute. - * `before` string[] (optional) - Inserts this item before the item with the specified label. If + * `before` string[] (optional) - Inserts this item before the item with the specified id. If the referenced item doesn't exist the item will be inserted at the end of the menu. Also implies that the menu item in question should be placed in the same “group” as the item. - * `after` string[] (optional) - Inserts this item after the item with the specified label. If the + * `after` string[] (optional) - Inserts this item after the item with the specified id. If the referenced item doesn't exist the item will be inserted at the end of the menu. * `beforeGroupContaining` string[] (optional) - Provides a means for a single context menu to declare the placement of their containing group before the containing group of the item - with the specified label. + with the specified id. * `afterGroupContaining` string[] (optional) - Provides a means for a single context menu to declare the placement of their containing group after the containing group of the item - with the specified label. + with the specified id. **Note:** `acceleratorWorksWhenHidden` is specified as being macOS-only because accelerators always work when items are hidden on Windows and Linux. The option is exposed to users to give them the option to turn it off, as this is possible in native macOS development. diff --git a/docs/api/menu.md b/docs/api/menu.md index 860eb7e8d6f..9be1eedb39d 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -336,16 +336,16 @@ browser windows. You can make use of `before`, `after`, `beforeGroupContaining`, `afterGroupContaining` and `id` to control how the item will be placed when building a menu with `Menu.buildFromTemplate`. -* `before` - Inserts this item before the item with the specified label. If the +* `before` - Inserts this item before the item with the specified id. If the referenced item doesn't exist the item will be inserted at the end of the menu. Also implies that the menu item in question should be placed in the same “group” as the item. -* `after` - Inserts this item after the item with the specified label. If the +* `after` - Inserts this item after the item with the specified id. If the referenced item doesn't exist the item will be inserted at the end of the menu. Also implies that the menu item in question should be placed in the same “group” as the item. * `beforeGroupContaining` - Provides a means for a single context menu to declare - the placement of their containing group before the containing group of the item with the specified label. + the placement of their containing group before the containing group of the item with the specified id. * `afterGroupContaining` - Provides a means for a single context menu to declare - the placement of their containing group after the containing group of the item with the specified label. + the placement of their containing group after the containing group of the item with the specified id. By default, items will be inserted in the order they exist in the template unless one of the specified positioning keywords is used.