Skip to content

Moved settings preview modals out of the legacy design system - #29569

Merged
9larsons merged 2 commits into
mainfrom
codex/admin-settings-shade-preview-modal
Jul 23, 2026
Merged

9larsons merged 2 commits into
mainfrom
codex/admin-settings-shade-preview-modal

Conversation

@9larsons

Copy link
Copy Markdown
Contributor

What changed

  • moved the settings-only PreviewModalContent compatibility shell from admin-x-design-system into admin-x-settings
  • switched Portal, Design, Announcement bar, Newsletter, and offer flows to the local shell
  • rebuilt its layout from Shade primitives and SettingsModal while preserving the existing NiceModal contract
  • added semantic preview-canvas tokens so the light and dark preview surfaces retain their current appearance without raw colour or dark: utilities
  • removed the legacy export and story, reducing Settings legacy design-system usage from 13 components to 12

Why

This shell is shared only by Settings and exposes a transitional, prop-heavy API tied to its current NiceModal flows. Keeping it local removes the legacy dependency without promoting that compatibility API into Shade. The local shell still consumes Shade primitives and patterns, so the final consumer-by-consumer modal cleanup can happen without another public design-system abstraction.

Validation

  • pnpm --filter @tryghost/admin-x-settings lint
  • pnpm --filter @tryghost/admin-x-settings test:unit
  • pnpm --filter @tryghost/admin-x-design-system lint
  • pnpm --filter @tryghost/admin-x-design-system test:types
  • pnpm --filter @tryghost/admin-x-design-system build
  • pnpm --filter @tryghost/shade lint
  • pnpm --filter @tryghost/shade test:types
  • pnpm --filter @tryghost/shade build
  • pnpm --filter @tryghost/admin exec vitest run -c vitest.acceptance.config.ts src/settings (38 files, 302 tests)
  • pnpm --filter @tryghost/shade adoption:extract

no ref

The preview-and-sidebar shell is specific to the existing settings NiceModal flows, so keeping it local removes the legacy dependency without promoting a transitional prop-heavy API into Shade.
@coderabbitai

coderabbitai Bot commented Jul 23, 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: CHILL

Plan: Pro Plus

Run ID: 6bfaea32-a7d2-400b-9136-92fb344cb41c

📥 Commits

Reviewing files that changed from the base of the PR and between 344bc05 and 11d8789.

📒 Files selected for processing (7)
  • apps/admin-x-settings/src/components/settings/email/newsletters/newsletter-detail-modal.tsx
  • apps/admin-x-settings/src/components/settings/growth/offers/add-offer-modal.tsx
  • apps/admin-x-settings/src/components/settings/growth/offers/edit-offer-modal.tsx
  • apps/admin-x-settings/src/components/settings/growth/offers/edit-retention-offer-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/portal-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/announcement-bar-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/design-modal.tsx
🚧 Files skipped from review as they are similar to previous changes (7)
  • apps/admin-x-settings/src/components/settings/site/design-modal.tsx
  • apps/admin-x-settings/src/components/settings/email/newsletters/newsletter-detail-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/portal-modal.tsx
  • apps/admin-x-settings/src/components/settings/growth/offers/add-offer-modal.tsx
  • apps/admin-x-settings/src/components/settings/growth/offers/edit-retention-offer-modal.tsx
  • apps/admin-x-settings/src/components/settings/growth/offers/edit-offer-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/announcement-bar-modal.tsx

Walkthrough

The settings app now provides PreviewModalContent using Shade layout primitives and preview-specific theme tokens. Modal consumers import it locally instead of from the design system, whose preview modal exports and Storybook stories were removed. Shade adoption metrics were updated to reflect the migration.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: moving the settings preview modals out of the legacy design system.
Description check ✅ Passed The description matches the diff and clearly covers the component move, local shell refactor, tokens, and export/story removal.
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.
✨ 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 codex/admin-settings-shade-preview-modal

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.

@nx-cloud

nx-cloud Bot commented Jul 23, 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 11d8789

Command Status Duration Result
nx run @tryghost/admin:test:acceptance ✅ Succeeded 6m 6s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-d... ✅ Succeeded 2m 12s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 24s View ↗
nx run-many -t lint -p @tryghost/admin-x-design... ✅ Succeeded 1m 10s View ↗
nx run @tryghost/activitypub:test:acceptance ✅ Succeeded 42s View ↗
nx run @tryghost/admin:build ✅ Succeeded 5s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗
nx run ghost-admin:test ✅ 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 23:40:00 UTC

@9larsons
9larsons marked this pull request as ready for review July 23, 2026 23:12
@9larsons
9larsons enabled auto-merge (squash) July 23, 2026 23:12
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.82%. Comparing base (4cb987e) to head (344bc05).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #29569   +/-   ##
=======================================
  Coverage   74.82%   74.82%           
=======================================
  Files        1609     1609           
  Lines      141734   141734           
  Branches    17325    17325           
=======================================
  Hits       106057   106057           
  Misses      34604    34604           
  Partials     1073     1073           
Flag Coverage Δ
admin-tests 55.62% <ø> (ø)

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.

no ref

The Settings-local source alias resolves against Admin during the consolidated production build, so package-relative imports keep the shared build unambiguous.
@9larsons
9larsons merged commit fe3185c into main Jul 23, 2026
45 checks passed
@9larsons
9larsons deleted the codex/admin-settings-shade-preview-modal branch July 23, 2026 23:44
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