Repository navigation
🐛 Fixed settings routes not hiding the outer admin sidebar - #29596
jatinder14 wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe settings route now sets Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ 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 |
bbe85ac to
0987c6d
Compare
fixes TryGhost/Ghost#26607 - Settings is a full-screen surface; without hideAdminSidebar the shell nav stayed mounted so Editors saw a visible-but-dead sidebar (and its member-count hooks kept running under the settings portal) Co-authored-by: Cursor <[email protected]>
no ref The new assertion passed without the route change: it checked for the absence of nav links immediately after rendering at /settings, before the shell had mounted them. Navigate in from / instead and poll the sidebar's DOM presence, which is red without the fix.
0987c6d to
befcc1d
Compare
|
@jatinder14 Hey, thanks for the PR! While this makes the screen usable, there's a dismount that happens from lazy loading the module that causes some stutter on first load of settings that's not ideal for users, and on top of that, exploring this issue further has unearthed some more complicated gaps in our route access handling. I'm going to take a pass at a more comprehensive fix there as that feels more appropriate than this approach. |
|
Thanks for the clear feedback on the lazy-load remount stutter, and for the route-access pass in #29653. I opened a follow-up that keeps your access guard and only fills the remaining Editor gap (settings still left the outer shell sidebar under the portal): #29718 Difference from this PR: AdminLayout keeps AppSidebar mounted and collapses via SidebarProvider instead of unmounting on the route toggle, so the first settings visit should not remount the nav tree while the settings chunk loads. |
|
Correction on the link above: the follow-up is #29660 (not 29718). |
Summary
settings/*did not sethideAdminSidebar: true, so the outer admin shell sidebar stayed mounted underneath.useMemberCountis already permission-gated onmain; this PR fixes the remaining settings-route sidebar visibility hole.fixes #26607
Test plan
pnpm exec vitest run src/layout/sidebar-visibility.test.tsx(3 passed)pnpm test:acceptance src/layout/sidebar.acceptance.test.tsx(17 passed, including new settings-route assertion)#/settings/staff→ confirm outer admin sidebar is hidden and no “browse members” toast from the shell nav