Skip to content

Commit

Permalink
chore: improve stripe portal button and biling hero spacing (#25598)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
zlwaterfield and github-actions[bot] authored Oct 15, 2024
1 parent 348f7c9 commit 9a7deda
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/billingUpgradeCTA.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ describe('Billing Upgrade CTA', () => {
cy.reload()

cy.get('[data-attr=billing-page-core-upgrade-cta] .LemonButton__content').should('not.exist')
cy.get('[data-attr=manage-billing]').should('have.text', 'Manage card details and view past invoices')
cy.get('[data-attr=manage-billing]').should('have.text', 'Manage card details and invoices')
})
})
Binary file modified frontend/__snapshots__/scenes-other-billing--billing--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/scenes-other-billing--billing--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions frontend/src/scenes/billing/Billing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function Billing(): JSX.Element {
) : null}

{!billing?.has_active_subscription && platformAndSupportProduct && (
<div className="mb-6">
<div className="mb-4">
<BillingCTAHero product={platformAndSupportProduct} />
</div>
)}
Expand All @@ -130,7 +130,7 @@ export function Billing(): JSX.Element {
>
<div>
<div
className={clsx('flex flex-wrap gap-6 w-fit', {
className={clsx('flex flex-wrap gap-6 w-fit mb-4', {
'flex-col items-stretch': size === 'small',
'items-center': size !== 'small',
})}
Expand Down Expand Up @@ -193,7 +193,7 @@ export function Billing(): JSX.Element {
</div>
</>
)}
<div className="my-4">
<div>
<p className="ml-0 mb-0">
{billing?.has_active_subscription ? 'Billing period' : 'Cycle'}:{' '}
<b>{billing.billing_period.current_period_start.format('LL')}</b> to{' '}
Expand All @@ -202,7 +202,7 @@ export function Billing(): JSX.Element {
remaining)
</p>
{!billing.has_active_subscription && (
<p className="italic ml-0 text-muted">
<p className="italic ml-0 text-muted mb-0">
Monthly free allocation resets at the end of the cycle.
</p>
)}
Expand All @@ -212,8 +212,8 @@ export function Billing(): JSX.Element {
)}
</div>

{!isOnboarding && billing?.has_active_subscription && (
<div className="w-fit mt-4">
{!isOnboarding && billing?.customer_id && billing?.stripe_portal_url && (
<div className="w-fit">
<LemonButton
type="primary"
htmlType="submit"
Expand All @@ -223,7 +223,9 @@ export function Billing(): JSX.Element {
center
data-attr="manage-billing"
>
Manage card details and view past invoices
{billing.has_active_subscription
? 'Manage card details and invoices'
: 'View past invoices'}
</LemonButton>
</div>
)}
Expand Down

0 comments on commit 9a7deda

Please sign in to comment.