Skip to content

Removed legacy TabView from Admin settings - #29530

Merged
9larsons merged 3 commits into
mainfrom
codex/admin-settings-shade-tabs
Jul 22, 2026
Merged

9larsons merged 3 commits into
mainfrom
codex/admin-settings-shade-tabs

Conversation

@9larsons

Copy link
Copy Markdown
Contributor

What changed

  • Replaced every Admin settings TabView / Tab use with direct Shade Tabs, TabsList, TabsTrigger, and TabsContent composition.
  • Slotted tabs and device controls into PreviewModalContent, Page, and ViewContainer as ReactNode content instead of rendering legacy tab chrome internally.
  • Moved Design and Announcement Bar preview device state to their consumers and replaced the legacy control with the Shade toggle group.
  • Removed the legacy TabView component, stories, and exports.
  • Updated the Shade underline variant to retain horizontal scrolling for long tab rows.
  • Ensured pointer tab changes blur editable controls before Radix unmounts the old panel, preserving fields that commit on blur without changing keyboard activation or firing callbacks twice.
  • Updated adoption data: Shade is now used by 324 Admin React files (46.8%), with 60 admin-x-design-system components still in use.

Why no replacement TabView wrapper

Shade already owns the reusable abstraction: its tab primitives and visual variants. Recreating the old data-driven prop bag in Shade or settings would preserve the legacy coupling between tab data, state, panels, counters, preview chrome, and device controls. Direct composition keeps state and content with each consumer while the shared underline and button-sm recipes keep the styling centralized.

Validation

  • pnpm --dir apps/admin-x-settings lint
  • pnpm --dir apps/admin-x-settings test:unit --run (206 tests)
  • pnpm --dir apps/admin-x-design-system lint
  • pnpm --dir apps/admin-x-design-system test:unit --run (23 tests)
  • pnpm --dir apps/admin-x-design-system build
  • pnpm --dir apps/shade lint
  • pnpm --dir apps/shade test:unit --run (228 tests)
  • pnpm --dir apps/shade build
  • pnpm --dir apps/admin test:acceptance src/settings --reporter=dot (298 tests)
  • pnpm lint:boundaries
  • Two iterative reviewer passes, ending with no significant findings.

How to validate manually

  1. Open tabbed settings groups such as Staff, Newsletters, Tiers, Custom fields, Recommendations, Labs, Integrations, Migration tools, and Meta data. Switch tabs with clicks and Left/Right arrow keys; verify the active underline, panel, counters, and narrow-width horizontal scrolling.
  2. In Navigation, edit a URL and immediately switch Primary/Secondary. Switch back and save; verify the edited URL is retained and normalized.
  3. In Portal, edit the support email on Account page and immediately switch to Signup options. Save and verify the email change is retained. Confirm Signup options, Look & feel, Account page, and the Signup/Account page/Links preview tabs remain synchronized.
  4. Open Design and Announcement Bar. Switch Homepage/Post and Mobile/Desktop; verify the preview URL and desktop/mobile chrome update correctly.
  5. Open a newsletter detail modal and switch General/Design; verify the sticky tab strip and form state.
  6. Open Themes and verify Official themes/Installed works in both desktop and narrow layouts.
  7. Open Code injection and switch Site header/Site footer, confirming both editors retain their content.

no ref
Shade already provides the shared tab primitives and variants, so keeping a settings-specific data wrapper duplicated that API and blocked removal of the legacy design-system component.
@coderabbitai

coderabbitai Bot commented Jul 22, 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

Run ID: a4d8065e-4a08-4373-a2a8-8cbccdcf809b

📥 Commits

Reviewing files that changed from the base of the PR and between e91932a and 3fb5ab5.

