Prevent gizmos from being overlapped at narrow widths#693
Conversation
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR introduces narrow-layout detection to reconfigure keyboard shortcut area mappings and switch the ShortcutsPanel between docked and modal presentation, complete with backdrop, ARIA dialog attributes, focus trapping, and Escape handling. It also adds a bottom bar "Flock XR" home link integrated into tab order, adjusts canvas resizing to account for the fixed bottom bar, changes info panel display handling in design mode, and updates supporting CSS for narrow/portrait layouts and the new modal. ChangesNarrow-layout accessibility and bottom bar changes
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant ShortcutsPanel
participant DOM
User->>ShortcutsPanel: open panel (narrow layout)
ShortcutsPanel->>ShortcutsPanel: enterModal()
ShortcutsPanel->>DOM: reparent to document.body
ShortcutsPanel->>DOM: add backdrop + ARIA dialog + close button
ShortcutsPanel->>DOM: inert rest of page, trap Tab focus
User->>ShortcutsPanel: press Escape or backdrop click
ShortcutsPanel->>ShortcutsPanel: exitModal()
ShortcutsPanel->>DOM: restore original dock location
ShortcutsPanel->>DOM: remove backdrop, revert inert, clean up listeners
ShortcutsPanel->>DOM: restore focus to visible tab button
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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
🧹 Nitpick comments (1)
main/input.js (1)
85-85: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated toggle/link selector array.
The
['#canvasToggleBtn', '#codeToggleBtn', '#bottombar-flocklink']array is now duplicated verbatim in both the canvas-mode and code-mode branches. If a future item is added to the bottom bar's tab order, it's easy to update one branch and forget the other.♻️ Proposed fix: extract shared selector list
+ const BOTTOM_BAR_SELECTORS = ['`#canvasToggleBtn`', '`#codeToggleBtn`', '`#bottombar-flocklink`']; + if (inNarrowMode && !inCodeMode) { - ['`#canvasToggleBtn`', '`#codeToggleBtn`', '`#bottombar-flocklink`'].forEach((sel) => + BOTTOM_BAR_SELECTORS.forEach((sel) => pushUnique(document.querySelector(sel)) ); } ... if (inCodeMode) { - ['`#canvasToggleBtn`', '`#codeToggleBtn`', '`#bottombar-flocklink`'].forEach((sel) => + BOTTOM_BAR_SELECTORS.forEach((sel) => pushUnique(document.querySelector(sel)) ); }Also applies to: 190-190
🤖 Prompt for 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. In `@main/input.js` at line 85, The selector list for the bottom bar toggle/link elements is duplicated in both the canvas-mode and code-mode branches. Extract the shared ['`#canvasToggleBtn`', '`#codeToggleBtn`', '`#bottombar-flocklink`'] list into a single reusable constant or helper in the relevant module, and use it from both branches so updates only need to be made once.
🤖 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 `@accessibility/keyboardui.js`:
- Around line 871-873: The exit path in `exitModal()` is restoring the panel to
a tabpanel but leaving the `aria-labelledby` added by `enterModal()` behind.
Update the `panel` cleanup in `exitModal()` to remove the `aria-labelledby`
attribute together with `shortcuts-modal`, `role`, and `aria-modal`, so the
docked panel no longer retains the dialog label reference after closing.
---
Nitpick comments:
In `@main/input.js`:
- Line 85: The selector list for the bottom bar toggle/link elements is
duplicated in both the canvas-mode and code-mode branches. Extract the shared
['`#canvasToggleBtn`', '`#codeToggleBtn`', '`#bottombar-flocklink`'] list into a
single reusable constant or helper in the relevant module, and use it from both
branches so updates only need to be made once.
🪄 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: 07508f85-59a3-4567-a215-34c732549c04
📒 Files selected for processing (5)
accessibility/keyboardui.jsindex.htmlmain/input.jsmain/view.jsstyle.css
Summary
Ctrl + /still usable) and show as a modalAI usage
Claude Opus 4.8 used throughout. Design decisions, code approval and testing done by a human.
Summary by CodeRabbit
New Features
Bug Fixes