Skip to content

Add a find bar to to the source and assembly views. - #6413

Open
mstange wants to merge 1 commit into
firefox-devtools:mainfrom
mstange:push-tutzmrslszzs
Open

mstange wants to merge 1 commit into
firefox-devtools:mainfrom
mstange:push-tutzmrslszzs

Conversation

@mstange

@mstange mstange commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Main | Deploy preview

Fixes #6412.

This uses @codemirror/search to add a find bar to the editor views. The find bar opens with Ctrl/Cmd+F while the editor has focus.

The assembly view now shares the source view's code viewer extension, which also makes it focusable. Without focus, the search keybinding wouldn't reach it.

Fixes firefox-devtools#6412.

This uses @codemirror/search to add a find bar to the editor views.
The find bar opens with Ctrl/Cmd+F while the editor has focus.

The assembly view now shares the source view's code viewer extension,
which also makes it focusable. Without focus, the search keybinding
wouldn't reach it.
@mstange
mstange removed the request for review from canova October 21, 2026 20:12
@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.78%. Comparing base (7892c63) to head (7bd576a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6413   +/-   ##
=======================================
  Coverage   84.78%   84.78%           
=======================================
  Files         358      358           
  Lines       38946    38946           
  Branches    11019    11033   +14     
=======================================
  Hits        33022    33022           
  Misses       5488     5488           
  Partials      436      436           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fatadel fatadel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR! I left one comment below. In addition, I think we also need to handle better the Esc key behavior. Currently, it closes the whole panel while searching in the full-screen mode.

// the editor has focus. The replace controls are hidden because the editor
// is read-only.
search({ top: true }),
keymap.of(searchKeymap),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

searchKeymap binds more than find. It also includes Mod-Alt-G (gotoLine), Mod-D (selectNextOccurrence) and Mod-Shift-L (selectSelectionMatches).

gotoLine won't work properly because the counting of the line numbers differes.
selectNextOccurrence takes over the browser's bookmark shortcut.

Would it be better if we bind only the find-related entries?

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.

Can't search in source view

2 participants