Skip to content

Removed NiceModal from settings and Shade - #30017

Merged
9larsons merged 2 commits into
mainfrom
slars/settings-nicemodal-teardown
Aug 18, 2026
Merged

Removed NiceModal from settings and Shade#30017
9larsons merged 2 commits into
mainfrom
slars/settings-nicemodal-teardown

Conversation

@9larsons

@9larsons 9larsons commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

no ref

Every settings dialog now renders as a controlled component, either from its route or from the component that opens it, so nothing is created or shown through NiceModal any more. This removes:

  • the NiceModal.Provider from the settings app
  • the NiceModal fallback paths from Shade's SettingsModal and the settings PreviewModalContentonClose is now required on both (every consumer already passed it)
  • the @ebay/nice-modal-react dependency from admin, Shade and admin-x-framework (which had it listed but never imported it), plus its catalog entry and lockfile entries

Shade's SettingsModal unit tests and story rendered through NiceModal only because that was the available mount path; they now render the modal directly with a controlled onClose.

Verification

  • pnpm test:acceptance src/settings — 327/327
  • apps/admin unit — 1382/1382; apps/shade unit — 295/295
  • tsc --noEmit and eslint clean on apps/admin and apps/shade; rg nice-modal across the repo returns nothing

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: QUIET

Plan: Pro Plus

Run ID: c262d4df-e1dc-4fa6-8d2b-fe2717620430

📥 Commits

Reviewing files that changed from the base of the PR and between e719b3e and e7196cb.

📒 Files selected for processing (1)
  • apps/admin/src/settings/app/components/settings/preview-modal.tsx
💤 Files with no reviewable changes (1)
  • apps/admin/src/settings/app/components/settings/preview-modal.tsx

Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Analyze (javascript-typescript)

Walkthrough

The change removes @ebay/nice-modal-react from workspace dependencies and application manifests. Settings modals now require consumer-provided onClose callbacks. The admin settings app no longer uses NiceModal.Provider. Stories and tests render SettingsModal directly and retain overlay behavior coverage. Confirmation-provider documentation now describes request replacement behavior.

Merge Risk: ⚪ Minimal · up to e7196

This change removes an unused modal dependency and converts settings dialogs to controlled rendering paths, with the stated tests, type checks, lint, and repository search passing. No actionable merge-blocking risk remains beyond normal checks.

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the removal of NiceModal from the settings app and Shade.
Description check ✅ Passed The description directly explains the controlled-component migration, dependency removal, test updates, and verification results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Type-Safe Boundaries ✅ Passed The complete diff adds no any, unchecked as, or TS bypass directives; changed components handle internal props and DOM events only, with no new external boundary data or Zod-shape duplication.
New Files Are Typescript ✅ Passed The complete diff from main to HEAD contains only modified .tsx, package, lockfile, and workspace files; it adds no .js, .jsx, .cjs, or .mjs source file.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch slars/settings-nicemodal-teardown

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@9larsons
9larsons force-pushed the slars/settings-membership-dialogs-controlled branch from 6c473c7 to ad184ce Compare August 18, 2026 14:28
@9larsons
9larsons force-pushed the slars/settings-nicemodal-teardown branch from 71346e8 to a272234 Compare August 18, 2026 14:29
@nx-cloud

nx-cloud Bot commented Aug 18, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit e7196cb

Command Status Duration Result
nx run @tryghost/admin:test:acceptance ✅ Succeeded 8m 52s View ↗
nx run ghost:test:ci:integration ✅ Succeeded 2m 43s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-f... ✅ Succeeded 28s View ↗
nx run ghost:test:integration ✅ Succeeded 3m 15s View ↗
nx run @tryghost/koenig-lexical:test:acceptance ✅ Succeeded 2m 24s View ↗
nx run ghost:test:legacy ✅ Succeeded 3m 9s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 56s View ↗
nx run @tryghost/admin:build ✅ Succeeded 2m 24s View ↗
Additional runs (9) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-18 16:13:48 UTC

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.31%. Comparing base (6a53bd3) to head (e7196cb).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #30017      +/-   ##
==========================================
- Coverage   75.35%   75.31%   -0.04%     
==========================================
  Files        1610     1610              
  Lines      142809   142809              
  Branches    17682    17669      -13     
==========================================
- Hits       107607   107554      -53     
- Misses      34172    34256      +84     
+ Partials     1030      999      -31     
Flag Coverage Δ
admin-tests 56.84% <ø> (ø)
e2e-tests 77.18% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from slars/settings-membership-dialogs-controlled to main August 18, 2026 15:41
no ref

Every settings dialog now renders as a controlled component, either from
its route or from the component that opens it, so nothing is created or
shown through NiceModal any more. This removes the NiceModal provider from
the settings app, the NiceModal fallback paths from Shade's SettingsModal
and the settings PreviewModalContent (onClose is now required on both),
and the @ebay/nice-modal-react dependency from admin, Shade and the
framework, along with its catalog entry.

Shade's SettingsModal unit tests and story rendered through NiceModal only
because that was the available mount path; they now render the modal
directly with a controlled onClose.
@9larsons
9larsons force-pushed the slars/settings-nicemodal-teardown branch from a272234 to e719b3e Compare August 18, 2026 15:42
no ref

This keeps the NiceModal cleanup free of trailing blank lines and satisfies the repository whitespace check.
@9larsons
9larsons merged commit 1a93b0d into main Aug 18, 2026
58 checks passed
@9larsons
9larsons deleted the slars/settings-nicemodal-teardown branch August 18, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant