debt - inline context menu contribution into windows#269672
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR inlines the context menu contribution functionality directly into the window classes rather than using a separate contribution module. The context menu visibility state management is moved from a dedicated contribution class into the base window class.
Key changes:
- Removes the standalone context menu contribution module and its registration
- Integrates context menu event handling directly into the BaseWindow class
- Updates constructor signatures to inject required services
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/workbench/workbench.common.main.ts | Removes import of context menu contribution module |
| src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.ts | Deletes the entire context menu contribution class and registration |
| src/vs/workbench/browser/window.ts | Adds context menu event handling logic to BaseWindow class and updates constructor |
| src/vs/workbench/electron-browser/window.ts | Updates NativeWindow constructor to pass required services to parent |
|
|
||
| //#endregion | ||
|
|
||
| private registerFullScreenListeners(targetWindowId: number): void { |
There was a problem hiding this comment.
[nitpick] The registerFullScreenListeners method was moved to the end of the class. This breaks the logical grouping with the related initialization code that calls it in the constructor. Consider keeping it closer to the constructor or other initialization methods.
benibenj
approved these changes
Oct 3, 2025
This file contains hidden or 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
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.
No description provided.