Skip to content

🐛 Fixed free tier looking like a selectable card when it's the only tier#28951

Open
Aubaid12 wants to merge 1 commit into
TryGhost:mainfrom
Aubaid12:fix/25517-only-free-tier-card
Open

🐛 Fixed free tier looking like a selectable card when it's the only tier#28951
Aubaid12 wants to merge 1 commit into
TryGhost:mainfrom
Aubaid12:fix/25517-only-free-tier-card

Conversation

@Aubaid12

@Aubaid12 Aubaid12 commented Jun 27, 2026

Copy link
Copy Markdown

fixes #25517

  • When a site has Stripe connected but no paid tiers, the signup modal shows the free tier inside a bordered, hoverable card (no price, no Choose button). That makes it look selectable when there's nothing to choose, which is the confusion reported in the issue.

  • This removes the card framing (border, padding, background) for the only-free case and drops the now-pointless selection click, so the free tier reads as plain info above the Sign up button. The title, description, and benefits stay.

  • This follows the "possibly better" option in the issue. I kept the "Free" title because signup-flow.test.js already asserts it renders for only-free signups, and the issue flagged title removal with a "?", so it didn't seem worth changing. Happy to drop it if you'd prefer.

  • Multi-tier and single-paid signups are unaffected; the change only triggers when free is the only tier. The full Portal test suite passes.

  • No new test added: this is a presentational/CSS change that jsdom can't meaningfully assert, and the existing signup-flow tests already cover only-free rendering (title, description, benefits).

  • I've read and followed the Contributor Guide

shot pic

fixes TryGhost#25517

On a site with no paid tiers, the signup modal rendered the free tier inside a bordered, hoverable card (no price, no Choose button) — making it look selectable when there's nothing to choose. This removes the card framing for the only-free case and drops the now-pointless selection click, so the free tier reads as plain info above the Sign up button. Title, description and benefits are kept.
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

In products-section.js, the .gh-portal-product-card.only-free CSS rule is updated to remove padding, border, and background (now padding: 0; border: none; background: transparent). The free product card's onClick handler is made conditional: it is set to undefined when hasOnlyFree is true, disabling interaction; otherwise it retains its existing behavior of stopping propagation and selecting the free tier.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: making the only-free tier stop looking selectable.
Linked Issues check ✅ Passed The change addresses the issue by removing the card framing and click affordance when free is the only tier.
Out of Scope Changes check ✅ Passed The edits are limited to the only-free card styling and click handling, with no unrelated changes.
Description check ✅ Passed The description matches the code changes by explaining the only-free-tier styling and click-behavior update.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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.

Unexpcted Portal behavior when Stripe is linked but only one plan exists

1 participant