Skip to content

Commit 6d9e83c

Browse files
authored
feat: onboarding styling - make all steps full height (#1172)
### TL;DR Improved the layout structure of onboarding steps to use proper flexbox layout with fixed header, scrollable content area, and fixed footer. ### What changed? Restructured the layout of all onboarding step components (BillingStep, GitIntegrationStep, SignalsStep, and WelcomeStep) to use a consistent three-section layout: - Fixed header with PostHog logo at the top - Scrollable content area in the middle that takes up remaining space - Fixed footer with navigation buttons at the bottom The main container now uses `flex: 1` for the content area with `overflowY: "auto"` to handle content that exceeds the viewport height, while the header and footer use `flexShrink="0"` to maintain their fixed positions.
1 parent 59c8976 commit 6d9e83c

4 files changed

Lines changed: 416 additions & 348 deletions

File tree

apps/code/src/renderer/features/onboarding/components/BillingStep.tsx

Lines changed: 66 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -38,55 +38,75 @@ export function BillingStep({ onNext, onBack }: BillingStepProps) {
3838

3939
return (
4040
<Flex align="center" height="100%" px="8">
41-
<Flex direction="column" gap="6" style={{ width: "100%", maxWidth: 520 }}>
42-
<Flex direction="column" gap="3">
43-
<img
44-
src={phWordmark}
45-
alt="PostHog"
46-
style={{
47-
height: "40px",
48-
objectFit: "contain",
49-
alignSelf: "flex-start",
50-
}}
51-
/>
52-
<Text
53-
size="6"
54-
style={{
55-
color: "var(--gray-12)",
56-
lineHeight: 1.3,
57-
}}
58-
>
59-
Choose your plan
60-
</Text>
61-
</Flex>
41+
<Flex
42+
direction="column"
43+
style={{
44+
width: "100%",
45+
maxWidth: 520,
46+
height: "100%",
47+
paddingTop: 80,
48+
paddingBottom: 40,
49+
}}
50+
>
51+
<img
52+
src={phWordmark}
53+
alt="PostHog"
54+
style={{
55+
height: "40px",
56+
objectFit: "contain",
57+
alignSelf: "flex-start",
58+
}}
59+
/>
6260

63-
<Flex direction="column" gap="3">
64-
{/* Free Plan */}
65-
<PlanCard
66-
name="Free"
67-
price="$0"
68-
period="/month"
69-
features={FREE_FEATURES}
70-
isSelected={selectedPlan === "free"}
71-
onSelect={() => selectPlan("free")}
72-
/>
61+
<Flex
62+
direction="column"
63+
justify="center"
64+
style={{ flex: 1, minHeight: 0, overflowY: "auto" }}
65+
>
66+
<Flex direction="column" gap="6">
67+
<Text
68+
size="6"
69+
style={{
70+
color: "var(--gray-12)",
71+
lineHeight: 1.3,
72+
}}
73+
>
74+
Choose your plan
75+
</Text>
76+
<Flex direction="column" gap="3">
77+
{/* Free Plan */}
78+
<PlanCard
79+
name="Free"
80+
price="$0"
81+
period="/month"
82+
features={FREE_FEATURES}
83+
isSelected={selectedPlan === "free"}
84+
onSelect={() => selectPlan("free")}
85+
/>
7386

74-
{/* Pro Plan */}
75-
<PlanCard
76-
name="Pro"
77-
price="$200"
78-
period="/month"
79-
features={PRO_FEATURES}
80-
isSelected={selectedPlan === "pro"}
81-
onSelect={() => selectPlan("pro")}
82-
recommended
83-
/>
87+
{/* Pro Plan */}
88+
<PlanCard
89+
name="Pro"
90+
price="$200"
91+
period="/month"
92+
features={PRO_FEATURES}
93+
isSelected={selectedPlan === "pro"}
94+
onSelect={() => selectPlan("pro")}
95+
recommended
96+
/>
97+
</Flex>
98+
<Text
99+
size="1"
100+
mt="3"
101+
style={{ color: "var(--gray-12)", opacity: 0.5 }}
102+
>
103+
* Usage is limited to "human" level usage, this cannot be used as
104+
your api key. If you hit this limit, please contact support.
105+
</Text>
106+
</Flex>
84107
</Flex>
85-
<Text size="1" style={{ color: "var(--gray-12)", opacity: 0.5 }}>
86-
* Usage is limited to "human" level usage, this cannot be used as your
87-
api key. If you hit this limit, please contact support.
88-
</Text>
89-
<Flex gap="3" align="center">
108+
109+
<Flex gap="3" align="center" flexShrink="0">
90110
<Button
91111
size="3"
92112
variant="ghost"

0 commit comments

Comments
 (0)