Skip to content

Changed advanced settings dialogs to controlled components - #30014

Merged
9larsons merged 2 commits into
mainfrom
slars/settings-advanced-dialogs-controlled
Aug 18, 2026
Merged

Changed advanced settings dialogs to controlled components#30014
9larsons merged 2 commits into
mainfrom
slars/settings-advanced-dialogs-controlled

Conversation

@9larsons

@9larsons 9larsons commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

no ref

The code injection, webhook, labs YAML editor, feature-toggle confirmation and universal import dialogs were the last NiceModal.create dialogs under settings/advanced. They now take an onClose prop and are rendered by the component that opens them, using SettingsModal's controlled onClose path that the routed settings dialogs already use. This removes five of the remaining NiceModal call sites in settings so the provider and dependency can be torn down once the theme and membership dialogs follow.

Dialogs opened from inside a settings group render through a small settings DialogPortal whose host sits beside the settings layout (next to <Outlet />). The settings groups (relative z-10) and the fixed content wrapper each open a stacking context, so a SettingsModal rendered in place paints below the exit-settings button and neighbouring groups; the portal keeps it where NiceModal's placeholder used to render. The webhook dialog opens from inside a routed dialog and does not need it.

Verification

  • pnpm test:acceptance src/settings/advanced — 39/39 (three new tests: universal import upload + cancel, automations feature-toggle confirmation; the code injection test now also samples the viewport to assert nothing paints over the open dialog — it fails without the portal)
  • tsc --noEmit and eslint clean on apps/admin

@nx-cloud

nx-cloud Bot commented Aug 17, 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 83cf69a

Command Status Duration Result
nx run @tryghost/admin:test:acceptance ✅ Succeeded 5m 55s View ↗
nx run-many -t test:unit -p @tryghost/admin ✅ Succeeded 2m 35s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 22s View ↗
nx run-many -t lint -p @tryghost/admin,ghost-mo... ✅ Succeeded 1m 18s View ↗
nx run @tryghost/admin:build ✅ Succeeded 19s 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-18 14:20:19 UTC

no ref

The code injection, webhook, labs YAML editor, feature-toggle confirmation
and universal import dialogs were the last NiceModal.create dialogs under
settings/advanced. They now take an onClose prop and are rendered by the
component that opens them, using SettingsModal's controlled onClose path
that the routed settings dialogs already use. This removes five of the
remaining NiceModal call sites so the provider and dependency can be torn
down once the theme and membership dialogs follow.

Dialogs opened from inside a settings group render through a small
settings dialog portal whose host sits beside the settings layout. The
settings groups and the fixed content wrapper each open a stacking
context, so a SettingsModal rendered in place paints below the exit
button and neighbouring groups; the portal keeps it where NiceModal's
placeholder used to render. The webhook dialog opens from inside a routed
dialog and does not need it.

The universal importer and the automations feature-toggle confirmation had
no acceptance coverage, so tests were added for both, and the code
injection test now checks that nothing paints over the open dialog.
@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: ac8b5d15-9e0d-4b15-b8e0-dfb5229d29f7

📥 Commits

Reviewing files that changed from the base of the PR and between 7e9d564 and 83cf69a.

📒 Files selected for processing (13)
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx

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

📜 Recent review details
⏰ Context from checks skipped due to timeout. (6)
  • GitHub Check: Build Admin
  • GitHub Check: Build Docker Images
  • GitHub Check: App Playwright Acceptance Tests (@tryghost/admin)
  • GitHub Check: Unit tests (Node 22.23.1)
  • GitHub Check: Lint
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (Custom checks)

**/*.{ts,tsx}: Type-safe boundaries: Fail only if the PR:

  • consumes boundary data (HTTP input, external API/SDK responses, env/config,
    DB/filesystem reads, queue/webhook/event payloads) without validating it
    first — Zod by default, another format only where an external contract
    requires it; or
  • introduces any, unchecked as, @ts-nocheck, or @ts-ignore to bypass
    typing boundary data; or
  • hand-writes a type duplicating a shape a Zod schema describes (use z.infer).
    Never fail for: internal function/module calls (no runtime validation needed),
    pre-existing JS files touched incidentally, tests, scripts, or config files.

Files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
**/*

📄 CodeRabbit inference engine (AGENTS.md)

Always use pnpm, never npm or Yarn.

Files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx

⚙️ CodeRabbit configuration file

