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: Team Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe memo editor adds an optional Merge Risk: ⚪ Minimal · up to The PR adds a Cmd/Ctrl+Shift+F shortcut for toggling focus mode; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes implement the requirements in issue Full details: Out of Scope Changes checkExplanation The changes remain within scope. They update editor callback plumbing, register the requested shortcut, and add related tests. No unrelated API, storage, permission, deployment, or compatibility changes are present.
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
8c38d6b to
dcef418
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Closes #6105.