From 426a0a3847704acb8e976aae892964fb5efd4582 Mon Sep 17 00:00:00 2001 From: Johannes <72809645+jobenjada@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:50:58 +0200 Subject: [PATCH] fix: tweak action UI (#3136) --- .../edit/components/AddActionModal.tsx | 1 + .../edit/components/CreateNewActionTab.tsx | 4 ++-- .../edit/components/TargetingCard.tsx | 2 +- .../components/PageUrlSelector.tsx | 24 ++++++++----------- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddActionModal.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddActionModal.tsx index 5f58034978..372aea7336 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddActionModal.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/AddActionModal.tsx @@ -56,6 +56,7 @@ export const AddActionModal = ({ return (
-
+
(
- + ) : ( diff --git a/packages/ui/organisms/NoCodeActionForm/components/PageUrlSelector.tsx b/packages/ui/organisms/NoCodeActionForm/components/PageUrlSelector.tsx index fc0d50827c..bce60154a9 100644 --- a/packages/ui/organisms/NoCodeActionForm/components/PageUrlSelector.tsx +++ b/packages/ui/organisms/NoCodeActionForm/components/PageUrlSelector.tsx @@ -1,12 +1,16 @@ -import { Globe, PlusIcon, TrashIcon } from "lucide-react"; +import { PlusIcon, TrashIcon } from "lucide-react"; import { useState } from "react"; -import { Control, FieldArrayWithId, UseFieldArrayRemove, useFieldArray } from "react-hook-form"; -import { UseFormReturn } from "react-hook-form"; +import { + Control, + FieldArrayWithId, + UseFieldArrayRemove, + UseFormReturn, + useFieldArray, +} from "react-hook-form"; import toast from "react-hot-toast"; import { cn } from "@formbricks/lib/cn"; import { testURLmatch } from "@formbricks/lib/utils/url"; import { TActionClassInput, TActionClassPageUrlRule } from "@formbricks/types/action-classes"; -import { Alert, AlertDescription, AlertTitle } from "../../../Alert"; import { Button } from "../../../Button"; import { FormControl, FormField, FormItem } from "../../../Form"; import { Input } from "../../../Input"; @@ -64,7 +68,7 @@ export const PageUrlSelector = ({ form }: PageUrlSelectorProps) => { name="noCodeConfig.urlFilters" render={() => (
- +

Limit the pages on which this action gets captured

@@ -83,7 +87,7 @@ export const PageUrlSelector = ({ form }: PageUrlSelectorProps) => { )} />
- {filterType === "specific" ? ( + {filterType === "specific" && (
@@ -130,14 +134,6 @@ export const PageUrlSelector = ({ form }: PageUrlSelectorProps) => {
- ) : ( -
- - - Visible on all pages - This action will be captured on all pages of your website - -
)} );