**/*: Prioritise concrete correctness, security, data-integrity, compatibility,
and regression risks. Explain the failure mode and point to the affected
code. Do not report formatting, naming, import ordering, type errors, or
other findings already owned by configured static tools or failing GitHub
checks. Do not request speculative abstractions, broad refactors, generic
documentation, or tests unrelated to changed behaviour. Treat nearby
AGENTS.md files and mapped codebase documentation as authoritative; do not
enforce proposals, plans, or historical guidance as current policy.

Files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
apps/admin/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

apps/admin/**/*.{js,jsx,ts,tsx}: Build new features in React,
use admin-x-framework for APIs, and use Shade for UI.

Files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
**/*.{ts,tsx,mts,cts}

⚙️ CodeRabbit configuration file

**/*.{ts,tsx,mts,cts}: Review lens: "where does this data become trusted?"

  • Boundary data (HTTP input, external API/SDK responses, env/config,
    DB/filesystem reads, queue/webhook/event payloads) is unknown until
    validated — Zod by default.
  • Infer boundary types via z.infer/z.input; flag handwritten duplicates.
  • Flag any, unchecked as on boundary data, @ts-nocheck, and unexplained
    @ts-ignore/@ts-expect-error.
  • Validated data stays trusted: don't request Zod on internal calls, and flag
    redundant re-validation.
  • ghost/core golden path: schema.ts owns Zod schemas + inferred types, with
    codec/serializer modules at the edges (see core/server/services/gift-links).
  • Looser typing in tests is fine unless it hides a real defect.

Files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
apps/{admin,activitypub,admin-x-framework,shade}/**/*.{ts,tsx}

⚙️ CodeRabbit configuration file

apps/{admin,activitypub,admin-x-framework,shade}/**/*.{ts,tsx}: Review Admin UI for existing Shade reuse, correct component layer, semantic
tokens, accessible interaction states, and whole-sentence translations. New UI
that depends on backend settings, endpoints, or config must feature-detect old
backend support and cover the not-yet-deployed backend case. Do not apply these
rules to independent public UMD apps. Do not repeat ESLint/Tailwind findings.

Files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
**/*{.,-}{test,spec}.{js,jsx,ts,tsx}

⚙️ CodeRabbit configuration file

**/*{.,-}{test,spec}.{js,jsx,ts,tsx}: Review whether tests prove changed behaviour, meaningful error/edge paths, and
externally observable contracts without coupling to implementation details.
Prefer the lowest useful test layer. Do not demand broad E2E coverage for
isolated logic or repeat test-run failures already visible in GitHub checks.

Files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
🧠 Learnings (4)
📚 Learning: 2026-04-30T10:51:48.759Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 27625
File: apps/admin/src/onboarding/onboarding-route.tsx:30-33
Timestamp: 2026-04-30T10:51:48.759Z
Learning: In the Ghost Admin React app, when you rely on data returned by `useBrowseSite()` (e.g., `site.data?.site.url` in the onboarding flow), assume the hook’s site data is already pre-loaded/cached before the route renders. In this context, the fallback to `"/"` for `site.data?.site.url` should not be treated as a practical runtime path, so avoid adding extra loading guards for `useBrowseSite()` output unless the `useBrowseSite()` preloading/caching guarantee changes.

Applied to files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
📚 Learning: 2026-07-21T19:57:01.324Z
Learnt from: troyciesco
Repo: TryGhost/Ghost PR: 29497
File: apps/admin/src/automations/components/canvas/off-value.tsx:4-4
Timestamp: 2026-07-21T19:57:01.324Z
Learning: Admin UI in Ghost is intentionally not localized. During code review, do not request adding i18n/translation hooks, wrappers, or new locale keys (e.g., updates to `packages/i18n/locales/en/ghost.json`) for Admin UI strings, including any React components under `apps/admin/src/`.

Applied to files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
📚 Learning: 2026-06-04T15:15:20.265Z
Learnt from: JohnONolan
Repo: TryGhost/Ghost PR: 28368
File: apps/admin-x-settings/src/components/settings/site/navigation/navigation-edit-form.tsx:32-32
Timestamp: 2026-06-04T15:15:20.265Z
Learning: In this TryGhost/Ghost codebase (Tailwind CSS v4), use/accept the v4 suffix form of the important modifier in class names (e.g., `opacity-100!`, `flex!`). Do not flag these as incorrect or inconsistent with the older v3 prefix form (`!opacity-100`), since the suffix form is the established convention and aligns with the generated CSS.

Applied to files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
📚 Learning: 2026-08-08T20:30:54.860Z
Learnt from: vershwal
Repo: TryGhost/Ghost PR: 29488
File: apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx:39-47
Timestamp: 2026-08-08T20:30:54.860Z
Learning: When implementing custom error-toast flows in the Admin application, preserve the framework's default dismissal behavior by calling parameterless `toast.dismiss()` before showing the replacement toast. Then call `handleError(error, {withToast: false})` when framework error handling is needed without displaying its default toast.

