Repository navigation
Moved settings confirmation dialogs to Shade - #29561
Conversation
no ref The legacy dialog blocked removing the old settings design system, so the settings app now owns the compatibility layer while preserving existing caller behavior.
|
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 (25)
🚧 Files skipped from review as they are similar to previous changes (24)
WalkthroughThe pull request moves Possibly related PRs
Suggested reviewers: 🚥 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 9s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-x-d... |
✅ Succeeded | 2m 10s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 17s | View ↗ |
nx run-many -t lint -p @tryghost/admin-x-design... |
✅ Succeeded | 57s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 12s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 1s | View ↗ |
nx run @tryghost/activitypub:test:acceptance |
✅ Succeeded | 42s | 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-07-23 17:30:28 UTC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29561 +/- ##
==========================================
+ Coverage 74.82% 74.84% +0.01%
==========================================
Files 1611 1611
Lines 141723 141742 +19
Branches 17331 17339 +8
==========================================
+ Hits 106050 106086 +36
+ Misses 34630 34612 -18
- Partials 1043 1044 +1
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:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/shade/src/components/ui/sonner.stories.tsx`:
- Around line 50-76: Update the toast options in the Success and Info story
render functions so their descriptions match their semantics instead of using
“Error description”; use success-appropriate wording for Success and
informational wording for Info, while leaving the toast types and other options
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 80e623b9-6e0a-456a-a45b-5d5021716768
📒 Files selected for processing (34)
apps/admin-x-design-system/src/global/modal/confirmation-modal.stories.tsxapps/admin-x-design-system/src/global/modal/confirmation-modal.tsxapps/admin-x-design-system/src/index.tsapps/admin-x-settings/src/components/confirmation-modal.tsxapps/admin-x-settings/src/components/settings/advanced/danger-zone.tsxapps/admin-x-settings/src/components/settings/advanced/integrations.tsxapps/admin-x-settings/src/components/settings/advanced/integrations/custom-integration-modal.tsxapps/admin-x-settings/src/components/settings/advanced/integrations/transistor-modal.tsxapps/admin-x-settings/src/components/settings/advanced/integrations/webhooks-table.tsxapps/admin-x-settings/src/components/settings/advanced/integrations/zapier-modal.tsxapps/admin-x-settings/src/components/settings/advanced/labs/migration-options.tsxapps/admin-x-settings/src/components/settings/advanced/migration-tools/universal-import-modal.tsxapps/admin-x-settings/src/components/settings/email/emails.tsxapps/admin-x-settings/src/components/settings/email/newsletters.tsxapps/admin-x-settings/src/components/settings/email/newsletters/newsletter-detail-modal.tsxapps/admin-x-settings/src/components/settings/email/newsletters/newsletters-tab-content.tsxapps/admin-x-settings/src/components/settings/general/user-detail-modal.tsxapps/admin-x-settings/src/components/settings/general/users/staff-token.tsxapps/admin-x-settings/src/components/settings/growth/offers/edit-offer-modal.tsxapps/admin-x-settings/src/components/settings/growth/recommendations/edit-recommendation-modal.tsxapps/admin-x-settings/src/components/settings/membership/custom-fields/custom-field-modal.tsxapps/admin-x-settings/src/components/settings/membership/member-emails.tsxapps/admin-x-settings/src/components/settings/membership/portal/portal-modal.tsxapps/admin-x-settings/src/components/settings/membership/stripe/stripe-connect-modal.tsxapps/admin-x-settings/src/components/settings/membership/tiers/tier-detail-modal.tsxapps/admin-x-settings/src/components/settings/site/theme-modal.tsxapps/admin-x-settings/src/components/settings/site/theme/advanced-theme-settings.tsxapps/admin-x-settings/src/components/settings/site/theme/invalid-theme-modal.tsxapps/admin-x-settings/src/components/settings/site/theme/theme-installed-modal.tsxapps/admin-x-settings/test/unit/components/confirmation-modal.test.tsxapps/shade/src/components/patterns/setting-group.tsxapps/shade/src/components/ui/sonner.stories.tsxapps/shade/src/components/ui/sonner.tsxapps/shade/src/docs/adoption-data.json
💤 Files with no reviewable changes (3)
- apps/admin-x-design-system/src/global/modal/confirmation-modal.stories.tsx
- apps/admin-x-design-system/src/global/modal/confirmation-modal.tsx
- apps/admin-x-design-system/src/index.ts
| export const Success: Story = { | ||
| args: {}, | ||
| render: () => ( | ||
| <Button onClick={() => toast.success('Hello world!', {description: 'Error description', duration: Infinity})}>Toast!</Button> | ||
| ) | ||
| ), | ||
| parameters: { | ||
| docs: { | ||
| description: { | ||
| story: 'Use a success toast to confirm that an action completed.' | ||
| } | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| export const Info: Story = { | ||
| args: {}, | ||
| render: () => ( | ||
| <Button onClick={() => toast.info('Hello world!', {description: 'Error description', duration: Infinity})}>Toast!</Button> | ||
| ) | ||
| ), | ||
| parameters: { | ||
| docs: { | ||
| description: { | ||
| story: 'Use an informational toast for contextual feedback without success or error semantics.' | ||
| } | ||
| } | ||
| } | ||
| }; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Correct the success and info toast descriptions.
Line 53 and Line 67 both display “Error description”, which makes these examples contradict their toast semantics.
Proposed fix
- <Button onClick={() => toast.success('Hello world!', {description: 'Error description', duration: Infinity})}>Toast!</Button>
+ <Button onClick={() => toast.success('Hello world!', {description: 'Success description', duration: Infinity})}>Toast!</Button>
- <Button onClick={() => toast.info('Hello world!', {description: 'Error description', duration: Infinity})}>Toast!</Button>
+ <Button onClick={() => toast.info('Hello world!', {description: 'Info description', duration: Infinity})}>Toast!</Button>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export const Success: Story = { | |
| args: {}, | |
| render: () => ( | |
| <Button onClick={() => toast.success('Hello world!', {description: 'Error description', duration: Infinity})}>Toast!</Button> | |
| ) | |
| ), | |
| parameters: { | |
| docs: { | |
| description: { | |
| story: 'Use a success toast to confirm that an action completed.' | |
| } | |
| } | |
| } | |
| }; | |
| export const Info: Story = { | |
| args: {}, | |
| render: () => ( | |
| <Button onClick={() => toast.info('Hello world!', {description: 'Error description', duration: Infinity})}>Toast!</Button> | |
| ) | |
| ), | |
| parameters: { | |
| docs: { | |
| description: { | |
| story: 'Use an informational toast for contextual feedback without success or error semantics.' | |
| } | |
| } | |
| } | |
| }; | |
| export const Success: Story = { | |
| args: {}, | |
| render: () => ( | |
| <Button onClick={() => toast.success('Hello world!', {description: 'Success description', duration: Infinity})}>Toast!</Button> | |
| ), | |
| parameters: { | |
| docs: { | |
| description: { | |
| story: 'Use a success toast to confirm that an action completed.' | |
| } | |
| } | |
| } | |
| }; | |
| export const Info: Story = { | |
| args: {}, | |
| render: () => ( | |
| <Button onClick={() => toast.info('Hello world!', {description: 'Info description', duration: Infinity})}>Toast!</Button> | |
| ), | |
| parameters: { | |
| docs: { | |
| description: { | |
| story: 'Use an informational toast for contextual feedback without success or error semantics.' | |
| } | |
| } | |
| } | |
| }; |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/shade/src/components/ui/sonner.stories.tsx` around lines 50 - 76, Update
the toast options in the Success and Info story render functions so their
descriptions match their semantics instead of using “Error description”; use
success-appropriate wording for Success and informational wording for Info,
while leaving the toast types and other options unchanged.
no ref Admin compiles Settings through its own source alias, so the Settings-local component must use unambiguous relative imports.

What changed
Why
ConfirmationModal was one of the remaining settings dependencies on admin-x-design-system. A local compatibility layer lets settings move to Shade without rewriting the existing NiceModal workflow contracts in every caller.
Validation
pnpm --filter @tryghost/admin-x-settings lintpnpm --filter @tryghost/admin-x-settings test:unit(216 tests)pnpm --filter @tryghost/shade lintpnpm --filter @tryghost/shade test:unit(233 tests)pnpm --filter @tryghost/shade buildpnpm --filter @tryghost/admin-x-design-system lintpnpm --filter @tryghost/admin-x-design-system buildpnpm --filter @tryghost/admin test:acceptance -- src/settings(371/372 passed; unrelated Comments thread-sidebar close test timed out)