feat: billing plan and startup program badges on billing page#30242
feat: billing plan and startup program badges on billing page#30242pawel-cebula merged 57 commits intomasterfrom
Conversation
There was a problem hiding this comment.
PR Summary
This PR introduces significant changes to the billing page UI, focusing on plan visibility and startup program status. Here's a summary of the key changes:
- Replaces
BillingCTAHerowith a newBillingHerocomponent that adapts content based on billing plan and startup program status - Introduces new
BillingSummarycomponent to display detailed billing information like current totals and projections - Adds new billing plan badges (Free, Paid, Teams, Enterprise) and startup program badges (YC, Startup)
- Implements responsive layouts for both desktop and mobile views
- Moves styling from SCSS to Tailwind classes for better maintainability
Key points to note:
- Cloud-only changes with comprehensive testing across different billing plans
- New
billingPlanandstartupProgramLabelselectors in billingLogic - Improved UX with plan-specific messaging and CTAs
- Proper handling of Stripe portal integration through new
StripePortalButtoncomponent
The changes appear well-structured and thoroughly tested across different scenarios and screen sizes.
💡 (5/5) You can turn off certain types of comments like style here!
8 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
|
Size Change: +4.27 kB (+0.04%) Total Size: 9.76 MB
|
… rendering logic at the top of billing page
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
|
@zlwaterfield I think I've implemented all the feedback. I've also improved the layout of the credits CTA component a bit. Had to fix some unrelated type errors too that suddenly popped up, and fix an E2E test. Should be good for another review. |
zlwaterfield
left a comment
There was a problem hiding this comment.
Added two comments but looks good other than that (neither are blockers but nice to haves IMO)
| }, | ||
| [BillingPlan.Teams]: { | ||
| title: 'Good call!', | ||
| subtitle: "You're on the Teams plan.", |
There was a problem hiding this comment.
Can we update this to say You're on the Ridiculously Cheap™ plan (with Teams) or something like that until we have the badge, it's a big confusing.
There was a problem hiding this comment.
This looks to be squshing the summary, are we able avoid that with a min width?
There was a problem hiding this comment.
I actually wanted to leave more space for the credits banner/CTA so I wanted to limit the width of the summary based on current bill total and wrap rest, if needed. Otherwise the credits banner could be quite narrow and could end up taking a lot of height, with lots of empty space on the left (below summary).
I could modify it so that e.g. a date doesn't wrap but that could look a bit odd with spacing and end up taking 3 lines 🤔 Will try to see what it looks like and decide.
Problem
Changes
BillingCTAHerointoBillingHero, where content changes depending on thebillingPlanandstartupProgramLabelstartupProgramLabelis present, it takes priority over thebillingPlanTeamsplan badge, I've requested one from Lottie in Art request - Teams plan badge posthog.com#11022 but we could render the ridiculously cheap one (or neither?) in the meantimeThese UI changes dependent on a
billingPR (https://github.com/PostHog/billing/pull/1162), which needs to be merged first.Does this work well for both Cloud and self-hosted?
Cloud only
How did you test this code?
Desktop layout

Mobile layout

Free plan






Paid plan
Teams plan
Enterprise plan
Startup plan
YC plan