Skip to content

Commit 5fdedd9

Browse files
Improve product onboarding form (#19755)
1 parent 3aebe7f commit 5fdedd9

File tree

5 files changed

+21
-13
lines changed

5 files changed

+21
-13
lines changed

Diff for: components/dashboard/src/components/forms/CheckboxInputField.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,24 @@ import { InputFieldHint } from "./InputFieldHint";
1212

1313
type CheckboxListFieldProps = {
1414
label?: string;
15+
sublabel?: string;
1516
error?: ReactNode;
1617
className?: string;
1718
topMargin?: boolean;
1819
};
1920

2021
// CheckboxListField is a wrapper for a list of related CheckboxInputField components.
21-
export const CheckboxListField: FC<CheckboxListFieldProps> = ({ label, error, className, topMargin, children }) => {
22+
export const CheckboxListField: FC<CheckboxListFieldProps> = ({
23+
label,
24+
sublabel,
25+
error,
26+
className,
27+
topMargin,
28+
children,
29+
}) => {
2230
return (
2331
<InputField label={label} className={className} error={error} topMargin={topMargin}>
32+
{sublabel && <div className="text-sm text-gray-500 dark:text-gray-400">{sublabel}</div>}
2433
<div className="space-y-2 ml-2">{children}</div>
2534
</InputField>
2635
);

Diff for: components/dashboard/src/onboarding/OnboardingStep.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { LoadingButton } from "@podkit/buttons/LoadingButton";
1212

1313
type Props = {
1414
title: string;
15-
subtitle: string;
15+
subtitle?: string;
1616
isValid: boolean;
1717
isSaving?: boolean;
1818
error?: string;
@@ -53,7 +53,7 @@ export const OnboardingStep: FC<Props> = ({
5353
<div className="flex flex-col items-center justify-center max-w-full">
5454
{/* Intentionally adjusting the size of the heading here */}
5555
<Heading2 className="text-4xl">{title}</Heading2>
56-
<Subheading>{subtitle}</Subheading>
56+
{subtitle && <Subheading>{subtitle}</Subheading>}
5757

5858
<form className="mt-8 mb-14 max-w-lg" onSubmit={handleSubmit}>
5959
{/* Form contents provided as children */}

Diff for: components/dashboard/src/onboarding/StepOrgInfo.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,14 @@ export const StepOrgInfo: FC<Props> = ({ user, onComplete }) => {
159159
return (
160160
<OnboardingStep
161161
title="Tell us more about you"
162-
subtitle="Let us know what brought you here."
163162
error={updateUser.isError ? "There was a problem saving your answers" : ""}
164163
isValid={isValid}
165164
isSaving={updateUser.isLoading}
166165
onSubmit={handleSubmit}
167166
>
168167
<SelectInputField
169168
value={jobRole}
170-
label="I work in..."
169+
label="What best describes your role"
171170
onChange={(val) => {
172171
if (val !== "other") {
173172
setJobRoleOther("");
@@ -188,7 +187,7 @@ export const StepOrgInfo: FC<Props> = ({ user, onComplete }) => {
188187
<TextInputField value={jobRoleOther} onChange={setJobRoleOther} placeholder="Please share (optional)" />
189188
)}
190189

191-
<CheckboxListField label="I'm exploring Gitpod...">
190+
<CheckboxListField label="You're exploring Gitpod for">
192191
{explorationReasonsOptions.map((o) => (
193192
<CheckboxInputField
194193
key={o.value}
@@ -223,7 +222,7 @@ export const StepOrgInfo: FC<Props> = ({ user, onComplete }) => {
223222
</SelectInputField>
224223
)}
225224

226-
<CheckboxListField label="I'm signing up for Gitpod for...">
225+
<CheckboxListField label="I'm hoping to use Gitpod for" sublabel="Select all that apply">
227226
{signupGoalsOptions.map((o) => (
228227
<CheckboxInputField
229228
key={o.value}

Diff for: components/dashboard/src/onboarding/exploration-reasons.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ export const EXPLORE_REASON_WORK = "explore-professional";
77

88
export const getExplorationReasons = () => {
99
return [
10-
{ value: EXPLORE_REASON_WORK, label: "For work" },
11-
{ value: "explore-personal", label: "For personal projects or open-source" },
10+
{ value: EXPLORE_REASON_WORK, label: "Work" },
11+
{ value: "explore-personal", label: "Personal projects or open-source development" },
1212
{
1313
value: "replace-remote-dev",
14-
label: "To replace remote/containerized development (VDI, VM, Docker Desktop)",
14+
label: "Replacing remote or containerized development (i.e. VDI, VM, Docker Desktop)",
1515
},
1616
];
1717
};

Diff for: components/dashboard/src/onboarding/signup-goals.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ export const SIGNUP_GOALS_OTHER = "other";
88

99
export const getSignupGoalsOptions = () => {
1010
return [
11-
{ value: "efficiency-collab", label: "Dev efficiency & collaboration" },
1211
{ value: "onboarding", label: "Faster onboarding" },
13-
{ value: "powerful-resources", label: "More powerful dev resources" },
14-
{ value: "security", label: "More secure dev process" },
12+
{ value: "efficiency-collab", label: "Improve developer efficiency and collaboration" },
13+
{ value: "powerful-resources", label: "More powerful development resources" },
14+
{ value: "security", label: "More secure development process" },
1515
{ value: SIGNUP_GOALS_OTHER, label: "Other" },
1616
];
1717
};

0 commit comments

Comments
 (0)