Feat/5896 | Add Focus Mode button in MemoHeader#5915
Feat/5896 | Add Focus Mode button in MemoHeader#5915Moustafaa91 wants to merge 4 commits intousememos:mainfrom
Conversation
Co-authored-by: Copilot <copilot@github.com>
📝 WalkthroughWalkthroughAdds optional focus-mode support: Changes
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/src/components/MemoView/MemoView.tsx`:
- Around line 40-43: The openEditor callback uses Boolean(isFocusMode) which
relies on coercion; change it to an explicit equality check so only true sets
focus mode: in the openEditor function (which calls setShowEditorFocusMode and
setShowEditor) replace Boolean(isFocusMode) with isFocusMode === true to make
intent explicit and avoid accidental truthy values when openEditor is forwarded
or reassigned.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0f7c3420-d4b2-4da5-90e9-e3602e1f80b9
📒 Files selected for processing (5)
web/src/components/MemoEditor/index.tsxweb/src/components/MemoEditor/types/components.tsweb/src/components/MemoView/MemoView.tsxweb/src/components/MemoView/MemoViewContext.tsxweb/src/components/MemoView/components/MemoHeader.tsx
Closes #5896