Repository navigation
Moved settings overlays to Shade - #29495
Conversation
no ref Moved settings overlays onto the shared Shade primitives so their styling, accessibility, and dismissal behavior no longer diverge across Admin.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe change removes legacy design-system menu and popover exports and the Radix popover dependency. Settings filters and custom-field actions now use Shade primitives, offer values use 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 ghost:test:ci:integration |
✅ Succeeded | 3m 4s | View ↗ |
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 6m 46s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-x-d... |
✅ Succeeded | 5m 48s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 51s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 21s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 3m 18s | View ↗ |
nx run-many -t lint -p @tryghost/admin-x-design... |
✅ Succeeded | 3m 38s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 3m 6s | View ↗ |
Additional runs (8) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-21 17:43:07 UTC
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx (1)
268-270: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRender
TestEmailDropdownunconditionally to preserve state and exit animations.Conditionally rendering
TestEmailDropdown(which directly returnsPopoverContentat its root) abruptly unmounts it from the DOM when the dropdown closes. This prevents Radix UI's exit animations from playing and clears any email address the user was typing if they accidentally close the popover.Consider rendering the component unconditionally. Radix's
Popoverwill natively manage the visibility of the content while respecting exit animations, and the user's input will be preserved if they reopen the dropdown.
apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx#L268-L270: Remove the{showTestDropdown && (...)}conditional wrapper.apps/admin/src/automations/components/email-modal/email-content-modal.tsx#L350-L352: Remove the{showTestDropdown && (...)}conditional wrapper.♻️ Proposed refactor for apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx
- {showTestDropdown && ( - <TestEmailDropdown automatedEmailId={automatedEmail.id} lexical={formState.lexical} subject={formState.subject} validateForm={validate} /> - )} + <TestEmailDropdown automatedEmailId={automatedEmail.id} lexical={formState.lexical} subject={formState.subject} validateForm={validate} />♻️ Proposed refactor for apps/admin/src/automations/components/email-modal/email-content-modal.tsx
- {showTestDropdown && ( - <TestEmailDropdown automationId={automationId} lexical={formState.lexical} subject={formState.subject} validateForm={validateForTest} /> - )} + <TestEmailDropdown automationId={automationId} lexical={formState.lexical} subject={formState.subject} validateForm={validateForTest} />🤖 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/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx` around lines 268 - 270, Render TestEmailDropdown unconditionally in apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx:268-270 and apps/admin/src/automations/components/email-modal/email-content-modal.tsx:350-352 by removing each showTestDropdown conditional wrapper, while preserving the existing props so Radix Popover controls visibility, exit animations, and input state.
🤖 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.
Nitpick comments:
In
`@apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx`:
- Around line 268-270: Render TestEmailDropdown unconditionally in
apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx:268-270
and
apps/admin/src/automations/components/email-modal/email-content-modal.tsx:350-352
by removing each showTestDropdown conditional wrapper, while preserving the
existing props so Radix Popover controls visibility, exit animations, and input
state.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bbbf4814-8b24-44c4-9fb9-f0165d349757
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (18)
apps/admin-x-design-system/package.jsonapps/admin-x-design-system/src/global/menu.stories.tsxapps/admin-x-design-system/src/global/menu.tsxapps/admin-x-design-system/src/global/popover.stories.tsxapps/admin-x-design-system/src/global/popover.tsxapps/admin-x-design-system/src/global/sort-menu.stories.tsxapps/admin-x-design-system/src/global/sort-menu.tsxapps/admin-x-design-system/src/index.tsapps/admin-x-settings/src/components/settings/advanced/history-modal.tsxapps/admin-x-settings/src/components/settings/growth/offers/offers-index.tsxapps/admin-x-settings/src/components/settings/membership/custom-fields/custom-field-modal.tsxapps/admin-x-settings/src/components/settings/membership/member-emails/test-email-dropdown.tsxapps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsxapps/admin/src/automations/components/email-modal/email-content-modal.tsxapps/admin/src/automations/components/email-modal/test-email-dropdown.tsxapps/admin/src/settings/advanced/advanced.acceptance.test.tsxapps/admin/src/settings/membership/custom-fields.acceptance.test.tsxapps/admin/src/settings/offers.screen.ts
💤 Files with no reviewable changes (8)
- apps/admin-x-design-system/src/global/menu.stories.tsx
- apps/admin-x-design-system/src/global/popover.tsx
- apps/admin-x-design-system/src/global/sort-menu.stories.tsx
- apps/admin-x-design-system/src/global/popover.stories.tsx
- apps/admin-x-design-system/package.json
- apps/admin-x-design-system/src/global/menu.tsx
- apps/admin-x-design-system/src/global/sort-menu.tsx
- apps/admin-x-design-system/src/index.ts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29495 +/- ##
==========================================
- Coverage 74.60% 74.57% -0.03%
==========================================
Files 1604 1605 +1
Lines 140899 141105 +206
Branches 17212 17213 +1
==========================================
+ Hits 105111 105230 +119
- Misses 34729 34848 +119
+ Partials 1059 1027 -32
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:
|
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 29851371123 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
1 similar comment
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 29851371123 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
ref #29495 Shade dropdown content is portaled and exposes a menuitem role, so the lifecycle test must locate it from the page rather than as a button inside the modal.

Summary
Why
Settings had several overlay implementations with different styling, accessibility, focus, Escape, and outside-click behavior. Moving them to Shade gives these surfaces one shared contract and removes the legacy components so they cannot be reintroduced.
The History staff selector also exposed a legacy react-select layout issue: its dropdown indicator is absolutely positioned without reserving space beside the clear indicator. This PR keeps the spacing fix local to the only clearable Settings Select; the full chooser migration remains scoped to Group 2.
User and developer impact
Users get consistent menus and popovers with standardized keyboard and dismissal behavior. Developers no longer have the legacy Menu, Popover, or SortMenu APIs available from admin-x-design-system.
How to validate
Validation
Screenshots
Before/after evidence is pending while this PR is in draft.