Skip to content

Commit e561956

Browse files
feat(checkout v3): Full screen (#98540)
<img width="1037" height="857" alt="Screenshot 2025-08-29 at 3 53 07 PM" src="https://github.com/user-attachments/assets/b7ea3229-1194-40da-8fd8-0f383746d303" /> on small screens: <img width="354" height="762" alt="Screenshot 2025-08-29 at 3 52 48 PM" src="https://github.com/user-attachments/assets/ba81602e-e284-44f6-b935-7b6d8be46857" /> on very large screens, we center the content: <img width="989" height="687" alt="Screenshot 2025-08-29 at 3 52 07 PM" src="https://github.com/user-attachments/assets/00e33955-d6aa-4e2e-86a8-b927a85f811e" />
1 parent bbee29a commit e561956

21 files changed

+310
-220
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type React from 'react';
2+
3+
import OrganizationContainer from 'sentry/views/organizationContainer';
4+
5+
import SubscriptionContext from 'getsentry/components/subscriptionContext';
6+
7+
type Props = {
8+
children: React.JSX.Element;
9+
};
10+
11+
function OrganizationSubscriptionContext({children}: Props) {
12+
return (
13+
<OrganizationContainer>
14+
<SubscriptionContext>{children}</SubscriptionContext>
15+
</OrganizationContainer>
16+
);
17+
}
18+
19+
export default OrganizationSubscriptionContext;

static/gsApp/hooks/rootRoutes.tsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
import type {SentryRouteObject} from 'sentry/components/route';
2+
import {makeLazyloadComponent as make} from 'sentry/makeLazyloadComponent';
3+
import errorHandler from 'sentry/utils/errorHandler';
24

3-
const rootRoutes = (): SentryRouteObject => ({});
5+
import OrganizationSubscriptionContext from 'getsentry/components/organizationSubscriptionContext';
6+
7+
const rootRoutes = (): SentryRouteObject => ({
8+
children: [
9+
{
10+
// TODO(checkout v3): change this to the correct path (/settings/billing/checkout/)
11+
// when GA'd
12+
path: '/checkout-v3/',
13+
component: errorHandler(OrganizationSubscriptionContext),
14+
deprecatedRouteProps: true,
15+
customerDomainOnlyRoute: true,
16+
children: [
17+
{
18+
index: true,
19+
component: make(() => import('getsentry/views/decideCheckout')),
20+
},
21+
],
22+
},
23+
],
24+
});
425

526
export default rootRoutes;

static/gsApp/hooks/settingsRoutes.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const settingsRoutes = (): SentryRouteObject => ({
2323
redirectTo: 'overview/',
2424
},
2525
{
26+
// TODO(checkout v3): This should be removed when checkout v3 is GA'd
2627
path: 'checkout/',
2728
name: 'Change',
2829
component: errorHandler(SubscriptionContext),

static/gsApp/views/amCheckout/cart.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ describe('Cart', () => {
2323
const billingConfig = BillingConfigFixture(PlanTier.AM3);
2424
const props = {
2525
...routerProps,
26+
navigate: jest.fn(),
2627
isNewCheckout: true,
2728
};
2829
const businessPlan = PlanDetailsLookupFixture('am3_business')!;

static/gsApp/views/amCheckout/checkoutOverview.spec.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ describe('CheckoutOverview', () => {
1616
const api = new MockApiClient();
1717
const {organization, routerProps} = initializeOrg();
1818
const subscription = SubscriptionFixture({organization, plan: 'am1_f'});
19-
const params = {};
2019

2120
const billingConfig = BillingConfigFixture(PlanTier.AM2);
2221
const teamPlanAnnual = PlanDetailsLookupFixture('am1_team_auf')!;
@@ -52,7 +51,7 @@ describe('CheckoutOverview', () => {
5251
api={api}
5352
checkoutTier={PlanTier.AM2}
5453
onToggleLegacy={jest.fn()}
55-
params={params}
54+
navigate={jest.fn()}
5655
/>
5756
);
5857

@@ -86,7 +85,7 @@ describe('CheckoutOverview', () => {
8685
checkoutTier={PlanTier.AM1}
8786
location={LocationFixture({hash: '#step3'})}
8887
onToggleLegacy={jest.fn()}
89-
params={params}
88+
navigate={jest.fn()}
9089
/>
9190
);
9291

static/gsApp/views/amCheckout/checkoutOverviewV2.spec.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ describe('CheckoutOverviewV2', () => {
1414
const api = new MockApiClient();
1515
const {organization, routerProps} = initializeOrg();
1616
const subscription = SubscriptionFixture({organization, plan: 'am3_f'});
17-
const params = {};
1817

1918
const billingConfig = BillingConfigFixture(PlanTier.AM3);
2019
const teamPlanAnnual = PlanDetailsLookupFixture('am3_team_auf')!;
@@ -50,7 +49,7 @@ describe('CheckoutOverviewV2', () => {
5049
api={api}
5150
checkoutTier={PlanTier.AM3}
5251
onToggleLegacy={jest.fn()}
53-
params={params}
52+
navigate={jest.fn()}
5453
/>
5554
);
5655

0 commit comments

Comments
 (0)