Increase size of input in test setting logic function tab (#18369)
## Before <img width="1031" height="836" alt="image" src="https://github.com/user-attachments/assets/475ca1be-f7c4-49d0-b329-649dbe8da489" /> ## After <img width="1195" height="862" alt="image" src="https://github.com/user-attachments/assets/b1bac131-e562-4439-8f8e-bda4d6e2a646" /> --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+1
-6
@@ -8,11 +8,9 @@ import { LogicFunctionExecutionStatus } from '~/generated-metadata/graphql';
|
||||
|
||||
export const LogicFunctionExecutionResult = ({
|
||||
logicFunctionTestData,
|
||||
maxHeight,
|
||||
isTesting = false,
|
||||
}: {
|
||||
logicFunctionTestData: LogicFunctionTestData;
|
||||
maxHeight?: number;
|
||||
isTesting?: boolean;
|
||||
}) => {
|
||||
const result =
|
||||
@@ -39,10 +37,7 @@ export const LogicFunctionExecutionResult = ({
|
||||
<WorkflowStepExecutionResult
|
||||
result={result}
|
||||
language={logicFunctionTestData.language}
|
||||
height={Math.min(
|
||||
logicFunctionTestData.height,
|
||||
maxHeight ?? logicFunctionTestData.height,
|
||||
)}
|
||||
height={150}
|
||||
status={status}
|
||||
isTesting={isTesting}
|
||||
loadingMessage={t`Running function`}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { ResizeHandle, useResizeHandle } from 'twenty-ui/layout';
|
||||
import { TextArea } from '@/ui/input/components/TextArea';
|
||||
|
||||
type LogicFunctionLogsProps = {
|
||||
componentInstanceId: string;
|
||||
value: string;
|
||||
};
|
||||
|
||||
export const LogicFunctionLogs = ({
|
||||
componentInstanceId,
|
||||
value,
|
||||
}: LogicFunctionLogsProps) => {
|
||||
const { t } = useLingui();
|
||||
|
||||
const {
|
||||
size: height,
|
||||
handleResizeStart,
|
||||
handleResizeMove,
|
||||
handleResizeEnd,
|
||||
} = useResizeHandle({
|
||||
initialSize: 150,
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<TextArea
|
||||
textAreaId={`logs-${componentInstanceId}`}
|
||||
label={t`Logs`}
|
||||
value={value}
|
||||
height={height}
|
||||
readOnly
|
||||
/>
|
||||
<ResizeHandle
|
||||
onPointerDown={handleResizeStart}
|
||||
onPointerMove={handleResizeMove}
|
||||
onPointerUp={handleResizeEnd}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -75,7 +75,6 @@ export const useExecuteLogicFunction = ({
|
||||
setLogicFunctionTestData((prev) => ({
|
||||
...prev,
|
||||
language: 'json',
|
||||
height: 300,
|
||||
output: {
|
||||
data: executionResult?.data
|
||||
? JSON.stringify(executionResult.data, null, 4)
|
||||
|
||||
Reference in New Issue
Block a user