-
Notifications
You must be signed in to change notification settings - Fork 662
docs: Update context menu codelab for v12 (re-try) #2621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Update context menu codelab for v12 (re-try) #2621
Conversation
maribethb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly some suggestions you should feel free to push back on, but you will have to decide one way or the other about the workspace comment bit.
maribethb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor wording quibble
| }; | ||
| ``` | ||
|
|
||
| Notice that the code tests for where context menus are allowed, rather than where they are not allowed. This is because custom code (such as a plugin) can add context menus to any Blockly component that can be focused. Thus, testing for what something isn't may result in allowing context menus on more components than you anticipated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thus, testing for what something isn't
How about... Thus, testing for specific types rather than allowing all (or all but certain types) will ensure that context menus are not shown on more components than you anticipated.
I'm not sure if that's actually better. If you don't like that, maybe putting isn't in italics would help make it read the appropriate emphasis?
The basics
The details
Resolves
v12 made two major changes to context menus:
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:
In the codelab code:
Reason for Changes
Current codelab is not up to date.
Test Coverage
Tested by hand.
Documentation
PR includes documentation fixes.
Additional Information