📒 Files selected for processing (44)
  • apps/admin-x-design-system/src/global/layout/page.stories.tsx
  • apps/admin-x-design-system/src/global/layout/page.tsx
  • apps/admin-x-design-system/src/global/layout/view-container.stories.tsx
  • apps/admin-x-design-system/src/global/layout/view-container.tsx
  • apps/admin-x-design-system/src/global/modal/preview-modal.stories.tsx
  • apps/admin-x-design-system/src/global/modal/preview-modal.tsx
  • apps/admin-x-design-system/src/global/tab-view.stories.tsx
  • apps/admin-x-design-system/src/global/tab-view.tsx
  • apps/admin-x-design-system/src/index.ts
  • apps/admin-x-settings/src/components/settings/advanced/code/code-modal.tsx
  • apps/admin-x-settings/src/components/settings/advanced/integrations.tsx
  • apps/admin-x-settings/src/components/settings/advanced/labs.tsx
  • apps/admin-x-settings/src/components/settings/advanced/migration-tools.tsx
  • apps/admin-x-settings/src/components/settings/email/newsletters.tsx
  • apps/admin-x-settings/src/components/settings/email/newsletters/newsletter-detail-modal.tsx
  • apps/admin-x-settings/src/components/settings/general/invite-user-modal.tsx
  • apps/admin-x-settings/src/components/settings/general/seo-meta.tsx
  • apps/admin-x-settings/src/components/settings/general/user-detail-modal.tsx
  • apps/admin-x-settings/src/components/settings/general/users.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/growth/recommendations.tsx
  • apps/admin-x-settings/src/components/settings/membership/custom-fields.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/portal-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/tiers.tsx
  • apps/admin-x-settings/src/components/settings/site/announcement-bar-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/design-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/navigation-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/theme-modal.tsx
  • apps/admin/src/settings/general/staff-profile.acceptance.test.tsx
  • apps/admin/src/settings/membership/custom-fields.acceptance.test.tsx
  • apps/admin/src/settings/membership/portal.acceptance.test.tsx
  • apps/admin/src/settings/settings.screen.ts
  • apps/admin/src/settings/site/announcement-bar.acceptance.test.tsx
  • apps/admin/src/settings/site/design.acceptance.test.tsx
  • apps/admin/src/settings/site/navigation.acceptance.test.tsx
  • apps/shade/src/components/ui/checkbox.tsx
  • apps/shade/src/components/ui/field.tsx
  • apps/shade/src/components/ui/radio-group.tsx
  • apps/shade/src/components/ui/tabs.tsx
  • apps/shade/src/docs/adoption-data.json
  • apps/shade/test/unit/components/ui/tabs.test.tsx
  • packages/testing/test-data/src/selectors/settings.ts
💤 Files with no reviewable changes (6)
  • apps/admin-x-settings/src/components/settings/growth/offers/edit-retention-offer-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-design-system/src/global/tab-view.stories.tsx
  • apps/admin-x-design-system/src/global/tab-view.tsx
  • apps/admin-x-design-system/src/index.ts

Walkthrough

The PR removes the design-system TabView and structured tab contracts, replacing settings interfaces with Shade Tabs components and explicit tab panels. Layout and preview components now accept React-node slots for toolbar content. Preview modals add composed device selectors and desktop/mobile preview rendering. Shade form and tab styling are updated, with unit and acceptance tests adjusted alongside adoption metadata.

Possibly related PRs

  • TryGhost/Ghost#29503: Updates the preview modal toolbar to render React-node content instead of the previous selection-based implementation.

Suggested reviewers: aileen

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing the legacy TabView from Admin settings.
Description check ✅ Passed The description is clearly related to the changeset and describes the TabView-to-Tabs migration and related cleanup.
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-tabs

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
apps/shade/src/docs/adoption-data.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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 22, 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 497699d

Command Status Duration Result
nx run @tryghost/admin:test:acceptance ✅ Succeeded 6m 42s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-d... ✅ Succeeded 4m 41s View ↗
nx run ghost-admin:test ✅ Succeeded 2m 53s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 23s View ↗
nx run-many -t lint -p @tryghost/admin-x-design... ✅ Succeeded 2m 9s View ↗
nx run @tryghost/admin:build ✅ Succeeded 2m 3s View ↗
nx run @tryghost/activitypub:test:acceptance ✅ Succeeded 41s 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-22 15:06:00 UTC

no ref

The embedded settings app inherits legacy Ember element styles, so Shade needs to own the complete legend and checkbox surface styling.
@9larsons
9larsons force-pushed the codex/admin-settings-shade-tabs branch 2 times, most recently from 497699d to 15d6f48 Compare July 22, 2026 14:53
no ref

Staff role radios need a local zero offset, while asymmetric shadows and stroked SVG indicators made centered controls appear displaced.
@9larsons
9larsons force-pushed the codex/admin-settings-shade-tabs branch from 15d6f48 to 3fb5ab5 Compare July 22, 2026 14:56
@9larsons
9larsons marked this pull request as ready for review July 22, 2026 15:01
@9larsons
9larsons merged commit aaab1b3 into main Jul 22, 2026
45 checks passed
@9larsons
9larsons deleted the codex/admin-settings-shade-tabs branch July 22, 2026 15:39
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