Repository navigation
Cleaned up migrated settings page styles - #29555
weylandswart merged 1 commit into
Conversation
Closes https://linear.app/ghost/issue/DES-1426/minor-cleanup-from-settings-page-migration-off-design-system Aligned migrated settings controls with their intended sizing, spacing, and interaction states.
WalkthroughUpdates admin settings UI presentation across icons, empty states, upload controls, textareas, portal icon selectors, discount labels, and action buttons. Several components switch to shared 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 @tryghost/admin:test:acceptance |
✅ Succeeded | 5m 7s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-x-s... |
✅ Succeeded | 2m 27s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 17s | View ↗ |
nx run-many -t lint -p @tryghost/admin-x-settin... |
✅ Succeeded | 56s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 21s | 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-23 10:43:38 UTC
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-x-settings/src/components/stripe-button.tsx`:
- Around line 11-16: Update StripeButton’s classNames construction so
caller-provided className and shared Button variant classes can override
Stripe-specific background, text, hover, and spacing styles. Restrict the Stripe
defaults to the intended default/linkable appearance, or merge them with
precedence that preserves variant and caller overrides, while retaining the
existing label-dependent sizing and SVG sizing behavior.
🪄 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: 787739b8-9bd3-4c07-a175-75e8819c3218
📒 Files selected for processing (12)
apps/admin-x-settings/src/components/exit-settings-button.tsxapps/admin-x-settings/src/components/settings/advanced/integrations.tsxapps/admin-x-settings/src/components/settings/advanced/integrations/custom-integration-modal.tsxapps/admin-x-settings/src/components/settings/advanced/spam-filters.tsxapps/admin-x-settings/src/components/settings/email/newsletters/newsletters-list.tsxapps/admin-x-settings/src/components/settings/growth/explore/testimonials-modal.tsxapps/admin-x-settings/src/components/settings/growth/offers/offers-index.tsxapps/admin-x-settings/src/components/settings/membership/portal/look-and-feel.tsxapps/admin-x-settings/src/components/settings/membership/tiers/tier-detail-preview.tsxapps/admin-x-settings/src/components/settings/membership/tiers/tiers-list.tsxapps/admin-x-settings/src/components/settings/site/navigation/navigation-edit-form.tsxapps/admin-x-settings/src/components/stripe-button.tsx
💤 Files with no reviewable changes (2)
- apps/admin-x-settings/src/components/settings/growth/explore/testimonials-modal.tsx
- apps/admin-x-settings/src/components/settings/growth/offers/offers-index.tsx
| const StripeButton: React.FC<StripeButtonProps> = ({label, className, href, target, variant, ...props}) => { | ||
| const classNames = clsx( | ||
| 'inline-block cursor-pointer rounded-md bg-[#625BF6] font-semibold text-white transition-all hover:opacity-90', | ||
| 'cursor-pointer rounded-md bg-[#625BF6] font-semibold text-white transition-all hover:opacity-90', | ||
| label ? 'px-5 py-2' : 'px-6 py-[9px]', | ||
| !label && '[&_svg]:h-4! [&_svg]:w-[132px]!', | ||
| className |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Files:"
git ls-files | rg 'stripe-button|button' | head -200
echo
echo "stripe-button.tsx:"
if [ -f apps/admin-x-settings/src/components/stripe-button.tsx ]; then
nl -ba apps/admin-x-settings/src/components/stripe-button.tsx | sed -n '1,120p'
fi
echo
echo "Button files:"
fd -a 'button\.(ts|tsx|js|jsx)$' apps/admin-x-settings src . 2>/dev/null | sed 's#^\./##' | head -100
echo
echo "Search Button component definitions/exports:"
rg -n "export .*Button|function Button|const Button|type Button|interface Button" -g '*.{ts,tsx}' apps/admin-x-settings src . 2>/dev/null | head -150
echo
echo "Search usages of stripe-button:"
rg -n "StripeButton|stripe-button|stripe" -g '*.{ts,tsx}' apps/admin-x-settings src . 2>/dev/null | head -200Repository: TryGhost/Ghost
Length of output: 4157
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "stripe-button.tsx:"
cat -n apps/admin-x-settings/src/components/stripe-button.tsx | sed -n '1,120p'
echo
echo "shade Button.tsx outline/search:"
cat -n apps/shade/src/components/ui/button.tsx | sed -n '1,260p'
echo
echo "stripe usages:"
rg -n "StripeButton|stripe-button|stripe" -g '*.{ts,tsx}' . | sed -n '1,220p'Repository: TryGhost/Ghost
Length of output: 36752
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
import re
stripe_path = Path('apps/admin-x-settings/src/components/stripe-button.tsx')
button_path = Path('apps/shade/src/components/ui/button.tsx')
stripe = stripe_path.read_text()
button = button_path.read_text()
stripe_code = re.sub(r'const StripeButton:.*?};\n\nexport default StripeButton;', '', stripe, flags=re.S)
button_code = re.sub(r'const Button = .*?}\);', '', button, flags=re.S)
print('Stripe constructs a clsx list before Button call:', "const classNames" in stripe_code and "clsx(" in stripe_code)
print('Stripe passes default variant explicitly as null:', re.search(r"variant={variant \?\? null}", stripe_code) is not None)
print('Stripe passes caller className via Button className:', re.search(r"<Button className={classNames} variant={variant \?\? null}", stripe_code) is not None)
cn_match = re.search(r'function cn\(|const cn', button_path.parent / 'utils.ts' if (button_path.parent / 'utils.ts').exists() else '', __file__='file')
print('Button uses buttonVariants(..., className) after variant:')
print(re.search(r"className={cn\(buttonVariants\(\{variant, size, className\}\)\)}", button))
print('Stripe-specific classes present:', all(token in stripe_code for token in [
"bg-[`#625BF6`]",
"text-white",
"hover:opacity-90",
"px-5 py-2",
"px-6 py-[9px]",
]))
PYRepository: TryGhost/Ghost
Length of output: 463
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "utils.ts cn implementation:"
cat -n apps/shade/src/lib/utils.ts | sed -n '1,80p'
echo
echo "clsx library presence/config:"
if [ -f apps/admin-x-settings/package.json ]; then
cat apps/admin-x-settings/package.json | sed -n '1,120p'
fi
echo
echo "Read-only class merge semantics from Button/stripe source snippets:"
python3 - <<'PY'
import re
stripe = open('apps/admin-x-settings/src/components/stripe-button.tsx').read()
button = open('apps/shade/src/components/ui/button.tsx').read()
for pattern in [
r"const classNames = clsx\((.*?)\);",
r"<Button className=\{classNames\} variant=\{variant \?\? null\}",
r"className={cn\(buttonVariants\(\{variant, size, className\}\)\)}",
]:
m = re.search(pattern, button if "buttonVariants" in pattern or "cn(" in pattern else stripe)
print(pattern, bool(m))
if m:
print(m.group(0))
PYRepository: TryGhost/Ghost
Length of output: 3476
Make Stripe-specific styles override the shared Button styles.
StripeButton always applies bg-[#625BF6], text-white, hover opacity, and Stripe spacing before className, while Button merges variants({variant, size, className}) into the same final class string. Variant overrides like outline, ghost, or link may still render the Stripe background; only use the Stripe-specific classes for the default/linkable Stripe appearance or merge them after/against className so caller classes win.
Also applies to: 28-34
🤖 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/stripe-button.tsx` around lines 11 - 16,
Update StripeButton’s classNames construction so caller-provided className and
shared Button variant classes can override Stripe-specific background, text,
hover, and spacing styles. Restrict the Stripe defaults to the intended
default/linkable appearance, or merge them with precedence that preserves
variant and caller overrides, while retaining the existing label-dependent
sizing and SVG sizing behavior.

Closes https://linear.app/ghost/issue/DES-1426/minor-cleanup-from-settings-page-migration-off-design-system
Cleaned up a few rough edges and inconsistencies on the settings page. The exact list is documented in the linked Linear issue.