From 5dcd32050af705017a7b9481a3f1c78bd90e80f6 Mon Sep 17 00:00:00 2001 From: Johannes <72809645+jobenjada@users.noreply.github.com> Date: Mon, 2 Dec 2024 19:42:07 -0800 Subject: [PATCH] fix: usability improvements survey editor (#4362) Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com> Co-authored-by: Dhruwang --- .../edit/components/AddressQuestionForm.tsx | 2 +- .../edit/components/CalQuestionForm.tsx | 4 +- .../edit/components/ConditionalLogic.tsx | 1 - .../components/ContactInfoQuestionForm.tsx | 2 +- .../edit/components/DateQuestionForm.tsx | 4 +- .../edit/components/EditorCardMenu.tsx | 52 +++++++++++-------- .../components/FileUploadQuestionForm.tsx | 5 +- .../edit/components/MatrixQuestionForm.tsx | 48 +++++++++++------ .../components/MultipleChoiceQuestionForm.tsx | 8 +-- .../edit/components/NPSQuestionForm.tsx | 6 +-- .../edit/components/OpenQuestionForm.tsx | 2 +- .../edit/components/PictureSelectionForm.tsx | 4 +- .../edit/components/QuestionCard.tsx | 2 +- .../edit/components/QuestionOptionChoice.tsx | 41 ++++++++++----- .../edit/components/RankingQuestionForm.tsx | 4 +- .../edit/components/RatingQuestionForm.tsx | 6 +-- .../components/QuestionFormInput/index.tsx | 42 +++++++++++---- .../modules/ui/components/button/index.tsx | 2 +- .../ui/components/file-input/index.tsx | 4 +- apps/web/playwright/survey.spec.ts | 2 +- apps/web/playwright/utils/helper.ts | 52 +++++++++---------- packages/lib/messages/de-DE.json | 1 + packages/lib/messages/en-US.json | 3 +- packages/lib/messages/pt-BR.json | 1 + 24 files changed, 180 insertions(+), 118 deletions(-) diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddressQuestionForm.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddressQuestionForm.tsx index 09924bc5a1..e69ecacfaf 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddressQuestionForm.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddressQuestionForm.tsx @@ -136,7 +136,7 @@ export const AddressQuestionForm = ({ {question.subheader === undefined && ( )} -
+
diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/ConditionalLogic.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/ConditionalLogic.tsx index cd74032cc4..c58173196c 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/ConditionalLogic.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/ConditionalLogic.tsx @@ -186,7 +186,6 @@ export function ConditionalLogic({
@@ -190,7 +199,7 @@ export const MatrixQuestionForm = ({
@@ -233,7 +251,7 @@ export const MatrixQuestionForm = ({ )}
); diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/RankingQuestionForm.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/RankingQuestionForm.tsx index efe04fe634..7b3534dcda 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/RankingQuestionForm.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/RankingQuestionForm.tsx @@ -158,7 +158,7 @@ export const RankingQuestionForm = ({ {question.subheader === undefined && (