From 101c856496372941c7c00a810a5c02e3bb74a076 Mon Sep 17 00:00:00 2001 From: Johannes Date: Mon, 14 Oct 2024 17:50:40 -0700 Subject: [PATCH] final tweaks --- .../edit/components/AddEndingCardButton.tsx | 2 +- .../edit/components/AddQuestionButton.tsx | 2 +- .../edit/components/EditWelcomeCard.tsx | 4 ++-- .../edit/components/EditorCardMenu.tsx | 4 +--- .../edit/components/HiddenFieldsCard.tsx | 4 ++-- .../edit/components/SurveyVariablesCard.tsx | 2 +- .../components/MainNavigation.tsx | 16 ++++++--------- apps/web/playwright/survey.spec.ts | 20 +++++++++---------- apps/web/playwright/utils/helper.ts | 4 ++-- .../components/multi-language-card.tsx | 4 ++-- packages/ui/components/DropdownMenu/index.tsx | 12 +++++------ 11 files changed, 34 insertions(+), 40 deletions(-) diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddEndingCardButton.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddEndingCardButton.tsx index b614ba86be..ec9afc65f2 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddEndingCardButton.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddEndingCardButton.tsx @@ -18,7 +18,7 @@ export const AddEndingCardButton = ({ localSurvey, addEndingCard }: AddEndingCar
-

Add Ending

+

Add ending

); diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddQuestionButton.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddQuestionButton.tsx index fe73f85705..e3a6fbe3da 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddQuestionButton.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddQuestionButton.tsx @@ -38,7 +38,7 @@ export const AddQuestionButton = ({ addQuestion, product, isCxMode }: AddQuestio
-

Add Question

+

Add question

Add a new question to your survey

diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/EditWelcomeCard.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/EditWelcomeCard.tsx index 9b564a6053..8770214566 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/EditWelcomeCard.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/EditWelcomeCard.tsx @@ -75,11 +75,11 @@ export const EditWelcomeCard = ({ className="flex-1 rounded-r-lg border border-slate-200 transition-all duration-300 ease-in-out"> + className="flex cursor-pointer justify-between rounded-r-lg p-4 hover:bg-slate-50">
-

Welcome Card

+

Welcome card

{!open && (

{localSurvey?.welcomeCard?.enabled ? "Shown" : "Hidden"} diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/EditorCardMenu.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/EditorCardMenu.tsx index e898baea65..680303acae 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/EditorCardMenu.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/EditorCardMenu.tsx @@ -206,9 +206,7 @@ export const EditorCardMenu = ({ {cardType === "question" && ( - - Add question below - + Add question below {Object.entries(availableQuestionTypes).map(([type, name]) => { diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/HiddenFieldsCard.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/HiddenFieldsCard.tsx index 3bddd32830..98d6b11c8a 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/HiddenFieldsCard.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/HiddenFieldsCard.tsx @@ -100,11 +100,11 @@ export const HiddenFieldsCard = ({ className="flex-1 rounded-r-lg border border-slate-200 transition-all duration-300 ease-in-out"> + className="flex cursor-pointer justify-between rounded-r-lg p-4 hover:bg-slate-50">

-

Hidden Fields

+

Hidden fields

diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/SurveyVariablesCard.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/SurveyVariablesCard.tsx index d25c984bab..686e7b6af3 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/SurveyVariablesCard.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/SurveyVariablesCard.tsx @@ -48,7 +48,7 @@ export const SurveyVariablesCard = ({ className="flex-1 rounded-r-lg border border-slate-200 transition-all duration-300 ease-in-out"> + className="flex cursor-pointer justify-between rounded-r-lg p-4 hover:bg-slate-50">
diff --git a/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx b/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx index 4b49add672..ed64532f9f 100644 --- a/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx @@ -388,7 +388,7 @@ export const MainNavigation = ({ {sortedProducts.map((product) => (
{product.config.channel === "website" ? ( @@ -463,17 +463,13 @@ export const MainNavigation = ({ {dropdownNavigation.map( (link) => !link.hidden && ( - - }> + icon={}> + {link.label} - - + + ) )} diff --git a/apps/web/playwright/survey.spec.ts b/apps/web/playwright/survey.spec.ts index c9010e0ee1..990c03faa6 100644 --- a/apps/web/playwright/survey.spec.ts +++ b/apps/web/playwright/survey.spec.ts @@ -247,47 +247,47 @@ test.describe("Multi Language Survey Create", async () => { await page.getByText("Welcome CardShownOn").click(); // Add questions in default language - await page.getByText("Add Question").click(); + await page.getByText("Add question").click(); await page.getByRole("button", { name: "Single-Select" }).click(); await page .locator("div") - .filter({ hasText: /^Add QuestionAdd a new question to your survey$/ }) + .filter({ hasText: /^Add questionAdd a new question to your survey$/ }) .nth(1) .click(); await page.getByRole("button", { name: "Multi-Select" }).click(); await page .locator("div") - .filter({ hasText: /^Add QuestionAdd a new question to your survey$/ }) + .filter({ hasText: /^Add questionAdd a new question to your survey$/ }) .nth(1) .click(); await page.getByRole("button", { name: "Picture Selection" }).click(); await page .locator("div") - .filter({ hasText: /^Add QuestionAdd a new question to your survey$/ }) + .filter({ hasText: /^Add questionAdd a new question to your survey$/ }) .nth(1) .click(); await page.getByRole("button", { name: "Rating" }).click(); await page .locator("div") - .filter({ hasText: /^Add QuestionAdd a new question to your survey$/ }) + .filter({ hasText: /^Add questionAdd a new question to your survey$/ }) .nth(1) .click(); await page.getByRole("button", { name: "Net Promoter Score (NPS)" }).click(); await page .locator("div") - .filter({ hasText: /^Add QuestionAdd a new question to your survey$/ }) + .filter({ hasText: /^Add questionAdd a new question to your survey$/ }) .nth(1) .click(); await page.getByRole("button", { name: "Date" }).click(); await page .locator("div") - .filter({ hasText: /^Add QuestionAdd a new question to your survey$/ }) + .filter({ hasText: /^Add questionAdd a new question to your survey$/ }) .nth(1) .click(); await page.getByRole("button", { name: "File Upload" }).click(); await page .locator("div") - .filter({ hasText: /^Add QuestionAdd a new question to your survey$/ }) + .filter({ hasText: /^Add questionAdd a new question to your survey$/ }) .nth(1) .click(); @@ -295,13 +295,13 @@ test.describe("Multi Language Survey Create", async () => { await page.getByRole("button", { name: "Matrix" }).click(); await page .locator("div") - .filter({ hasText: /^Add QuestionAdd a new question to your survey$/ }) + .filter({ hasText: /^Add questionAdd a new question to your survey$/ }) .nth(1) .click(); await page.getByRole("button", { name: "Address" }).click(); await page .locator("div") - .filter({ hasText: /^Add QuestionAdd a new question to your survey$/ }) + .filter({ hasText: /^Add questionAdd a new question to your survey$/ }) .nth(1) .click(); await page.getByRole("button", { name: "Ranking" }).click(); diff --git a/apps/web/playwright/utils/helper.ts b/apps/web/playwright/utils/helper.ts index 07b31115ee..5f30eb5315 100644 --- a/apps/web/playwright/utils/helper.ts +++ b/apps/web/playwright/utils/helper.ts @@ -136,7 +136,7 @@ export const signupUsingInviteToken = async (page: Page, name: string, email: st }; export const createSurvey = async (page: Page, params: CreateSurveyParams) => { - const addQuestion = "Add QuestionAdd a new question to your survey"; + const addQuestion = "Add questionAdd a new question to your survey"; await page.getByRole("button", { name: "Start from scratch Create a" }).click(); await page.getByRole("button", { name: "Create survey", exact: true }).click(); @@ -324,7 +324,7 @@ export const createSurvey = async (page: Page, params: CreateSurveyParams) => { }; export const createSurveyWithLogic = async (page: Page, params: CreateSurveyWithLogicParams) => { - const addQuestion = "Add QuestionAdd a new question to your survey"; + const addQuestion = "Add questionAdd a new question to your survey"; await page.getByRole("button", { name: "Start from scratch Create a" }).click(); await page.getByRole("button", { name: "Create survey", exact: true }).click(); diff --git a/packages/ee/multi-language/components/multi-language-card.tsx b/packages/ee/multi-language/components/multi-language-card.tsx index 400d3007de..e6db53af09 100644 --- a/packages/ee/multi-language/components/multi-language-card.tsx +++ b/packages/ee/multi-language/components/multi-language-card.tsx @@ -190,11 +190,11 @@ export const MultiLanguageCard: FC = ({ open={open}> + className="flex cursor-pointer justify-between rounded-r-lg p-4 hover:bg-slate-50">
-

Multiple Languages

+

Multiple languages

diff --git a/packages/ui/components/DropdownMenu/index.tsx b/packages/ui/components/DropdownMenu/index.tsx index 9d8cd9d9c0..c0fc4ae0f9 100644 --- a/packages/ui/components/DropdownMenu/index.tsx +++ b/packages/ui/components/DropdownMenu/index.tsx @@ -29,7 +29,7 @@ const DropdownMenuSubTrigger: React.ComponentType<