Applied to files:

  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx
  • apps/admin/src/settings/app/components/providers/dialog-portal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx
  • apps/admin/src/settings/app/app.tsx
  • apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx
  • apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx
  • apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx
🔇 Additional comments (18)
apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.tsx (1)

12-12: LGTM!

Also applies to: 33-40, 55-55, 82-82

apps/admin/src/settings/app/components/settings/advanced/migration-tools/migration-tools-import.tsx (1)

2-14: LGTM!

Also applies to: 35-35

apps/admin/src/settings/app/components/settings/advanced/migration-tools/universal-import-modal.test.tsx (1)

1-1: LGTM!

Also applies to: 39-46

apps/admin/src/settings/advanced/advanced.acceptance.test.tsx (1)

18-32: LGTM!

Also applies to: 46-47, 148-203

apps/admin/src/settings/app/app.tsx (1)

5-5: LGTM!

Also applies to: 33-39

apps/admin/src/settings/app/components/providers/dialog-portal.tsx (1)

1-27: LGTM!

apps/admin/src/settings/app/components/settings/advanced/labs/beta-features.tsx (3)

13-13: LGTM!

Also applies to: 26-30


82-82: LGTM!

Also applies to: 109-109


117-145: LGTM!

apps/admin/src/settings/app/components/settings/advanced/labs/yaml-file-editor-modal.tsx (3)

111-111: LGTM!


145-151: LGTM!


19-19: 🗄️ Data Integrity & Integration

No remaining callers use the old modal contract.

			> Likely an incorrect or invalid review comment.
apps/admin/src/settings/app/components/settings/advanced/labs/feature-toggle.tsx (2)

28-70: LGTM!


79-79: LGTM!

Also applies to: 104-122

apps/admin/src/settings/app/components/settings/advanced/code/code-modal.tsx (1)

11-15: LGTM!

Also applies to: 60-73, 93-93

apps/admin/src/settings/app/components/settings/advanced/code-injection.tsx (1)

2-6: LGTM!

Also applies to: 8-20

apps/admin/src/settings/app/components/settings/advanced/integrations/webhook-modal.tsx (1)

12-15: LGTM!

Also applies to: 54-66, 112-112

apps/admin/src/settings/app/components/settings/advanced/integrations/webhooks-table.tsx (1)

2-32: LGTM!

Also applies to: 69-69, 85-85, 129-129


Walkthrough

The settings application now provides a shared DialogPortal host. Advanced settings dialogs replaced NiceModal usage with local React state and explicit onClose callbacks. This covers code injection, webhooks, YAML editors, feature confirmations, and universal import. Tests now verify modal stacking, import success and cancellation, and Automations confirmation persistence.

Merge Risk: ⚪ Minimal · up to 83cf6

This change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Type-Safe Boundaries ❓ Inconclusive The working tree has no diff, so PR-introduced changes are not yet identifiable. Provide the PR base and head revisions or a usable diff to verify boundary-data handling and type escapes.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change from NiceModal dialogs to controlled components in advanced settings.
Description check ✅ Passed The description directly explains the dialog conversion, portal behavior, test coverage, 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.
New Files Are Typescript ✅ Passed The PR diff adds only apps/admin/src/settings/app/components/providers/dialog-portal.tsx; 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-advanced-dialogs-controlled

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.

no ref

Preserved controlled modal ownership while retaining the new CSV import support and its tests.
@9larsons
9larsons enabled auto-merge (squash) August 18, 2026 14:13
@9larsons
9larsons merged commit 3879bed into main Aug 18, 2026
49 checks passed
@9larsons
9larsons deleted the slars/settings-advanced-dialogs-controlled branch August 18, 2026 14:24
9larsons added a commit that referenced this pull request Aug 18, 2026
no ref

Uses the settings `DialogPortal` from #30014.

The custom field, welcome email and welcome email customize dialogs were
the last `NiceModal.create` dialogs in the membership and email settings
areas. They now take an `onClose` prop and are rendered by the component
that opens them: the two `SettingsModal` dialogs through the settings
dialog portal so they paint above the settings chrome, and the customize
dialog directly, since its `EmailDesignModal` is already a portalled
Shade `Dialog`.

With these converted (plus #30014 and #30015), no settings dialog is
created or shown through NiceModal any more, which clears the way to
remove the provider, the dependency and the compatibility bridges.
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