fix(web): INSPECT toggle follows panel's dock edge (right or bottom)#133
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
WalkthroughCanvas containers in ChangesCanvas-Relative Bookmark Tab Layout
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
User feedback: the previous attempt (hoist tab to outer flex container so it stays on the screen's right edge regardless of dock side) made things worse — the tab overlapped the bottom-docked panel's content and never indicated where the panel actually was. Real desired behavior: the toggle sits flush against the panel's leading edge wherever the panel docks. - inspectorSide === 'right' -> vertical tab on canvas's right edge - inspectorSide === 'bottom' -> horizontal tab on canvas's bottom edge Implementation: - Extends BookmarkTab edge prop to 'left' | 'right' | 'bottom'. For 'bottom' the tab renders horizontally (height 24, minWidth 76) with a horizontal label and an up/down arrow (^/v) that points toward the panel-open direction. - Picks the right edge value at the call site from inspectorSide. - Tab stays inside <main> (canvas-relative), so it tracks the canvas's shrinking edge as the panel resizes. - zIndex restored to 1001 — the tab no longer overlaps the panel. Applied symmetrically to App.tsx (local) and AppFragment.tsx (Pages). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
16b43e8 to
dce50d9
Compare
Summary
This PR was force-pushed after author feedback — the prior implementation hoisted the right
BookmarkTabto the screen's right edge, but that made things worse (toggle overlapped the bottom-docked panel and never indicated where the panel actually was).Real desired behavior: the toggle sits flush against the panel's leading edge wherever the panel docks.
inspectorSide'right''bottom'Changes
DataInspectionPanel.tsx— extendsBookmarkTabedgeprop from'left' | 'right'to'left' | 'right' | 'bottom'. For'bottom', the tab renders horizontally (height: 24; minWidth: 76) with a horizontal label and an up/down arrow (▴/▾) that points toward the panel-open direction. zIndex back to1001since the tab no longer overlaps the panel.App.tsx+AppFragment.tsx— pick the rightedgevalue at the call site frominspectorSide.Test plan
▴when closed (clicking opens panel upward into canvas),▾when open (clicking sends panel back down).cd packages/web && npm run buildpasses.🤖 Generated with Claude Code