Skip to content

Commit 0d2b8c9

Browse files
isabellaenriquezandrewshie-sentry
authored andcommitted
feat(checkout v3): Update step header styling (#97680)
Closes https://linear.app/getsentry/issue/BIL-1201/update-checkout-step-component Figma: https://www.figma.com/design/4ICnO5MHVqkm6JV0TKzf7H/Checkout-Redesign?node-id=2682-35410&t=HhE5uBzZqURJKr0h-1 This just deals with updating the step header styling, not building out the new steps. Per discussion with @itsdangold, we will not add collapsible steps right now. [We will also not be porting over the legacy toggle](https://sentry.slack.com/archives/C08BMQJ2VFE/p1754683225769579?thread_ts=1754680793.775069&cid=C08BMQJ2VFE). <img width="268" height="76" alt="Screenshot 2025-08-12 at 11 45 42 AM" src="https://github.com/user-attachments/assets/c56b0fe1-8f34-4435-bae7-c55642b24e74" />
1 parent 3c1c788 commit 0d2b8c9

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

static/gsApp/views/amCheckout/steps/stepHeader.spec.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,23 @@ describe('StepHeader', () => {
8787
expect(onEdit).not.toHaveBeenCalled();
8888
await userEvent.click(screen.getByText(mockTitle));
8989
});
90+
91+
it('renders for new checkout', function () {
92+
render(
93+
<StepHeader
94+
isNewCheckout
95+
title={mockTitle}
96+
stepNumber={stepNumber}
97+
onEdit={onEdit}
98+
isActive={false}
99+
isCompleted={false}
100+
/>
101+
);
102+
103+
expect(screen.getByText(mockTitle)).toBeInTheDocument();
104+
expect(screen.queryByText(`${stepNumber}.`)).not.toBeInTheDocument();
105+
expect(screen.queryByTestId('icon-check-mark')).not.toBeInTheDocument();
106+
expect(screen.queryByText('Edit')).not.toBeInTheDocument();
107+
expect(screen.queryByLabelText('Expand section')).not.toBeInTheDocument();
108+
});
90109
});

static/gsApp/views/amCheckout/steps/stepHeader.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type Props = {
2323
*/
2424
canSkip?: boolean;
2525
checkoutTier?: PlanTier;
26+
isNewCheckout?: boolean;
2627
onToggleLegacy?: (tier: string) => void;
2728
organization?: Organization;
2829
trailingItems?: React.ReactNode;
@@ -39,17 +40,30 @@ function StepHeader({
3940
onToggleLegacy,
4041
checkoutTier,
4142
organization,
43+
isNewCheckout,
4244
}: Props) {
4345
const canEdit = !isActive && (isCompleted || canSkip);
4446
const toggleTier = getToggleTier(checkoutTier);
4547
const onEditClick = canEdit ? () => onEdit(stepNumber) : undefined;
48+
const dataTestId = `header-${kebabCase(title)}`;
49+
50+
if (isNewCheckout) {
51+
return (
52+
<Flex justify="between">
53+
<NewCheckoutStepTitle id={`step-${stepNumber}`} data-test-id={dataTestId}>
54+
{title}
55+
</NewCheckoutStepTitle>
56+
{trailingItems && <div>{trailingItems}</div>}
57+
</Flex>
58+
);
59+
}
4660

4761
return (
4862
<Header
4963
isActive={isActive}
5064
canEdit={canEdit}
5165
onClick={onEditClick}
52-
data-test-id={`header-${kebabCase(title)}`}
66+
data-test-id={dataTestId}
5367
>
5468
<Flex justify="between">
5569
<StepTitle>
@@ -119,3 +133,8 @@ const EditStep = styled('div')`
119133
gap: ${space(1)};
120134
align-items: center;
121135
`;
136+
137+
const NewCheckoutStepTitle = styled('div')`
138+
font-size: ${p => p.theme.fontSize['2xl']};
139+
font-weight: ${p => p.theme.fontWeight.bold};
140+
`;

0 commit comments

Comments
 (0)