Skip to content

Conversation

@rpbourret
Copy link
Collaborator

The basics

The details

Resolves

v12 made two major changes to context menus:

  • Added a focusedNode property to the scope argument
  • Added support for separators

The codelab also was inconsistent in its use of the terms item/registry item (the thing in the registry) and menu option (the thing in the context menu).

Proposed Changes

In the codelab doc:

  • Remove scopeType and replace uses of scopeType with scope.focusedNode
  • Remove the section Scope/Block scope; restricting menu options to blocks is now illustrated in the Precondition: Node type section.
  • Add a section on Separators
  • Clarify/clean up uses of item and option.
  • Minor formatting cleanup. (Copied code is now indented properly for pasting.)

In the codelab code:

  • Update starter-code/index.js and complete-code/index.js accordingly.

Reason for Changes

Current codelab is not up to date.

Test Coverage

Tested by hand.

Documentation

PR includes documentation fixes.

Additional Information

@rpbourret rpbourret requested a review from a team as a code owner October 22, 2025 21:48
@rpbourret rpbourret requested review from gonfunko and removed request for a team October 22, 2025 21:48
@rpbourret rpbourret closed this Oct 23, 2025
@rpbourret
Copy link
Collaborator Author

Closed due to incorrect base.

@rpbourret rpbourret deleted the contextmenu branch October 23, 2025 19:05
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

Successfully merging this pull request may close these issues.

2 participants