fix(sidebar): remove persistent scrollbar gutter on macOS#304
fix(sidebar): remove persistent scrollbar gutter on macOS#304Fldicoahkiin wants to merge 1 commit into
Conversation
- switch overflowY from `scroll` to `auto` so the gutter is no longer reserved when content fits - keep `scrollbar-gutter: stable` to preserve the Windows layout-shift fix from 3bc818e; on macOS overlay scrollbars the gutter width is 0 so it has no visible effect
✅ Deploy Preview for grand-selkie-225f87 canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA single-line change modifies ChangesSidebar Scrollbar Display
🎯 1 (Trivial) | ⏱️ ~1 minute
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a665700d2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -546,7 +546,7 @@ export default function AppSidebar() { | |||
| <Box | |||
There was a problem hiding this comment.
Drop the stable gutter when hiding idle scrollbars
In classic-scrollbar environments, scrollbar-gutter: stable immediately below this line still reserves scrollbar space for overflow: auto even when the sidebar content does not overflow, so changing only overflowY leaves the persistent blank gutter this fix is meant to remove. This still affects macOS users who have scrollbars set to always show, and other non-overlay scrollbar configurations; remove or conditionally disable the stable gutter when using auto.
Useful? React with 👍 / 👎.
Summary
overflowY: scroll强制始终显示滚动条,叠加scrollbar-gutter: stable后变成常驻白条overflowY从scroll改为auto;保留scrollbar-gutter: stable(macOS overlay 模式下 gutter 宽度为 0,无视觉影响;Windows 上仍可防止内容溢出时的 layout shift,沿用 3bc818e 的修复意图)触发场景
进入项目编辑模式后内容溢出,退出编辑模式后白条仍保留。修复后 macOS 上无任何状态会看到白条;Windows 行为不变。
Test plan
Summary by CodeRabbit