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 283b6f23a4..e8b2d4e814 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 @@ -141,37 +141,33 @@ export function ConditionalLogic({ { duplicateLogic(logicItemIdx); - }}> - + }} + icon={}> Duplicate { moveLogic(logicItemIdx, logicItemIdx - 1); - }}> - + }} + icon={}> Move up { moveLogic(logicItemIdx, logicItemIdx + 1); - }}> - + }} + icon={}> Move down { handleRemoveLogic(logicItemIdx); - }}> - + }} + icon={}> Remove 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 bede5a1cf1..e898baea65 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 @@ -162,7 +162,7 @@ export const EditorCardMenu = ({ - +
{cardType === "question" && ( @@ -170,13 +170,12 @@ export const EditorCardMenu = ({ Change question type - + {Object.entries(availableQuestionTypes).map(([type, name]) => { if (type === card.type) return null; return ( { setChangeToType(type as TSurveyQuestionTypeEnum); if ((card as TSurveyQuestion).logic) { @@ -185,8 +184,8 @@ export const EditorCardMenu = ({ } changeQuestionType(type as TSurveyQuestionTypeEnum); - }}> - {QUESTIONS_ICON_MAP[type as TSurveyQuestionTypeEnum]} + }} + icon={QUESTIONS_ICON_MAP[type as TSurveyQuestionTypeEnum]}> {name} ); @@ -196,7 +195,7 @@ export const EditorCardMenu = ({ )} {cardType === "ending" && ( { e.preventDefault(); addEndingCardBelow(); @@ -211,12 +210,12 @@ export const EditorCardMenu = ({ Add question below - + {Object.entries(availableQuestionTypes).map(([type, name]) => { return ( { e.stopPropagation(); if (cardType === "question") { @@ -232,33 +231,27 @@ export const EditorCardMenu = ({ )} { if (cardIdx !== 0) { e.stopPropagation(); moveCard(cardIdx, true); } }} + icon={} disabled={cardIdx === 0}> - Move up - + Move up { if (!lastCard) { e.stopPropagation(); moveCard(cardIdx, false); } }} + icon={} disabled={lastCard}> - Move down - + Move down
diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/LogicEditorActions.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/LogicEditorActions.tsx index 0db655d32e..2128c46d4a 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/LogicEditorActions.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/LogicEditorActions.tsx @@ -200,30 +200,27 @@ export function LogicEditorActions({ { handleActionsChange("addBelow", idx); - }}> - + }} + icon={}> Add action below { handleActionsChange("remove", idx); - }}> - + }} + icon={}> Remove { handleActionsChange("duplicate", idx); - }}> - + }} + icon={}> Duplicate diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/LogicEditorConditions.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/LogicEditorConditions.tsx index 559ca7598d..684d9f8448 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/LogicEditorConditions.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/LogicEditorConditions.tsx @@ -216,18 +216,16 @@ export function LogicEditorConditions({ { handleAddConditionBelow(condition.id); - }}> - + }} + icon={}> Add condition below handleRemoveCondition(condition.id)}> - + onClick={() => handleRemoveCondition(condition.id)} + icon={}> Remove @@ -307,30 +305,26 @@ export function LogicEditorConditions({ { handleAddConditionBelow(condition.id); - }}> - + }} + icon={}> Add condition below handleRemoveCondition(condition.id)}> - + onClick={() => handleRemoveCondition(condition.id)} + icon={}> Remove handleDuplicateCondition(condition.id)}> - + onClick={() => handleDuplicateCondition(condition.id)} + icon={}> Duplicate handleCreateGroup(condition.id)}> - + onClick={() => handleCreateGroup(condition.id)} + icon={}> Create group diff --git a/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx b/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx index b74bb2cc4a..4b4a10bc39 100644 --- a/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/components/MainNavigation.tsx @@ -323,7 +323,10 @@ export const MainNavigation = ({ )} - +
{isOwnerOrAdmin && ( - handleAddProduct(organization.id)}> - + handleAddProduct(organization.id)} + icon={}> Add product )} @@ -463,8 +467,9 @@ export const MainNavigation = ({ target={link.target} key={link.label} className="flex items-center"> - - + }> {link.label} @@ -477,8 +482,8 @@ export const MainNavigation = ({ onClick={async () => { await signOut({ callbackUrl: "/auth/login" }); await formbricksLogout(); - }}> - + }} + icon={}> Logout @@ -510,8 +515,9 @@ export const MainNavigation = ({ {isMultiOrgEnabled && ( - setShowCreateOrganizationModal(true)}> - + setShowCreateOrganizationModal(true)} + icon={}> Create new organization )} diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/CustomFilter.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/CustomFilter.tsx index d4e96c3b59..286deb058d 100755 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/CustomFilter.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/CustomFilter.tsx @@ -223,7 +223,6 @@ export const CustomFilter = ({ survey }: CustomFilterProps) => { { setFilterRange(FilterDropDownLabels.ALL_TIME); setDateRange({ from: undefined, to: getTodayDate() }); @@ -231,7 +230,6 @@ export const CustomFilter = ({ survey }: CustomFilterProps) => {

All time

{ setFilterRange(FilterDropDownLabels.LAST_7_DAYS); setDateRange({ from: startOfDay(subDays(new Date(), 7)), to: getTodayDate() }); @@ -239,7 +237,6 @@ export const CustomFilter = ({ survey }: CustomFilterProps) => {

Last 7 days

{ setFilterRange(FilterDropDownLabels.LAST_30_DAYS); setDateRange({ from: startOfDay(subDays(new Date(), 30)), to: getTodayDate() }); @@ -247,7 +244,6 @@ export const CustomFilter = ({ survey }: CustomFilterProps) => {

Last 30 days

{ setIsDatePickerOpen(true); setFilterRange(FilterDropDownLabels.CUSTOM_RANGE); @@ -274,28 +270,24 @@ export const CustomFilter = ({ survey }: CustomFilterProps) => { { handleDowndloadResponses(FilterDownload.ALL, "csv"); }}>

All responses (CSV)

{ handleDowndloadResponses(FilterDownload.ALL, "xlsx"); }}>

All responses (Excel)

{ handleDowndloadResponses(FilterDownload.FILTER, "csv"); }}>

Current selection (CSV)

{ handleDowndloadResponses(FilterDownload.FILTER, "xlsx"); }}> diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/ResultsShareButton.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/ResultsShareButton.tsx index 2d3246c4e0..4573a7a360 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/ResultsShareButton.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/ResultsShareButton.tsx @@ -98,34 +98,29 @@ export const ResultsShareButton = ({ survey, webAppUrl }: ResultsShareButtonProp {survey.resultShareKey ? ( { navigator.clipboard.writeText(surveyUrl); toast.success("Link to public results copied"); - }}> -

- Copy link to public results -

+ }} + icon={}> +

Copy link to public results

) : ( { copyUrlToClipboard(); - }}> -

- Copy link -

+ }} + icon={}> +

Copy link

)} { setShowResultsLinkModal(true); - }}> + }} + icon={}>

