Skip to content

Cleaned up migrated settings page styles - #29555

Merged
weylandswart merged 1 commit into
mainfrom
weyland-des-1426-minor-cleanup-from-settings-page-migration-off-design-system
Jul 23, 2026
Merged

weylandswart merged 1 commit into
mainfrom
weyland-des-1426-minor-cleanup-from-settings-page-migration-off-design-system

Conversation

@weylandswart

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Updates admin settings UI presentation across icons, empty states, upload controls, textareas, portal icon selectors, discount labels, and action buttons. Several components switch to shared LucideIcon icons or adjust icon sizing. Button styling and spacing are revised, and StripeButton now forwards its variant in both link and non-link render paths.

Possibly related PRs

Suggested reviewers: 9larsons

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: cleanup of migrated settings page styles.
Description check ✅ Passed The description matches the changeset by describing cleanup of rough edges and inconsistencies on the settings page.
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 weyland-des-1426-minor-cleanup-from-settings-page-migration-off-design-system

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 23, 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 818a819

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 90ea162 and 818a819.

📒 Files selected for processing (12)
  • apps/admin-x-settings/src/components/exit-settings-button.tsx
  • apps/admin-x-settings/src/components/settings/advanced/integrations.tsx
  • apps/admin-x-settings/src/components/settings/advanced/integrations/custom-integration-modal.tsx
  • apps/admin-x-settings/src/components/settings/advanced/spam-filters.tsx
  • apps/admin-x-settings/src/components/settings/email/newsletters/newsletters-list.tsx
  • apps/admin-x-settings/src/components/settings/growth/explore/testimonials-modal.tsx
  • apps/admin-x-settings/src/components/settings/growth/offers/offers-index.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/look-and-feel.tsx
  • apps/admin-x-settings/src/components/settings/membership/tiers/tier-detail-preview.tsx
  • apps/admin-x-settings/src/components/settings/membership/tiers/tiers-list.tsx
  • apps/admin-x-settings/src/components/settings/site/navigation/navigation-edit-form.tsx
  • apps/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

Comment on lines +11 to 16
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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 -200

Repository: 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]",
]))
PY

Repository: 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))
PY

Repository: 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.

@weylandswart
weylandswart merged commit 9f07744 into main Jul 23, 2026
45 checks passed
@weylandswart
weylandswart deleted the weyland-des-1426-minor-cleanup-from-settings-page-migration-off-design-system branch July 23, 2026 10:56
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