Repository navigation
🎨 Changed the sidebar trial banner to be configurable via hostSettings - #29604
Conversation
no ref
- the sidebar trial banner hardcodes Ghost(Pro) branding, "full power of
Ghost" copy and a `#/pro/billing/plans` link, none of which apply to
managed hosting providers other than Ghost(Pro)
- it renders purely off the subscription payload the billing app posts
into Admin, so any host configuring hostSettings.billing gets it as
soon as one of their sites is on trial
- adds optional title, message, upgradeUrl, logo, logoDark and logoAlt
fields under hostSettings.billing.upgradeBanner, each falling back to
Ghost's current default so behaviour is unchanged unless a host
overrides it
- {{days}} in a custom message is replaced with the emphasised trial days
remaining, so hosts keep the countdown the default copy has
- a configured logo without alt text renders as decorative instead of
inheriting the "Ghost Pro" alt text
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThe billing configuration now supports optional upgrade-banner title, message, URL, logos, dark-mode logo, and alt text. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
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/admin/src/layout/app-sidebar/upgrade-banner.tsx`:
- Around line 18-21: Update the message formatting logic around message,
daysIndex, messageBeforeDays, and messageAfterDays to replace every
DAYS_PLACEHOLDER occurrence, rather than splitting only at the first match.
Preserve the configured message and default behavior, and add a regression test
confirming multiple {{days}} placeholders are all rendered correctly.
🪄 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: 676b07ae-9e86-41f5-8c95-fa7815f75761
📒 Files selected for processing (3)
apps/admin-x-framework/src/api/config.tsapps/admin/src/layout/app-sidebar/upgrade-banner.test.tsxapps/admin/src/layout/app-sidebar/upgrade-banner.tsx
no ref
- a custom message using {{days}} more than once rendered the second and
later occurrences literally, because the message was split around the
first match only
- splits on every occurrence instead, so each one gets the emphasised day
count
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 8m 25s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-x-f... |
✅ Succeeded | 4m 53s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 2m 52s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 1m 57s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 20s | View ↗ |
nx run-many -t lint -p @tryghost/admin-x-framew... |
✅ Succeeded | 1m 31s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 1s | View ↗ |
nx run @tryghost/activitypub:test:acceptance |
✅ Succeeded | 45s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-28 19:30:12 UTC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29604 +/- ##
==========================================
- Coverage 74.82% 74.82% -0.01%
==========================================
Files 1608 1608
Lines 141725 141725
Branches 17337 17337
==========================================
- Hits 106052 106050 -2
- Misses 34631 34632 +1
- Partials 1042 1043 +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:
|
#/pro/billing/planslink, none of which apply to managed hosting providers other than Ghost(Pro)Got some code for us? Awesome 🎊!
Please take a minute to explain the change you're making:
Please check your PR against these items:
We appreciate your contribution! 🙏