-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Add "Copy As..." core submenu to editor context and Edit titlebar menu #118212
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joaomoreno
changed the title
Add "Copy As..." submenu to editor context and Edit titlebar menu
Add "Copy As..." core submenu to editor context and Edit titlebar menu
Mar 5, 2021
jrieken
reviewed
Mar 5, 2021
sbatten
reviewed
Mar 5, 2021
src/vs/workbench/electron-sandbox/parts/titlebar/menubarControl.ts
Outdated
Show resolved
Hide resolved
sbatten
reviewed
Mar 5, 2021
sbatten
approved these changes
Mar 8, 2021
@joaomoreno please verify with |
Pushed changes which differentiate between editor context and titlebar edit, introduced |
jrieken
approved these changes
Mar 15, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to have a core
editor/context/copy
menu so extensions can contribute menu items to aCopy As...
context menu. We want the menu available in the titlebarEdit
menu as well.We want the submenu to render only if it has items inside. This is the default behavior already implemented in the editor context menu. But it wasn't for the titlebar menu. I spent nearly half an hour looking for the right places to make the titlebar menu behave the same way. I found out that we duplicate code not only between the usual menu world and the titlebar world but even between native and custom titlebars... (see both
menubarControl.ts
files changed) We have so much different code that translates menus into something usable, and none are easy to find. Could we please have a debt item to clean all of this up @bpasero and @sbatten?Adding @jrieken as well for review, for an API eye.
Fixes #118208
cc @alexr00 and @eamodio for adoption once this gets merged in