diff --git a/nx.json b/nx.json index 19c6f5462c..4dad794675 100644 --- a/nx.json +++ b/nx.json @@ -112,7 +112,7 @@ "outputs": ["{projectRoot}/{options.output-dir}"], "options": { "cwd": "{projectRoot}", - "command": "VITE_DISABLE_ESLINT_CHECKER=true storybook build", + "command": "VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true storybook build", "output-dir": "storybook-static", "config-dir": ".storybook" } diff --git a/packages/twenty-front/project.json b/packages/twenty-front/project.json index 549e2c6956..0c9a8e2f75 100644 --- a/packages/twenty-front/project.json +++ b/packages/twenty-front/project.json @@ -69,7 +69,7 @@ "test": {}, "storybook:build": { "options": { - "env": { "NODE_OPTIONS": "--max_old_space_size=7000" } + "env": { "NODE_OPTIONS": "--max_old_space_size=8000" } }, "configurations": { "docs": { "env": { "STORYBOOK_SCOPE": "ui-docs" } }, diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index 986bad155b..58c136673f 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -1569,8 +1569,6 @@ export type UpdateServerlessFunctionInput = { }; export type UpdateWorkflowVersionStepInput = { - /** Boolean to check if we need to update stepOutput */ - shouldUpdateStepOutput?: InputMaybe; /** Step to update in JSON format */ step: Scalars['JSON']['input']; /** Workflow version ID */ diff --git a/packages/twenty-front/src/generated/graphql.tsx b/packages/twenty-front/src/generated/graphql.tsx index 2113798b76..07b3bbcc02 100644 --- a/packages/twenty-front/src/generated/graphql.tsx +++ b/packages/twenty-front/src/generated/graphql.tsx @@ -1277,8 +1277,6 @@ export type UpdateServerlessFunctionInput = { }; export type UpdateWorkflowVersionStepInput = { - /** Boolean to check if we need to update stepOutput */ - shouldUpdateStepOutput?: InputMaybe; /** Step to update in JSON format */ step: Scalars['JSON']; /** Workflow version ID */ diff --git a/packages/twenty-front/src/hooks/usePreventOverlapCallback.ts b/packages/twenty-front/src/hooks/usePreventOverlapCallback.ts deleted file mode 100644 index 0cd1c5b898..0000000000 --- a/packages/twenty-front/src/hooks/usePreventOverlapCallback.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { useEffect, useState } from 'react'; -import { useDebouncedCallback } from 'use-debounce'; - -export const usePreventOverlapCallback = ( - callback: () => Promise, - wait?: number, -) => { - const [isRunning, setIsRunning] = useState(false); - const [pendingRun, setPendingRun] = useState(false); - - const handleCallback = async () => { - if (isRunning) { - setPendingRun(true); - return; - } - setIsRunning(true); - try { - await callback(); - } finally { - setIsRunning(false); - } - }; - - useEffect(() => { - if (!isRunning && pendingRun) { - setPendingRun(false); - callback(); - } - }, [callback, isRunning, pendingRun, setPendingRun]); - - return useDebouncedCallback(handleCallback, wait); -}; diff --git a/packages/twenty-front/src/modules/action-menu/components/CmdEnterActionButton.tsx b/packages/twenty-front/src/modules/action-menu/components/CmdEnterActionButton.tsx new file mode 100644 index 0000000000..ae21df17c4 --- /dev/null +++ b/packages/twenty-front/src/modules/action-menu/components/CmdEnterActionButton.tsx @@ -0,0 +1,30 @@ +import { Button } from 'twenty-ui'; +import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys'; +import { Key } from 'ts-key-enum'; +import { RightDrawerHotkeyScope } from '@/ui/layout/right-drawer/types/RightDrawerHotkeyScope'; + +export const CmdEnterActionButton = ({ + title, + onClick, +}: { + title: string; + onClick: () => void; +}) => { + useScopedHotkeys( + [`${Key.Control}+${Key.Enter}`, `${Key.Meta}+${Key.Enter}`], + () => onClick(), + RightDrawerHotkeyScope.RightDrawer, + [onClick], + ); + + return ( +