diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx index fc9b6b427f..48444ac98f 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx @@ -10,6 +10,7 @@ import { SELECT_FIELD_INPUT_SELECTABLE_LIST_COMPONENT_INSTANCE_ID } from '@/obje import { type FieldMultiSelectValue } from '@/object-record/record-field/ui/types/FieldMetadata'; import { MultiSelectDisplay } from '@/ui/field/display/components/MultiSelectDisplay'; import { MultiSelectInput } from '@/ui/field/input/components/MultiSelectInput'; +import { InputHint } from '@/ui/input/components/InputHint'; import { InputLabel } from '@/ui/input/components/InputLabel'; import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth'; import { OverlayContainer } from '@/ui/layout/overlay/components/OverlayContainer'; @@ -34,6 +35,7 @@ type FormMultiSelectFieldInputProps = { readonly?: boolean; placeholder?: string; testId?: string; + hint?: string; }; const StyledDisplayModeReadonlyContainer = styled.div` @@ -82,6 +84,7 @@ export const FormMultiSelectFieldInput = ({ readonly, placeholder, testId, + hint, }: FormMultiSelectFieldInputProps) => { const instanceId = useId(); const theme = useTheme(); @@ -278,6 +281,7 @@ export const FormMultiSelectFieldInput = ({ /> )} + {hint ? {hint} : null} ); }; diff --git a/packages/twenty-front/src/modules/workflow/components/WorkflowEditUpdateEventFieldsMultiSelect.tsx b/packages/twenty-front/src/modules/workflow/components/WorkflowEditUpdateEventFieldsMultiSelect.tsx index 988915d67c..b13b8e72bd 100644 --- a/packages/twenty-front/src/modules/workflow/components/WorkflowEditUpdateEventFieldsMultiSelect.tsx +++ b/packages/twenty-front/src/modules/workflow/components/WorkflowEditUpdateEventFieldsMultiSelect.tsx @@ -15,6 +15,7 @@ export const WorkflowFieldsMultiSelect = ({ readonly, defaultFields, placeholder, + hint, }: { label: string; placeholder: string; @@ -22,6 +23,7 @@ export const WorkflowFieldsMultiSelect = ({ handleFieldsChange: (field: FieldMultiSelectValue | string) => void; readonly: boolean; defaultFields: string[] | undefined | null; + hint?: string; }) => { const { getIcon } = useIcons(); @@ -64,13 +66,14 @@ export const WorkflowFieldsMultiSelect = ({ return { label: field.label, value, - icon: getIcon(field.iconName), + Icon: getIcon(field.iconName), color: 'gray', }; })} onChange={handleFieldsChange} placeholder={placeholder} readonly={readonly} + hint={hint} /> ); }; diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepFooter.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepFooter.tsx index da70f3e943..c2b7467e32 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepFooter.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepFooter.tsx @@ -11,6 +11,7 @@ import { useDuplicateStep } from '@/workflow/workflow-steps/hooks/useDuplicateSt import { useTheme } from '@emotion/react'; import { useLingui } from '@lingui/react/macro'; import { useId } from 'react'; +import { isDefined } from 'twenty-shared/utils'; import { TRIGGER_STEP_ID } from 'twenty-shared/workflow'; import { IconCopyPlus, IconPencil, IconTrash } from 'twenty-ui/display'; import { Button } from 'twenty-ui/input'; @@ -35,6 +36,8 @@ export const WorkflowStepFooter = ({ openWorkflowTriggerTypeInCommandMenu, } = useWorkflowCommandMenu(); const { deleteStep } = useDeleteStep(); + const shouldPinDeleteButton = + !isDefined(additionalActions) || additionalActions.length === 0; const OptionsDropdown = ( )} - { - closeDropdown(dropdownId); - deleteStep(stepId); - }} - text={t`Delete node`} - LeftIcon={IconTrash} - /> + {!shouldPinDeleteButton && ( + { + closeDropdown(dropdownId); + deleteStep(stepId); + }} + text={t`Delete node`} + LeftIcon={IconTrash} + /> + )} @@ -92,9 +97,25 @@ export const WorkflowStepFooter = ({ /> ); + const deleteButton = ( +