Skip to content

Move find to browser feature contribution#303562

Merged
kycutler merged 3 commits intomainfrom
kycutler/findfeature
Mar 20, 2026
Merged

Move find to browser feature contribution#303562
kycutler merged 3 commits intomainfrom
kycutler/findfeature

Conversation

@kycutler
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 20, 2026 17:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BrowserEditorFindContribution feature that owns the find widget lifecycle and registers find-related actions/keybindings.
  • Removes the old browserFindWidget.ts and deletes find actions from browserViewActions.ts, wiring the feature in via browserView.contribution.ts.
  • Renames the main top bar CSS/DOM class from browser-toolbar to browser-navbar and 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];
	}

@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 20, 2026
@kycutler kycutler marked this pull request as ready for review March 20, 2026 20:15
@kycutler kycutler enabled auto-merge (squash) March 20, 2026 20:15
@vs-code-engineering
Copy link
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jruales

Matched files:

  • src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserFindWidget.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserView.contribution.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserViewActions.ts
  • src/vs/workbench/contrib/browserView/electron-browser/features/browserEditorFindFeature.ts
  • src/vs/workbench/contrib/browserView/electron-browser/media/browser.css

@kycutler kycutler merged commit 71b6237 into main Mar 20, 2026
19 checks passed
@kycutler kycutler deleted the kycutler/findfeature branch March 20, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants