From bdaf1818d92e55c3c22819af1e74444aa504ee93 Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Thu, 5 Nov 2026 20:26:07 -0700 Subject: [PATCH 1/2] 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. --- app/(app)/create/CreateFlowLayoutClient.tsx | 35 ++++++++ .../screens/createFlowScreenComponents.tsx | 9 ++ .../screens/select/SetupQuestionsScreen.tsx | 46 ++++++++++ app/(app)/create/types.ts | 1 + .../utils/createFlowProportionProgress.ts | 3 +- .../create/utils/createFlowScreenRegistry.ts | 6 ++ app/(app)/create/utils/flowSteps.ts | 10 ++- .../CheckboxGroup/CheckboxGroup.view.tsx | 9 +- docs/create-flow.md | 29 +++--- lib/create/setupTraits.ts | 35 ++++++++ .../en/create/community/setupQuestions.json | 37 ++++++++ messages/en/create/footer.json | 1 + messages/en/create/setupQuestions.json | 60 ------------- messages/en/index.ts | 2 + tests/pages/setup-questions.test.tsx | 90 +++++++++++++++++++ tests/unit/buildPublishPayload.test.ts | 11 +++ tests/unit/createFlowLayoutTokens.test.ts | 3 + .../unit/createFlowProportionProgress.test.ts | 5 +- tests/unit/createFlowValidation.test.ts | 22 +++++ tests/unit/createFooterMessages.test.ts | 5 ++ tests/unit/flowSteps.test.ts | 15 +++- tests/unit/groupAnswers.test.ts | 7 ++ tests/unit/setupTraits.test.ts | 40 +++++++++ 23 files changed, 399 insertions(+), 82 deletions(-) create mode 100644 app/(app)/create/screens/select/SetupQuestionsScreen.tsx create mode 100644 lib/create/setupTraits.ts create mode 100644 messages/en/create/community/setupQuestions.json delete mode 100644 messages/en/create/setupQuestions.json create mode 100644 tests/pages/setup-questions.test.tsx create mode 100644 tests/unit/setupTraits.test.ts diff --git a/app/(app)/create/CreateFlowLayoutClient.tsx b/app/(app)/create/CreateFlowLayoutClient.tsx index 38ed396..770eead 100644 --- a/app/(app)/create/CreateFlowLayoutClient.tsx +++ b/app/(app)/create/CreateFlowLayoutClient.tsx @@ -91,6 +91,10 @@ import { isCommunitySizeStepBlocked, isCommunityStructureStepBlocked, } from "./utils/createFlowFooterLabels"; +import { + EMPTY_SETUP_TRAITS, + hasTickedSetupTrait, +} from "../../../lib/create/setupTraits"; import { useAuthModal } from "../../contexts/AuthModalContext"; import { useMessages, useTranslation } from "../../contexts/MessagesContext"; import { PostLoginDraftTransfer } from "./PostLoginDraftTransfer"; @@ -984,6 +988,37 @@ function CreateFlowLayoutContent({ : footer.submitEmail} + ) : currentStep === "setup-questions" && nextStep ? ( +
+ + +
) : currentStep === "community-upload" && nextStep ? (