From 712437edc73f5cb578e6f07226c23aae6a9f2ffe Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Tue, 25 Aug 2026 09:49:10 -0600 Subject: [PATCH] Align custom policy details with the Figma create modal so the add-field control, copy, and labels match the intended styling. Co-authored-by: Cursor --- .../CustomMethodCardWizard.container.tsx | 2 + .../CustomMethodCardWizard.view.tsx | 2 +- .../CustomMethodCardWizardBlocksList.view.tsx | 2 +- ...CustomMethodCardWizardFieldBodies.view.tsx | 8 +-- app/components/buttons/Vertical/Vertical.tsx | 2 +- .../AddCustomField.container.tsx | 2 +- .../AddCustomField/AddCustomField.types.ts | 2 +- .../AddCustomField/AddCustomField.view.tsx | 64 +++++++------------ app/components/modals/Create/Create.view.tsx | 2 +- .../customRule/customMethodCardWizard.json | 4 +- ...unicationMethodsScreenPersistence.test.tsx | 6 +- .../CoreValuesSelectScreen.test.tsx | 48 +++++++++++++- tests/components/FinalReviewPage.test.tsx | 4 +- 13 files changed, 88 insertions(+), 60 deletions(-) diff --git a/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizard.container.tsx b/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizard.container.tsx index e745f6d..4c5f8bd 100644 --- a/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizard.container.tsx +++ b/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizard.container.tsx @@ -388,6 +388,7 @@ const CustomMethodCardWizardContainer = memo( const handleSelectFieldType = useCallback((ft: AddCustomFieldType) => { setEditingBlockId(null); + setAddFieldExpanded(false); resetFieldTypeDrafts(); setFieldTypeModal(ft); fieldModalSnapshotRef.current = JSON.stringify({ @@ -531,6 +532,7 @@ const CustomMethodCardWizardContainer = memo( }); setFieldTypeModal(null); setEditingBlockId(null); + setAddFieldExpanded(false); fieldModalSnapshotRef.current = null; }, [ badgeBlockTitle, diff --git a/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizard.view.tsx b/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizard.view.tsx index 29cbb79..7d80080 100644 --- a/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizard.view.tsx +++ b/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizard.view.tsx @@ -90,7 +90,7 @@ function CustomMethodCardWizardViewComponent({ /> ) : null} {!fieldTypeModal && wizardStep === 3 ? ( -
+
{draftFieldBlocks.length > 0 ? ( {blocks.map((block, index) => { diff --git a/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizardFieldBodies.view.tsx b/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizardFieldBodies.view.tsx index aba6e85..1c471f5 100644 --- a/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizardFieldBodies.view.tsx +++ b/app/(app)/create/components/CustomMethodCardWizard/CustomMethodCardWizardFieldBodies.view.tsx @@ -53,11 +53,9 @@ function CustomMethodCardWizardFieldBodiesViewComponent({ maxLength={CUSTOM_METHOD_CARD_WIZARD_MAX_FIELD_CHARS} />
- +