Skip to content

feat(codemirror): add search / replace support#992

Merged
perber merged 2 commits into
mainfrom
feature/codemirror-search-replace
May 14, 2026
Merged

feat(codemirror): add search / replace support#992
perber merged 2 commits into
mainfrom
feature/codemirror-search-replace

Conversation

@perber
Copy link
Copy Markdown
Owner

@perber perber commented May 12, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 12, 2026 16:24
Copy link
Copy Markdown
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 adds CodeMirror search/replace support to the LeafWiki Markdown editor, including keyboard shortcuts, theme styling for the search UI, and E2E coverage to guard expected behavior.

Changes:

  • Add @codemirror/search and enable search panels/keybindings in MarkdownCodeEditor.
  • Add a dedicated replace-panel shortcut (Ctrl+H) and style the search/replace panel to match app theming.
  • Update global hotkey handling to avoid interfering with CodeMirror’s search panel; add Playwright tests for replace-all and Escape behavior.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ui/leafwiki-ui/src/features/editor/useToolbarActions.tsx Refactors where the editor-focus shouldHandle helper is defined for hotkeys.
ui/leafwiki-ui/src/features/editor/MarkdownCodeEditor.tsx Enables CodeMirror search/replace, adds replace-panel shortcut, search keymap, and panel styling.
ui/leafwiki-ui/src/components/HotKeyHandler.tsx Skips global hotkeys when CodeMirror search UI is handling keys.
ui/leafwiki-ui/package.json Adds @codemirror/search dependency.
ui/leafwiki-ui/package-lock.json Locks @codemirror/search dependency resolution.
e2e/tests/page.spec.ts Adds E2E tests for search/replace and Escape behavior.
e2e/pages/EditPage.ts Adds page-object helpers to open/operate the search/replace panel.
Files not reviewed (1)
  • ui/leafwiki-ui/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/leafwiki-ui/src/components/HotKeyHandler.tsx Outdated
@perber perber force-pushed the feature/codemirror-search-replace branch 3 times, most recently from 99c9bc8 to bc50643 Compare May 14, 2026 11:41
@perber perber force-pushed the feature/codemirror-search-replace branch from bc50643 to cf955e1 Compare May 14, 2026 11:42
@perber perber merged commit 57ede9e into main May 14, 2026
6 checks passed
@perber perber deleted the feature/codemirror-search-replace branch May 14, 2026 12:10
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.

2 participants