[go: nahoru, domu]

Skip to content
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

feat!: Add context menu options for workspace comments #8035

Merged
merged 5 commits into from
Apr 17, 2024

Conversation

BeksOmega
Copy link
Collaborator
@BeksOmega BeksOmega commented Apr 15, 2024

The basics

The details

Resolves

Fixes #8005

Proposed Changes

Makes it so that context menu options can be registered to apply to workspace comments. To support one option that creates a workspace comments at the click position, I also had to pass the original right click event to all of the callbacks.

Also upgrades the old workspace comments context menu options to work with the "new" (several years old at this point :P ) context menu system.

Test Coverage

Manually tested that context menu options work.

Documentation

N/A

Additional Information

N/A

Breaking changes / To fix

Removes the commentDuplicate, commentDelete, and workspaceCommentOption exports from Blockly.ContextMenu. Instead you can call registerCommentDuplicate, registerCommentDelete, and registerCommentCreate on Blockly.ContextMenuItems respectively. Note that these don't return LegacyContextMenuOption objects. Instead they register the context menu options as a side effect using the non-legacy system.

You can also call Blockly.ContextMenuItems.registerCommentOptions to register all three options at once.

@BeksOmega BeksOmega requested a review from gonfunko April 15, 2024 22:57
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: feature Adds a feature labels Apr 15, 2024
@BeksOmega BeksOmega marked this pull request as ready for review April 15, 2024 23:00
@BeksOmega BeksOmega requested a review from a team as a code owner April 15, 2024 23:00
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: feature Adds a feature and removed PR: feature Adds a feature breaking change Used to mark a PR or issue that changes our public APIs. labels Apr 15, 2024
@BeksOmega BeksOmega mentioned this pull request Apr 17, 2024
1 task
core/contextmenu_items.ts Outdated Show resolved Hide resolved
core/contextmenu_items.ts Show resolved Hide resolved
core/contextmenu_items.ts Show resolved Hide resolved
core/contextmenu_items.ts Outdated Show resolved Hide resolved
core/comments/rendered_workspace_comment.ts Show resolved Hide resolved
@BeksOmega BeksOmega merged commit e21bb99 into google:rc/v11.0.0 Apr 17, 2024
6 checks passed
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: feature Adds a feature and removed PR: feature Adds a feature breaking change Used to mark a PR or issue that changes our public APIs. labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Used to mark a PR or issue that changes our public APIs. PR: feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants