Skip to content

🎨 Cleaned up theme editor limit gate and fixed orphan in LimitModal#28253

Merged
ErisDS merged 1 commit into
mainfrom
theme-editor-polish
May 29, 2026
Merged

🎨 Cleaned up theme editor limit gate and fixed orphan in LimitModal#28253
ErisDS merged 1 commit into
mainfrom
theme-editor-polish

Conversation

@ErisDS
Copy link
Copy Markdown
Member

@ErisDS ErisDS commented May 29, 2026

Summary

Test plan

  • admin-x-settings tests pass (169/169)
  • Visually confirm LimitModal no longer has a dangling word on the last line

🤖 Generated with Claude Code

…Modal

Followup to #27970 — removed verbose inline comments explaining the '.'
sentinel (the test name and git history capture the intent) and added
text-pretty to LimitModal to prevent orphaned words in the prompt text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

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: 6cd6c013-2a2b-442d-a47f-9a67d0baed87

📥 Commits

Reviewing files that changed from the base of the PR and between e3984b9 and dd28492.

📒 Files selected for processing (5)
  • apps/admin-x-design-system/src/global/modal/limit-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/change-theme.tsx
  • apps/admin-x-settings/src/components/settings/site/design-and-theme-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/theme/advanced-theme-settings.tsx
  • apps/admin-x-settings/test/acceptance/site/theme.test.ts
💤 Files with no reviewable changes (4)
  • apps/admin-x-settings/src/components/settings/site/theme/advanced-theme-settings.tsx
  • apps/admin-x-settings/test/acceptance/site/theme.test.ts
  • apps/admin-x-settings/src/components/settings/site/design-and-theme-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/change-theme.tsx

Walkthrough

This PR updates the theme editor limit modal UI, removes explanatory comments about the theme-limit sentinel pattern from three theme components, and adds a regression test for the launch gate behavior. The modal prompt container gains the text-pretty Tailwind class for improved text rendering. Three separate files (ChangeTheme, DesignAndThemeModal, ThemeActions) have explanatory comments removed that documented why a '.' sentinel is used in checkThemeLimitError() calls. A new acceptance test validates that customers restricted from using custom themes cannot access the theme editor route even when the targeted theme is in the allowlist, and confirms the limit modal appears with the configured plan-level error text.

Possibly related PRs

  • TryGhost/Ghost#27970: Updates the same theme-editor launch-limit gating using the '.' sentinel and touches the same entry points and test coverage.
  • TryGhost/Ghost#27656: Introduced the theme-editor route gating logic that blocks access and shows LimitModal when custom-theme usage is restricted, which this PR's test now validates.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the two main changes: cleaned up comments from the theme editor limit gate and added text-pretty to fix orphaned words in LimitModal.
Description check ✅ Passed The description directly relates to the changeset, explaining the removal of inline comments and the addition of text-pretty styling with supporting test results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 theme-editor-polish

Comment @coderabbitai help to get the list of available commands and usage tips.

@ErisDS ErisDS merged commit 6862653 into main May 29, 2026
49 checks passed
@ErisDS ErisDS deleted the theme-editor-polish branch May 29, 2026 14:05
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