Block context menu improvements for keyboard users#698
Conversation
📝 WalkthroughWalkthroughAdds a new "H" keyboard shortcut to toggle the floating block toolbar, with corresponding shortcuts-help entry and locale translations across nine languages. Extends the toolbar with a Move hint badge, reworks pointer/keyboard state coordination, simplified-toolbar visibility logic, and positioning to exclude child blocks, plus a supporting CSS rule. ChangesBlock Toolbar Keyboard Toggle and Move Hint
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ui/contextmenu.js`:
- Around line 906-928: The simplified toolbar logic in updateSimplifiedToolbar()
and showBlockToolbar() does not hide viewBtn when isLooseAndMovable(block) is
true, so detached in-transit blocks still show View alongside the intended
minimal actions. Update the toolbar visibility rules to gate viewBtn on the
simplified state as well, and make sure the later mesh-based visibility setup in
showBlockToolbar() does not overwrite that decision; use the existing symbols
isLooseAndMovable, updateSimplifiedToolbar, viewBtn, and showBlockToolbar to
locate the fix.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 713f707e-fd1e-46eb-905e-01c9e1f91ab1
📒 Files selected for processing (11)
accessibility/keyboardui.jslocale/de.jslocale/en.jslocale/es.jslocale/fr.jslocale/it.jslocale/pl.jslocale/pt.jslocale/sv.jsstyle.cssui/contextmenu.js
Summary
When keyboard controls are in use
M) and delete (Del). The eye button should NOT show when the block is unattached.Mto move the block, the toolbar hides so you can see what you are doingH(for hint) - the same as clicking on the block with a mouseIn all modes
AI usage
Claude Sonnet 4.6 was used throughout, everything planned checked and individually approved by a human.
Summary by CodeRabbit
New Features
Bug Fixes