From f07092595ff23cb5be1cced33e1fd7450938cd2e Mon Sep 17 00:00:00 2001 From: Johannes <72809645+jobenjada@users.noreply.github.com> Date: Tue, 25 Nov 2025 01:49:59 -0800 Subject: [PATCH] feat: UI improvements to survey editor and summary cards (#6857) --- .../summary/components/AddressSummary.tsx | 73 ++++---- .../summary/components/ContactInfoSummary.tsx | 73 ++++---- .../components/DateQuestionSummary.tsx | 73 ++++---- .../summary/components/FileUploadSummary.tsx | 133 +++++++------- .../components/HiddenFieldsSummary.tsx | 73 ++++---- .../components/MultipleChoiceSummary.tsx | 172 +++++++++--------- .../summary/components/NPSSummary.tsx | 56 +++--- .../summary/components/OpenTextSummary.tsx | 111 +++++------ .../summary/components/RatingSummary.tsx | 7 +- .../summary/components/SummaryMetadata.tsx | 6 +- .../summary/components/SummaryPage.tsx | 1 + .../components/QuestionsComboBox.tsx | 2 +- apps/web/app/lib/surveys/surveys.test.ts | 127 +++++++++++++ apps/web/app/lib/surveys/surveys.ts | 4 +- apps/web/app/lib/templates.ts | 4 +- apps/web/i18n.lock | 5 +- apps/web/locales/de-DE.json | 5 +- apps/web/locales/en-US.json | 7 +- apps/web/locales/es-ES.json | 7 +- apps/web/locales/fr-FR.json | 7 +- apps/web/locales/ja-JP.json | 5 +- apps/web/locales/nl-NL.json | 7 +- apps/web/locales/pt-BR.json | 7 +- apps/web/locales/pt-PT.json | 7 +- apps/web/locales/ro-RO.json | 7 +- apps/web/locales/zh-Hans-CN.json | 5 +- apps/web/locales/zh-Hant-TW.json | 5 +- .../components/quota-condition-builder.tsx | 3 + .../ee/quotas/components/quota-modal.tsx | 24 ++- .../settings/(setup)/app-connection/page.tsx | 10 +- .../components/survey-variables-card-item.tsx | 2 +- .../editor/components/update-question-id.tsx | 2 +- .../follow-ups/components/follow-up-email.tsx | 6 +- .../follow-ups/components/follow-up-modal.tsx | 3 + .../ui/components/conditions-editor/index.tsx | 4 +- .../editor/styles-editor-frontend.css | 1 - .../ui/components/empty-state/index.tsx | 11 +- 37 files changed, 652 insertions(+), 403 deletions(-) diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/AddressSummary.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/AddressSummary.tsx index fa1e6f0c89..5689c22999 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/AddressSummary.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/AddressSummary.tsx @@ -8,6 +8,7 @@ import { timeSince } from "@/lib/time"; import { getContactIdentifier } from "@/lib/utils/contact"; import { ArrayResponse } from "@/modules/ui/components/array-response"; import { PersonAvatar } from "@/modules/ui/components/avatars"; +import { EmptyState } from "@/modules/ui/components/empty-state"; import { QuestionSummaryHeader } from "./QuestionSummaryHeader"; interface AddressSummaryProps { @@ -29,42 +30,48 @@ export const AddressSummary = ({ questionSummary, environmentId, survey, locale
+ {getContactIdentifier(response.contact, response.contactAttributes)} +
+ + ) : ( +{t("common.anonymous")}
- {getContactIdentifier(response.contact, response.contactAttributes)} -
- - ) : ( -{t("common.anonymous")}
-+ {getContactIdentifier(response.contact, response.contactAttributes)} +
+ + ) : ( +{t("common.anonymous")}
- {getContactIdentifier(response.contact, response.contactAttributes)} -
- - ) : ( -{t("common.anonymous")}
-- {getContactIdentifier(response.contact, response.contactAttributes)} -
- - ) : ( -{t("common.anonymous")}
-+ {getContactIdentifier(response.contact, response.contactAttributes)} +
+ + ) : ( +{t("common.anonymous")}
+- {getContactIdentifier(response.contact, response.contactAttributes)} -
- - ) : ( -{t("common.anonymous")}
-{fileName}
-- {t("common.skipped")} -
-+ {getContactIdentifier(response.contact, response.contactAttributes)} +
+ + ) : ( +{t("common.anonymous")}
+{fileName}
++ {t("common.skipped")} +
+- {getContactIdentifier(response.contact, response.contactAttributes)} -
- - ) : ( -{t("common.anonymous")}
-+ {getContactIdentifier(response.contact, response.contactAttributes)} +
+ + ) : ( +{t("common.anonymous")}
+