Move find to browser feature contribution#303562
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the integrated Browser View “find in page” implementation by moving it out of the core BrowserEditor/browserViewActions and into a dedicated feature contribution, aligning it with the existing electron-browser/features/* architecture.
Changes:
- Introduces a new
BrowserEditorFindContributionfeature that owns the find widget lifecycle and registers find-related actions/keybindings. - Removes the old
browserFindWidget.tsand deletes find actions frombrowserViewActions.ts, wiring the feature in viabrowserView.contribution.ts. - Renames the main top bar CSS/DOM class from
browser-toolbartobrowser-navbarand adjusts layout injection to support contribution-provided toolbar elements.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/browserView/electron-browser/media/browser.css | Renames toolbar styling to navbar and adjusts find widget wrapper styling (removes find-visible rule). |
| src/vs/workbench/contrib/browserView/electron-browser/features/browserEditorFindFeature.ts | Adds the new find feature contribution, find widget implementation, and registers related actions/keybindings. |
| src/vs/workbench/contrib/browserView/electron-browser/browserViewActions.ts | Removes find actions and drops find-related imports from browserEditor. |
| src/vs/workbench/contrib/browserView/electron-browser/browserView.contribution.ts | Wires the new find feature into the browser view contribution entrypoint. |
| src/vs/workbench/contrib/browserView/electron-browser/browserFindWidget.ts | Deletes the previous standalone find widget implementation. |
| src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts | Moves find widget wiring to contribution-driven toolbar insertion; adds contribution APIs (toolbarElements, layout), renames toolbar to navbar, and exposes layoutBrowserContainer() for contributions. |
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/browserView/electron-browser/features/browserEditorFindFeature.ts:240
- Doc comment says the find widget container is inserted "below the toolbar", but the editor now uses a
.browser-navbar(and the base contribution API refers to "navbar"). Consider updating this comment to match the current terminology so future readers can find the right DOM location.
/**
* The container element to insert below the toolbar.
*/
override get toolbarElements(): readonly HTMLElement[] {
return [this._findWidgetContainer];
}
src/vs/workbench/contrib/browserView/electron-browser/features/browserEditorFindFeature.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/browserView/electron-browser/features/browserEditorFindFeature.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts
Outdated
Show resolved
Hide resolved
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @jrualesMatched files:
|
jruales
approved these changes
Mar 20, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.