add Cmd/Ctrl+Shift+F shortcut to toggle focus mode - #6209
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review. WalkthroughThe memo editor adds an optional Suggested reviewers: Merge Risk: ⚪ Minimal · up to This PR adds a keyboard shortcut for toggling focus mode, with no actionable merge-blocking risk remaining beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR adds an in-editor Cmd/Ctrl+Shift+F shortcut that invokes the existing focus-mode transition without modifying memo content.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable issues identified. The new key bindings reach the existing focus-mode handler through a ref-backed callback, current production callers always provide that callback, and tests cover both modifier variants while confirming memo content remains unchanged.
|
| Filename | Overview |
|---|---|
| web/src/components/MemoEditor/Editor/extensions.ts | Adds both Meta-Shift-F and Ctrl-Shift-F bindings ahead of standard editor keymaps and marks handled events as consumed. |
| web/src/components/MemoEditor/Editor/index.tsx | Uses the existing ref-backed callback pattern so the stable CodeMirror instance invokes the latest focus-mode handler. |
| web/src/components/MemoEditor/components/EditorContent.tsx | Forwards the optional focus-mode callback through the React-to-CodeMirror boundary. |
| web/src/components/MemoEditor/index.tsx | Connects the keyboard shortcut to the existing focus-mode transition handler. |
| web/tests/editor-keys.test.ts | Verifies both modifier variants invoke the callback once without changing editor content. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Key[Cmd/Ctrl + Shift + F] --> CodeMirror[CodeMirror keymap]
CodeMirror --> Editor[Editor callback ref]
Editor --> Content[EditorContent callback]
Content --> MemoEditor[MemoEditor focus-mode handler]
MemoEditor --> State[Toggle focus-mode state]
Reviews (1): Last reviewed commit: "feat(editor): add Cmd/Ctrl+Shift+F short..." | Re-trigger Greptile
Closes #6105.