Ask the six optional setup questions after size so each tick can change suggested cards, keeping the answers on the draft and off the published Rule.

This commit is contained in:
adilallo committed 2026-11-05 20:26:07 -07:00
1 parent b4bfa157f8
commit bdaf1818d9
23 files changed
+399 -82

No files matched your search

@@ -27,6 +27,13 @@ const CommunitySizeSelectScreen = dynamic(
})),
{ loading: () => null },
);
const SetupQuestionsScreen = dynamic(
() =>
import("./select/SetupQuestionsScreen").then((m) => ({
default: m.SetupQuestionsScreen,
})),
{ loading: () => null },
);
const CommunityStructureSelectScreen = dynamic(
() =>
import("./select/CommunityStructureSelectScreen").then((m) => ({
@@ -135,6 +142,8 @@ export function renderCreateFlowScreen(screenId: CreateFlowStep): ReactNode {
);
case "community-size":
return <CommunitySizeSelectScreen />;
case "setup-questions":
return <SetupQuestionsScreen />;
case "community-upload":
return <CommunityUploadScreen />;
case "community-save":
@@ -0,0 +1,46 @@
"use client";
import CheckboxGroup from "../../../../components/controls/CheckboxGroup";
import { useMessages } from "../../../../contexts/MessagesContext";
import { useCreateFlow } from "../../context/CreateFlowContext";
import { CreateFlowHeaderLockup } from "../../components/CreateFlowHeaderLockup";
import { CreateFlowTwoColumnSelectShell } from "../../components/CreateFlowTwoColumnSelectShell";
import {
setupTraitsFromTickedIds,
tickedSetupTraitIds,
} from "../../../../../lib/create/setupTraits";
/**
* Create Community — Figma Flow - Checkboxes (25224:105566).
*/
export function SetupQuestionsScreen() {
const copy = useMessages().create.community.setupQuestions;
const { markCreateFlowInteraction, updateState, state } = useCreateFlow();
return (
<CreateFlowTwoColumnSelectShell
header={
<CreateFlowHeaderLockup
title={copy.title}
description={copy.description}
justification="left"
/>
}
>
<CheckboxGroup
value={tickedSetupTraitIds(state.setupTraits)}
onChange={({ value }) => {
markCreateFlowInteraction();
updateState({ setupTraits: setupTraitsFromTickedIds(value) });
}}
options={copy.questions.map((question) => ({
value: question.id,
label: question.label,
subtext: question.help,
}))}
aria-label={copy.title}
className="flex w-full flex-col gap-[20px] !space-y-0"
/>
</CreateFlowTwoColumnSelectShell>
);
}