Repository navigation
Added a navigation seam over the settings routing provider - #29762
Conversation
- settings is the last consumer of the deprecated admin-x-framework RoutingProvider; replacing it requires touching every navigation call site, so this routes all of them through one settings-local hook first - useSettingsNavigation() is a pass-through to useRouting() today; the router swap happens inside the hook without touching call sites again - contract note for the swap: same-path navigation must stay history-entry-free (sidebar re-click re-scrolls via the routeChange event without pushing an entry)
WalkthroughAdded Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 6m 11s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-08-05 13:48:06 UTC
…29763) ref #29762 `SettingsModal` (shade) and `PreviewModalContent` (settings) could only close through NiceModal's `modal.remove()` — and `useModal()` throws when a component mounts outside a NiceModal context. That blocks mounting settings modals as route elements, which the upcoming router swap needs.

First step toward native settings routing. Settings is the last consumer of the deprecated
admin-x-frameworkRoutingProvider; replacing it means touching every navigation call site, so this PR routes them all through one settings-local seam first — the upcoming router swap then happens inside a single hook without touching screen call sites again.What changed
useSettingsNavigation()inapps/admin/src/settings/app/hooks/use-settings-navigation.ts— a pass-through to the framework'suseRouting()(sameroute/updateRoute/loadingModalsurface).useRouting()now call the seam instead (143updateRoutecall sites). No behavior change by construction: the hook delegates to the same provider.RoutingProvidermount inapp.tsx,settings-router.tsx'suseRouteChangeCallback(the same-path re-scroll consumer), and the type-onlyRoutingModalPropsimports.Contract the seam preserves for the swap: same-path navigation stays history-entry-free — a sidebar re-click re-scrolls via the
routeChangeevent without pushing a history entry.Verification
tsc -b, full lint cleaneventTargetfield has zero consumers in the settings tree