1031 workflows menu fixes (#12618)
## Before (not exhaustive) <img width="520" alt="image" src="https://github.com/user-attachments/assets/642365c5-f359-4ad3-8ba3-d7bb9c7d91e4" /> <img width="522" alt="image" src="https://github.com/user-attachments/assets/0819717f-84c6-436c-b9f4-20a1964cd565" /> <img width="528" alt="image" src="https://github.com/user-attachments/assets/240bf181-ec37-4e25-9fdb-c264a680abcc" /> <img width="525" alt="image" src="https://github.com/user-attachments/assets/0dfd55c1-dfbd-47ee-8741-977b5e57fa0a" /> ## After (not exhaustive) <img width="511" alt="image" src="https://github.com/user-attachments/assets/199b6e6e-be1d-4b75-8df6-d65ff05bee58" /> <img width="512" alt="image" src="https://github.com/user-attachments/assets/a92f67a8-ed58-4c4f-b401-07765158030f" /> <img width="522" alt="image" src="https://github.com/user-attachments/assets/ba3ae73a-4650-4f7f-a62a-980e6a2d21d1" /> <img width="518" alt="image" src="https://github.com/user-attachments/assets/97946870-4fba-4898-8381-9087df0b9ac4" />
This commit is contained in:
@ -26,13 +26,14 @@ import { Nullable } from 'twenty-ui/utilities';
|
|||||||
const StyledInputContainer = styled(FormFieldInputInnerContainer)`
|
const StyledInputContainer = styled(FormFieldInputInnerContainer)`
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
grid-template-rows: 1fr 0px;
|
grid-template-rows: 1fr 0;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
position: relative;
|
position: relative;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledDateInputAbsoluteContainer = styled.div`
|
const StyledDateInputAbsoluteContainer = styled.div`
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
top: ${({ theme }) => theme.spacing(1)};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledDateInput = styled.input<{ hasError?: boolean }>`
|
const StyledDateInput = styled.input<{ hasError?: boolean }>`
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import { isDefined } from 'twenty-shared/utils';
|
|||||||
import { VisibilityHidden } from 'twenty-ui/accessibility';
|
import { VisibilityHidden } from 'twenty-ui/accessibility';
|
||||||
import { IconChevronDown } from 'twenty-ui/display';
|
import { IconChevronDown } from 'twenty-ui/display';
|
||||||
import { SelectOption } from 'twenty-ui/input';
|
import { SelectOption } from 'twenty-ui/input';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
type FormMultiSelectFieldInputProps = {
|
type FormMultiSelectFieldInputProps = {
|
||||||
label?: string;
|
label?: string;
|
||||||
@ -55,7 +56,7 @@ const StyledDisplayModeContainer = styled(StyledDisplayModeReadonlyContainer)`
|
|||||||
const StyledSelectInputContainer = styled.div`
|
const StyledSelectInputContainer = styled.div`
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
top: ${({ theme }) => theme.spacing(8)};
|
top: ${({ theme }) => theme.spacing(9)};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledPlaceholder = styled.div`
|
const StyledPlaceholder = styled.div`
|
||||||
@ -260,6 +261,7 @@ export const FormMultiSelectFieldInput = ({
|
|||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
onOptionSelected={onOptionSelected}
|
onOptionSelected={onOptionSelected}
|
||||||
values={selectedNames}
|
values={selectedNames}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
</OverlayContainer>
|
</OverlayContainer>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import { useId, useState } from 'react';
|
|||||||
import { Key } from 'ts-key-enum';
|
import { Key } from 'ts-key-enum';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
import { SelectOption } from 'twenty-ui/input';
|
import { SelectOption } from 'twenty-ui/input';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
import { useTheme } from '@emotion/react';
|
||||||
|
|
||||||
type FormSelectFieldInputProps = {
|
type FormSelectFieldInputProps = {
|
||||||
label?: string;
|
label?: string;
|
||||||
@ -31,6 +33,8 @@ export const FormSelectFieldInput = ({
|
|||||||
options,
|
options,
|
||||||
readonly,
|
readonly,
|
||||||
}: FormSelectFieldInputProps) => {
|
}: FormSelectFieldInputProps) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
const inputId = useId();
|
const inputId = useId();
|
||||||
|
|
||||||
const hotkeyScope = InlineCellHotkeyScope.InlineCell;
|
const hotkeyScope = InlineCellHotkeyScope.InlineCell;
|
||||||
@ -132,6 +136,8 @@ export const FormSelectFieldInput = ({
|
|||||||
hasRightElement={isDefined(VariablePicker) && !readonly}
|
hasRightElement={isDefined(VariablePicker) && !readonly}
|
||||||
withSearchInput
|
withSearchInput
|
||||||
disabled={readonly}
|
disabled={readonly}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<FormFieldInputInnerContainer
|
<FormFieldInputInnerContainer
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import styled from '@emotion/styled';
|
|||||||
import { useCallback, useId } from 'react';
|
import { useCallback, useId } from 'react';
|
||||||
import { isDefined, isValidUuid } from 'twenty-shared/utils';
|
import { isDefined, isValidUuid } from 'twenty-shared/utils';
|
||||||
import { IconChevronDown, IconForbid } from 'twenty-ui/display';
|
import { IconChevronDown, IconForbid } from 'twenty-ui/display';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
const StyledFormSelectContainer = styled(FormFieldInputInnerContainer)<{
|
const StyledFormSelectContainer = styled(FormFieldInputInnerContainer)<{
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
@ -165,6 +166,7 @@ export const FormSingleRecordPicker = ({
|
|||||||
clickableComponentWidth={'100%'}
|
clickableComponentWidth={'100%'}
|
||||||
onClose={handleCloseRelationPickerDropdown}
|
onClose={handleCloseRelationPickerDropdown}
|
||||||
onOpen={handleOpenDropdown}
|
onOpen={handleOpenDropdown}
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
clickableComponent={
|
clickableComponent={
|
||||||
<StyledFormSelectContainer
|
<StyledFormSelectContainer
|
||||||
hasRightElement={isDefined(VariablePicker) && !disabled}
|
hasRightElement={isDefined(VariablePicker) && !disabled}
|
||||||
@ -194,6 +196,7 @@ export const FormSingleRecordPicker = ({
|
|||||||
onRecordSelected={handleRecordSelected}
|
onRecordSelected={handleRecordSelected}
|
||||||
objectNameSingular={objectNameSingular}
|
objectNameSingular={objectNameSingular}
|
||||||
recordPickerInstanceId={dropdownId}
|
recordPickerInstanceId={dropdownId}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
dropdownHotkeyScope={{ scope: dropdownId }}
|
dropdownHotkeyScope={{ scope: dropdownId }}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ export const SINGLE_RECORD_PICKER_LISTENER_ID = 'single-record-select';
|
|||||||
|
|
||||||
export type SingleRecordPickerProps = {
|
export type SingleRecordPickerProps = {
|
||||||
componentInstanceId: string;
|
componentInstanceId: string;
|
||||||
|
dropdownWidth?: number;
|
||||||
} & SingleRecordPickerMenuItemsWithSearchProps;
|
} & SingleRecordPickerMenuItemsWithSearchProps;
|
||||||
|
|
||||||
export const SingleRecordPicker = ({
|
export const SingleRecordPicker = ({
|
||||||
@ -25,6 +26,7 @@ export const SingleRecordPicker = ({
|
|||||||
objectNameSingular,
|
objectNameSingular,
|
||||||
componentInstanceId,
|
componentInstanceId,
|
||||||
layoutDirection,
|
layoutDirection,
|
||||||
|
dropdownWidth,
|
||||||
}: SingleRecordPickerProps) => {
|
}: SingleRecordPickerProps) => {
|
||||||
const containerRef = useRef<HTMLDivElement>(null);
|
const containerRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
@ -49,7 +51,7 @@ export const SingleRecordPicker = ({
|
|||||||
<SingleRecordPickerComponentInstanceContext.Provider
|
<SingleRecordPickerComponentInstanceContext.Provider
|
||||||
value={{ instanceId: componentInstanceId }}
|
value={{ instanceId: componentInstanceId }}
|
||||||
>
|
>
|
||||||
<DropdownContent ref={containerRef}>
|
<DropdownContent ref={containerRef} widthInPixels={dropdownWidth}>
|
||||||
<SingleRecordPickerMenuItemsWithSearch
|
<SingleRecordPickerMenuItemsWithSearch
|
||||||
{...{
|
{...{
|
||||||
EmptyIcon,
|
EmptyIcon,
|
||||||
|
|||||||
@ -25,6 +25,7 @@ type MultiSelectInputProps = {
|
|||||||
onCancel?: () => void;
|
onCancel?: () => void;
|
||||||
options: SelectOption[];
|
options: SelectOption[];
|
||||||
onOptionSelected: (value: FieldMultiSelectValue) => void;
|
onOptionSelected: (value: FieldMultiSelectValue) => void;
|
||||||
|
dropdownWidth?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MultiSelectInput = ({
|
export const MultiSelectInput = ({
|
||||||
@ -34,6 +35,7 @@ export const MultiSelectInput = ({
|
|||||||
hotkeyScope,
|
hotkeyScope,
|
||||||
onCancel,
|
onCancel,
|
||||||
onOptionSelected,
|
onOptionSelected,
|
||||||
|
dropdownWidth,
|
||||||
}: MultiSelectInputProps) => {
|
}: MultiSelectInputProps) => {
|
||||||
const { resetSelectedItem } = useSelectableList(
|
const { resetSelectedItem } = useSelectableList(
|
||||||
selectableListComponentInstanceId,
|
selectableListComponentInstanceId,
|
||||||
@ -102,7 +104,11 @@ export const MultiSelectInput = ({
|
|||||||
selectableItemIdArray={optionIds}
|
selectableItemIdArray={optionIds}
|
||||||
hotkeyScope={hotkeyScope}
|
hotkeyScope={hotkeyScope}
|
||||||
>
|
>
|
||||||
<DropdownContent ref={containerRef} selectDisabled>
|
<DropdownContent
|
||||||
|
ref={containerRef}
|
||||||
|
selectDisabled
|
||||||
|
widthInPixels={dropdownWidth}
|
||||||
|
>
|
||||||
<DropdownMenuSearchInput
|
<DropdownMenuSearchInput
|
||||||
value={searchFilter}
|
value={searchFilter}
|
||||||
onChange={(event) =>
|
onChange={(event) =>
|
||||||
|
|||||||
@ -16,6 +16,8 @@ import { HorizontalSeparator, useIcons } from 'twenty-ui/display';
|
|||||||
import { SelectOption } from 'twenty-ui/input';
|
import { SelectOption } from 'twenty-ui/input';
|
||||||
import { JsonValue } from 'type-fest';
|
import { JsonValue } from 'type-fest';
|
||||||
import { useDebouncedCallback } from 'use-debounce';
|
import { useDebouncedCallback } from 'use-debounce';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
import { useTheme } from '@emotion/react';
|
||||||
|
|
||||||
type WorkflowEditActionCreateRecordProps = {
|
type WorkflowEditActionCreateRecordProps = {
|
||||||
action: WorkflowCreateRecordAction;
|
action: WorkflowCreateRecordAction;
|
||||||
@ -57,6 +59,8 @@ export const WorkflowEditActionCreateRecord = ({
|
|||||||
action,
|
action,
|
||||||
actionOptions,
|
actionOptions,
|
||||||
}: WorkflowEditActionCreateRecordProps) => {
|
}: WorkflowEditActionCreateRecordProps) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
const { getIcon } = useIcons();
|
const { getIcon } = useIcons();
|
||||||
|
|
||||||
const { activeNonSystemObjectMetadataItems } =
|
const { activeNonSystemObjectMetadataItems } =
|
||||||
@ -201,6 +205,8 @@ export const WorkflowEditActionCreateRecord = ({
|
|||||||
saveAction(newFormData);
|
saveAction(newFormData);
|
||||||
}}
|
}}
|
||||||
withSearchInput
|
withSearchInput
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<HorizontalSeparator noMargin />
|
<HorizontalSeparator noMargin />
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import { HorizontalSeparator, useIcons } from 'twenty-ui/display';
|
|||||||
import { SelectOption } from 'twenty-ui/input';
|
import { SelectOption } from 'twenty-ui/input';
|
||||||
import { JsonValue } from 'type-fest';
|
import { JsonValue } from 'type-fest';
|
||||||
import { useDebouncedCallback } from 'use-debounce';
|
import { useDebouncedCallback } from 'use-debounce';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
import { useTheme } from '@emotion/react';
|
||||||
|
|
||||||
type WorkflowEditActionDeleteRecordProps = {
|
type WorkflowEditActionDeleteRecordProps = {
|
||||||
action: WorkflowDeleteRecordAction;
|
action: WorkflowDeleteRecordAction;
|
||||||
@ -35,6 +37,8 @@ export const WorkflowEditActionDeleteRecord = ({
|
|||||||
action,
|
action,
|
||||||
actionOptions,
|
actionOptions,
|
||||||
}: WorkflowEditActionDeleteRecordProps) => {
|
}: WorkflowEditActionDeleteRecordProps) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
const { getIcon } = useIcons();
|
const { getIcon } = useIcons();
|
||||||
|
|
||||||
const { activeNonSystemObjectMetadataItems } =
|
const { activeNonSystemObjectMetadataItems } =
|
||||||
@ -147,6 +151,8 @@ export const WorkflowEditActionDeleteRecord = ({
|
|||||||
saveAction(newFormData);
|
saveAction(newFormData);
|
||||||
}}
|
}}
|
||||||
withSearchInput
|
withSearchInput
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<HorizontalSeparator noMargin />
|
<HorizontalSeparator noMargin />
|
||||||
|
|||||||
@ -24,6 +24,8 @@ import { SelectOption } from 'twenty-ui/input';
|
|||||||
import { JsonValue } from 'type-fest';
|
import { JsonValue } from 'type-fest';
|
||||||
import { useDebouncedCallback } from 'use-debounce';
|
import { useDebouncedCallback } from 'use-debounce';
|
||||||
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
|
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
|
||||||
|
import { useTheme } from '@emotion/react';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
type WorkflowEditActionSendEmailProps = {
|
type WorkflowEditActionSendEmailProps = {
|
||||||
action: WorkflowSendEmailAction;
|
action: WorkflowSendEmailAction;
|
||||||
@ -48,6 +50,7 @@ export const WorkflowEditActionSendEmail = ({
|
|||||||
action,
|
action,
|
||||||
actionOptions,
|
actionOptions,
|
||||||
}: WorkflowEditActionSendEmailProps) => {
|
}: WorkflowEditActionSendEmailProps) => {
|
||||||
|
const theme = useTheme();
|
||||||
const { getIcon } = useIcons();
|
const { getIcon } = useIcons();
|
||||||
const currentWorkspaceMember = useRecoilValue(currentWorkspaceMemberState);
|
const currentWorkspaceMember = useRecoilValue(currentWorkspaceMemberState);
|
||||||
const { triggerApisOAuth } = useTriggerApisOAuth();
|
const { triggerApisOAuth } = useTriggerApisOAuth();
|
||||||
@ -244,6 +247,8 @@ export const WorkflowEditActionSendEmail = ({
|
|||||||
handleFieldChange('connectedAccountId', connectedAccountId);
|
handleFieldChange('connectedAccountId', connectedAccountId);
|
||||||
}}
|
}}
|
||||||
disabled={actionOptions.readonly}
|
disabled={actionOptions.readonly}
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
<FormTextFieldInput
|
<FormTextFieldInput
|
||||||
label="Email"
|
label="Email"
|
||||||
|
|||||||
@ -19,6 +19,8 @@ import { SelectOption } from 'twenty-ui/input';
|
|||||||
import { JsonValue } from 'type-fest';
|
import { JsonValue } from 'type-fest';
|
||||||
import { useDebouncedCallback } from 'use-debounce';
|
import { useDebouncedCallback } from 'use-debounce';
|
||||||
import { RelationType } from '~/generated-metadata/graphql';
|
import { RelationType } from '~/generated-metadata/graphql';
|
||||||
|
import { useTheme } from '@emotion/react';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
type WorkflowEditActionUpdateRecordProps = {
|
type WorkflowEditActionUpdateRecordProps = {
|
||||||
action: WorkflowUpdateRecordAction;
|
action: WorkflowUpdateRecordAction;
|
||||||
@ -43,6 +45,8 @@ export const WorkflowEditActionUpdateRecord = ({
|
|||||||
action,
|
action,
|
||||||
actionOptions,
|
actionOptions,
|
||||||
}: WorkflowEditActionUpdateRecordProps) => {
|
}: WorkflowEditActionUpdateRecordProps) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
const { getIcon } = useIcons();
|
const { getIcon } = useIcons();
|
||||||
|
|
||||||
const { activeNonSystemObjectMetadataItems } =
|
const { activeNonSystemObjectMetadataItems } =
|
||||||
@ -184,6 +188,8 @@ export const WorkflowEditActionUpdateRecord = ({
|
|||||||
saveAction(newFormData);
|
saveAction(newFormData);
|
||||||
}}
|
}}
|
||||||
withSearchInput
|
withSearchInput
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<HorizontalSeparator noMargin />
|
<HorizontalSeparator noMargin />
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import styled from '@emotion/styled';
|
|||||||
import camelCase from 'lodash.camelcase';
|
import camelCase from 'lodash.camelcase';
|
||||||
import { useIcons } from 'twenty-ui/display';
|
import { useIcons } from 'twenty-ui/display';
|
||||||
import { SelectOption } from 'twenty-ui/input';
|
import { SelectOption } from 'twenty-ui/input';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
import { useTheme } from '@emotion/react';
|
||||||
|
|
||||||
type WorkflowFormFieldSettingsRecordPickerProps = {
|
type WorkflowFormFieldSettingsRecordPickerProps = {
|
||||||
field: WorkflowFormActionField;
|
field: WorkflowFormActionField;
|
||||||
@ -25,6 +27,8 @@ export const WorkflowFormFieldSettingsRecordPicker = ({
|
|||||||
field,
|
field,
|
||||||
onChange,
|
onChange,
|
||||||
}: WorkflowFormFieldSettingsRecordPickerProps) => {
|
}: WorkflowFormFieldSettingsRecordPickerProps) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
const { getIcon } = useIcons();
|
const { getIcon } = useIcons();
|
||||||
|
|
||||||
const { activeNonSystemObjectMetadataItems } =
|
const { activeNonSystemObjectMetadataItems } =
|
||||||
@ -62,6 +66,8 @@ export const WorkflowFormFieldSettingsRecordPicker = ({
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
withSearchInput
|
withSearchInput
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
</FormFieldInputContainer>
|
</FormFieldInputContainer>
|
||||||
<FormFieldInputContainer>
|
<FormFieldInputContainer>
|
||||||
|
|||||||
@ -18,6 +18,8 @@ import { useHttpRequestForm } from '../hooks/useHttpRequestForm';
|
|||||||
import { useHttpRequestOutputSchema } from '../hooks/useHttpRequestOutputSchema';
|
import { useHttpRequestOutputSchema } from '../hooks/useHttpRequestOutputSchema';
|
||||||
import { BodyInput } from './BodyInput';
|
import { BodyInput } from './BodyInput';
|
||||||
import { KeyValuePairInput } from './KeyValuePairInput';
|
import { KeyValuePairInput } from './KeyValuePairInput';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
import { useTheme } from '@emotion/react';
|
||||||
|
|
||||||
type WorkflowEditActionHttpRequestProps = {
|
type WorkflowEditActionHttpRequestProps = {
|
||||||
action: WorkflowHttpRequestAction;
|
action: WorkflowHttpRequestAction;
|
||||||
@ -31,6 +33,7 @@ export const WorkflowEditActionHttpRequest = ({
|
|||||||
action,
|
action,
|
||||||
actionOptions,
|
actionOptions,
|
||||||
}: WorkflowEditActionHttpRequestProps) => {
|
}: WorkflowEditActionHttpRequestProps) => {
|
||||||
|
const theme = useTheme();
|
||||||
const { getIcon } = useIcons();
|
const { getIcon } = useIcons();
|
||||||
const { headerTitle, headerIcon, headerIconColor, headerType } =
|
const { headerTitle, headerIcon, headerIconColor, headerType } =
|
||||||
useWorkflowActionHeader({
|
useWorkflowActionHeader({
|
||||||
@ -84,6 +87,8 @@ export const WorkflowEditActionHttpRequest = ({
|
|||||||
value={formData.method}
|
value={formData.method}
|
||||||
onChange={(value) => handleFieldChange('method', value)}
|
onChange={(value) => handleFieldChange('method', value)}
|
||||||
disabled={actionOptions.readonly}
|
disabled={actionOptions.readonly}
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<KeyValuePairInput
|
<KeyValuePairInput
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import cron from 'cron-validate';
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
import { useIcons } from 'twenty-ui/display';
|
import { useIcons } from 'twenty-ui/display';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
type WorkflowEditTriggerCronFormProps = {
|
type WorkflowEditTriggerCronFormProps = {
|
||||||
trigger: WorkflowCronTrigger;
|
trigger: WorkflowCronTrigger;
|
||||||
@ -101,6 +102,8 @@ export const WorkflowEditTriggerCronForm = ({
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
withSearchInput
|
withSearchInput
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
{trigger.settings.type === 'CUSTOM' && (
|
{trigger.settings.type === 'CUSTOM' && (
|
||||||
<FormTextFieldInput
|
<FormTextFieldInput
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import { useCallback, useMemo, useState } from 'react';
|
|||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
import { IconChevronLeft, IconSettings, useIcons } from 'twenty-ui/display';
|
import { IconChevronLeft, IconSettings, useIcons } from 'twenty-ui/display';
|
||||||
import { MenuItem } from 'twenty-ui/navigation';
|
import { MenuItem } from 'twenty-ui/navigation';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
const StyledLabel = styled.span`
|
const StyledLabel = styled.span`
|
||||||
color: ${({ theme }) => theme.font.color.light};
|
color: ${({ theme }) => theme.font.color.light};
|
||||||
@ -200,7 +201,9 @@ export const WorkflowEditTriggerDatabaseEventForm = ({
|
|||||||
<>
|
<>
|
||||||
{!triggerOptions.readonly &&
|
{!triggerOptions.readonly &&
|
||||||
(isSystemObjectsOpen ? (
|
(isSystemObjectsOpen ? (
|
||||||
<DropdownContent>
|
<DropdownContent
|
||||||
|
widthInPixels={GenericDropdownContentWidth.ExtraLarge}
|
||||||
|
>
|
||||||
<DropdownMenuHeader
|
<DropdownMenuHeader
|
||||||
StartComponent={
|
StartComponent={
|
||||||
<DropdownMenuHeaderLeftComponent
|
<DropdownMenuHeaderLeftComponent
|
||||||
@ -229,7 +232,9 @@ export const WorkflowEditTriggerDatabaseEventForm = ({
|
|||||||
</DropdownMenuItemsContainer>
|
</DropdownMenuItemsContainer>
|
||||||
</DropdownContent>
|
</DropdownContent>
|
||||||
) : (
|
) : (
|
||||||
<DropdownContent>
|
<DropdownContent
|
||||||
|
widthInPixels={GenericDropdownContentWidth.ExtraLarge}
|
||||||
|
>
|
||||||
<DropdownMenuSearchInput
|
<DropdownMenuSearchInput
|
||||||
autoFocus
|
autoFocus
|
||||||
value={searchInputValue}
|
value={searchInputValue}
|
||||||
@ -262,6 +267,7 @@ export const WorkflowEditTriggerDatabaseEventForm = ({
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
dropdownHotkeyScope={{ scope: SelectHotkeyScope.Select }}
|
dropdownHotkeyScope={{ scope: SelectHotkeyScope.Select }}
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
/>
|
/>
|
||||||
</StyledRecordTypeSelectContainer>
|
</StyledRecordTypeSelectContainer>
|
||||||
{isDefined(selectedObjectMetadataItem) && isUpdateEvent && (
|
{isDefined(selectedObjectMetadataItem) && isUpdateEvent && (
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import { useTheme } from '@emotion/react';
|
|||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
import { useIcons } from 'twenty-ui/display';
|
import { useIcons } from 'twenty-ui/display';
|
||||||
import { SelectOption } from 'twenty-ui/input';
|
import { SelectOption } from 'twenty-ui/input';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
type WorkflowEditTriggerManualFormProps = {
|
type WorkflowEditTriggerManualFormProps = {
|
||||||
trigger: WorkflowManualTrigger;
|
trigger: WorkflowManualTrigger;
|
||||||
@ -96,6 +97,8 @@ export const WorkflowEditTriggerManualForm = ({
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{manualTriggerAvailability === 'WHEN_RECORD_SELECTED' ? (
|
{manualTriggerAvailability === 'WHEN_RECORD_SELECTED' ? (
|
||||||
@ -119,6 +122,8 @@ export const WorkflowEditTriggerManualForm = ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</WorkflowStepBody>
|
</WorkflowStepBody>
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import { isDefined } from 'twenty-shared/utils';
|
|||||||
import { IconCopy, useIcons } from 'twenty-ui/display';
|
import { IconCopy, useIcons } from 'twenty-ui/display';
|
||||||
import { useDebouncedCallback } from 'use-debounce';
|
import { useDebouncedCallback } from 'use-debounce';
|
||||||
import { REACT_APP_SERVER_BASE_URL } from '~/config';
|
import { REACT_APP_SERVER_BASE_URL } from '~/config';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
type WorkflowEditTriggerWebhookFormProps = {
|
type WorkflowEditTriggerWebhookFormProps = {
|
||||||
trigger: WorkflowWebhookTrigger;
|
trigger: WorkflowWebhookTrigger;
|
||||||
@ -138,6 +139,8 @@ export const WorkflowEditTriggerWebhookForm = ({
|
|||||||
{ computeOutputSchema: false },
|
{ computeOutputSchema: false },
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
dropdownOffset={{ y: parseInt(theme.spacing(1), 10) }}
|
||||||
|
dropdownWidth={GenericDropdownContentWidth.ExtraLarge}
|
||||||
/>
|
/>
|
||||||
{trigger.settings.httpMethod === 'POST' && (
|
{trigger.settings.httpMethod === 'POST' && (
|
||||||
<FormRawJsonFieldInput
|
<FormRawJsonFieldInput
|
||||||
|
|||||||
@ -53,6 +53,7 @@ export const WorkflowVariablePicker: VariablePickerComponent = ({
|
|||||||
onVariableSelect={onVariableSelect}
|
onVariableSelect={onVariableSelect}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
objectNameSingularToSelect={objectNameSingularToSelect}
|
objectNameSingularToSelect={objectNameSingularToSelect}
|
||||||
|
multiline={multiline}
|
||||||
/>
|
/>
|
||||||
</StyledSearchVariablesDropdownContainer>
|
</StyledSearchVariablesDropdownContainer>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -37,11 +37,13 @@ export const WorkflowVariablesDropdown = ({
|
|||||||
onVariableSelect,
|
onVariableSelect,
|
||||||
disabled,
|
disabled,
|
||||||
objectNameSingularToSelect,
|
objectNameSingularToSelect,
|
||||||
|
multiline,
|
||||||
}: {
|
}: {
|
||||||
inputId: string;
|
inputId: string;
|
||||||
onVariableSelect: (variableName: string) => void;
|
onVariableSelect: (variableName: string) => void;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
objectNameSingularToSelect?: string;
|
objectNameSingularToSelect?: string;
|
||||||
|
multiline?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
@ -132,7 +134,10 @@ export const WorkflowVariablesDropdown = ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
dropdownPlacement="bottom-end"
|
dropdownPlacement="bottom-end"
|
||||||
dropdownOffset={{ x: 2, y: 4 }}
|
dropdownOffset={{
|
||||||
|
x: parseInt(theme.spacing(0.5), 10),
|
||||||
|
y: parseInt(theme.spacing(multiline ? 11 : 1), 10),
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -27,6 +27,7 @@ import {
|
|||||||
useIcons,
|
useIcons,
|
||||||
} from 'twenty-ui/display';
|
} from 'twenty-ui/display';
|
||||||
import { MenuItemSelect } from 'twenty-ui/navigation';
|
import { MenuItemSelect } from 'twenty-ui/navigation';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
type WorkflowVariablesDropdownFieldItemsProps = {
|
type WorkflowVariablesDropdownFieldItemsProps = {
|
||||||
step: StepOutputSchema;
|
step: StepOutputSchema;
|
||||||
@ -118,7 +119,7 @@ export const WorkflowVariablesDropdownFieldItems = ({
|
|||||||
: options;
|
: options;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownContent>
|
<DropdownContent widthInPixels={GenericDropdownContentWidth.ExtraLarge}>
|
||||||
<DropdownMenuHeader
|
<DropdownMenuHeader
|
||||||
StartComponent={
|
StartComponent={
|
||||||
<DropdownMenuHeaderLeftComponent
|
<DropdownMenuHeaderLeftComponent
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import {
|
|||||||
useIcons,
|
useIcons,
|
||||||
} from 'twenty-ui/display';
|
} from 'twenty-ui/display';
|
||||||
import { MenuItemSelect } from 'twenty-ui/navigation';
|
import { MenuItemSelect } from 'twenty-ui/navigation';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
type WorkflowVariablesDropdownObjectItemsProps = {
|
type WorkflowVariablesDropdownObjectItemsProps = {
|
||||||
step: StepOutputSchema;
|
step: StepOutputSchema;
|
||||||
@ -99,7 +100,7 @@ export const WorkflowVariablesDropdownObjectItems = ({
|
|||||||
: options;
|
: options;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownContent>
|
<DropdownContent widthInPixels={GenericDropdownContentWidth.ExtraLarge}>
|
||||||
<DropdownMenuHeader
|
<DropdownMenuHeader
|
||||||
StartComponent={
|
StartComponent={
|
||||||
<DropdownMenuHeaderLeftComponent
|
<DropdownMenuHeaderLeftComponent
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import { StepOutputSchema } from '@/workflow/workflow-variables/types/StepOutput
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { IconX, OverflowingTextWithTooltip, useIcons } from 'twenty-ui/display';
|
import { IconX, OverflowingTextWithTooltip, useIcons } from 'twenty-ui/display';
|
||||||
import { MenuItem, MenuItemSelect } from 'twenty-ui/navigation';
|
import { MenuItem, MenuItemSelect } from 'twenty-ui/navigation';
|
||||||
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
||||||
|
|
||||||
type WorkflowVariablesDropdownWorkflowStepItemsProps = {
|
type WorkflowVariablesDropdownWorkflowStepItemsProps = {
|
||||||
dropdownId: string;
|
dropdownId: string;
|
||||||
@ -33,7 +34,7 @@ export const WorkflowVariablesDropdownWorkflowStepItems = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownContent>
|
<DropdownContent widthInPixels={GenericDropdownContentWidth.ExtraLarge}>
|
||||||
<DropdownMenuHeader
|
<DropdownMenuHeader
|
||||||
StartComponent={
|
StartComponent={
|
||||||
<DropdownMenuHeaderLeftComponent
|
<DropdownMenuHeaderLeftComponent
|
||||||
|
|||||||
Reference in New Issue
Block a user