feat(editor): add Markdown formatting shortcuts - #6258
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 (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughAdded keyboard shortcuts for inline formatting, code blocks, paragraphs, headings, ordered lists, bullet lists, and task lists. Extracted formatting command dispatch into the exported Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change adds localized Markdown keyboard shortcuts to the editor and reuses the existing formatting path. 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: Docstring CoverageExplanation Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. (1 skipped: 1 unsupported.)
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 cross-platform Markdown formatting shortcuts to the CodeMirror editor by extracting and reusing the toolbar’s formatting dispatcher.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness or security issues identified. The dispatcher refactor preserves existing toolbar behavior, and the new keymap routes each documented shortcut through that same live-editor formatting path with regression coverage.
|
| Filename | Overview |
|---|---|
| web/src/components/MemoEditor/Editor/extensions.ts | Adds prioritized formatting key bindings that delegate to the shared formatting command implementation. |
| web/src/components/MemoEditor/Editor/formatting.ts | Extracts the existing toolbar command dispatch logic into a reusable function without changing command behavior. |
| web/tests/editor-keys.test.ts | Adds end-to-end keyboard coverage for every new formatting shortcut and the Mod-I precedence case. |
| web/src/components/MemoEditor/README.md | Documents the new editor formatting shortcuts and their keymap precedence. |
Sequence Diagram
sequenceDiagram
participant U as User
participant K as CodeMirror keymap
participant F as Formatting dispatcher
participant D as Markdown document
participant S as Editor state
U->>K: Press formatting shortcut
K->>F: runFormattingCommand(view, command)
F->>D: Apply Markdown edit
D->>S: Emit document update
S-->>U: Refresh editor and toolbar state
Reviews (1): Last reviewed commit: "feat(editor): add Markdown formatting sh..." | Re-trigger Greptile
Summary
Mod-Iapplies italic instead of CodeMirror default behaviorTest plan
cd web && pnpm lintcd web && pnpm testgit diff --checkCloses #6253.
Supersedes #6254 and #6255; those competing PRs can be closed in favor of this implementation.