{survey.resultShareKey ? "Unpublish from web" : "Publish to web"} -

diff --git a/packages/ee/advanced-targeting/components/segment-editor.tsx b/packages/ee/advanced-targeting/components/segment-editor.tsx index 435fbc1a36..4ee733f091 100644 --- a/packages/ee/advanced-targeting/components/segment-editor.tsx +++ b/packages/ee/advanced-targeting/components/segment-editor.tsx @@ -1,4 +1,4 @@ -import { MoreVertical, Trash2 } from "lucide-react"; +import { ArrowDownIcon, ArrowUpIcon, MoreVertical, Trash2 } from "lucide-react"; import { useState } from "react"; import { cn } from "@formbricks/lib/cn"; import { structuredClone } from "@formbricks/lib/pollyfills/structuredClone"; @@ -224,7 +224,8 @@ export function SegmentEditor({ { handleMoveResource(groupId, "up"); - }}> + }} + icon={}> Move up @@ -232,7 +233,8 @@ export function SegmentEditor({ onClick={() => { if (viewOnly) return; handleMoveResource(groupId, "down"); - }}> + }} + icon={}> Move down
diff --git a/packages/ee/advanced-targeting/components/segment-filter.tsx b/packages/ee/advanced-targeting/components/segment-filter.tsx index f80e9596e6..3c04143428 100644 --- a/packages/ee/advanced-targeting/components/segment-filter.tsx +++ b/packages/ee/advanced-targeting/components/segment-filter.tsx @@ -1,4 +1,6 @@ import { + ArrowDownIcon, + ArrowUpIcon, FingerprintIcon, MonitorSmartphoneIcon, MoreVertical, @@ -161,13 +163,15 @@ function SegmentFilterItemContextMenu({ { onMoveFilter(filterId, "up"); - }}> + }} + icon={}> Move up { onMoveFilter(filterId, "down"); - }}> + }} + icon={}> Move down
diff --git a/packages/ui/components/BasicSegmentEditor/components/SegmentFilterItemContextMenu.tsx b/packages/ui/components/BasicSegmentEditor/components/SegmentFilterItemContextMenu.tsx index 51a5de0a19..971e94805c 100644 --- a/packages/ui/components/BasicSegmentEditor/components/SegmentFilterItemContextMenu.tsx +++ b/packages/ui/components/BasicSegmentEditor/components/SegmentFilterItemContextMenu.tsx @@ -1,4 +1,4 @@ -import { EllipsisVerticalIcon, Trash2Icon } from "lucide-react"; +import { ArrowDownIcon, ArrowUpIcon, EllipsisVerticalIcon, Trash2Icon } from "lucide-react"; import { cn } from "@formbricks/lib/cn"; import { Button } from "../../Button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../DropdownMenu"; @@ -24,8 +24,16 @@ export const SegmentFilterItemContextMenu = ({ - onMoveFilter(filterId, "up")}>Move up - onMoveFilter(filterId, "down")}>Move down + onMoveFilter(filterId, "up")} + icon={}> + Move up + + onMoveFilter(filterId, "down")} + icon={}> + Move down + diff --git a/packages/ui/components/DataTable/components/ColumnSettingsDropdown.tsx b/packages/ui/components/DataTable/components/ColumnSettingsDropdown.tsx index a1bd402a30..17484420c8 100644 --- a/packages/ui/components/DataTable/components/ColumnSettingsDropdown.tsx +++ b/packages/ui/components/DataTable/components/ColumnSettingsDropdown.tsx @@ -23,15 +23,17 @@ export const ColumnSettingsDropdown = ({ className="capitalize" onClick={() => { column.toggleVisibility(false); - }}> + }} + icon={}>
- Hide column
- setIsTableSettingsModalOpen(true)}> + setIsTableSettingsModalOpen(true)} + icon={}>
- Table settings
diff --git a/packages/ui/components/DropdownMenu/index.tsx b/packages/ui/components/DropdownMenu/index.tsx index 0209c2c739..9d8cd9d9c0 100644 --- a/packages/ui/components/DropdownMenu/index.tsx +++ b/packages/ui/components/DropdownMenu/index.tsx @@ -67,7 +67,7 @@ const DropdownMenuContent: React.ComponentType & { inset?: boolean; + icon?: React.ReactNode; } & React.RefAttributes> > = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { inset?: boolean; + icon?: React.ReactNode; } ->(({ className, inset, ...props }, ref) => ( +>(({ className, children, inset, icon, ...props }, ref) => ( + {...props}> + {icon} + {children} + )); DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; diff --git a/packages/ui/components/Editor/components/AddVariablesDropdown.tsx b/packages/ui/components/Editor/components/AddVariablesDropdown.tsx index a4604de426..2eb07c109c 100644 --- a/packages/ui/components/Editor/components/AddVariablesDropdown.tsx +++ b/packages/ui/components/Editor/components/AddVariablesDropdown.tsx @@ -35,7 +35,7 @@ export const AddVariablesDropdown: React.FC = (props) =>
{props.variables.map((variable) => ( - +