Repository navigation
Added a consumer-controlled close path to the settings modal chrome - #29763
Conversation
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 7m 47s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin,@tr... |
✅ Succeeded | 4m 53s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 2m 37s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 23s | View ↗ |
nx run-many -t lint -p @tryghost/admin,@tryghos... |
✅ Succeeded | 2m 5s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 2m 5s | View ↗ |
nx run @tryghost/activitypub:test:acceptance |
✅ Succeeded | 47s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-08-04 20:46:20 UTC
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Walkthrough
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29763 +/- ##
=======================================
Coverage 75.55% 75.56%
=======================================
Files 1613 1613
Lines 142653 142668 +15
Branches 17617 17620 +3
=======================================
+ Hits 107787 107805 +18
+ Misses 33789 33788 -1
+ Partials 1077 1075 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- SettingsModal and PreviewModalContent could only close through NiceModal's modal.remove(), and useModal() throws when mounted outside a NiceModal context — which blocks mounting settings modals as route elements - an optional onClose prop now supersedes the NiceModal close path; without it the components render through a thin NiceModal bridge exactly as before - no consumer passes onClose yet, so behavior is unchanged
4408ba7 to
0735b3c
Compare

Second step toward native settings routing (follows #29762).
SettingsModal(shade) andPreviewModalContent(settings) could only close through NiceModal'smodal.remove()— anduseModal()throws when a component mounts outside a NiceModal context. That blocks mounting settings modals as route elements, which the upcoming router swap needs.What changed
onCloseprop that supersedes the NiceModal close path (X button, backdrop click, footer Cancel, Escape, and the dirty-confirm flow all funnel through it).requestClose, plus a thin NiceModal bridge that suppliesmodal.remove— chosen per render by the presence ofonClose, so no conditional hooks.PreviewModalContentthreadsonClosethrough to its innerSettingsModal.id='modal-backdrop'DOM contract (settings' Escape handler checks it) is untouched.No consumer passes
onCloseyet — behavior is unchanged by construction.Verification
tsc -bclean, lint clean, unit 125 files / 1320 testslayout.acceptancedirty-exit poll racing the/→/analyticshome redirect; passes isolated; identical signature predates this change)