diff --git a/src/components/fields/Action/Settings.tsx b/src/components/fields/Action/Settings.tsx index 3c5c26b8..bc762c82 100644 --- a/src/components/fields/Action/Settings.tsx +++ b/src/components/fields/Action/Settings.tsx @@ -1,4 +1,4 @@ -import { lazy, Suspense, useState } from "react"; +import { lazy, Suspense, useState, useEffect } from "react"; import { get } from "lodash-es"; import stringify from "json-stable-stringify-without-jsonify"; import { Link } from "react-router-dom"; @@ -37,6 +37,7 @@ import { projectRolesAtom, projectSettingsAtom, compatibleRowyRunVersionAtom, + rowyRunModalAtom, } from "@src/atoms/projectScope"; import { tableScope, tableColumnsOrderedAtom } from "@src/atoms/tableScope"; import { WIKI_LINKS } from "@src/constants/externalLinks"; @@ -68,6 +69,11 @@ const Settings = ({ config, onChange, fieldName }: ISettingsProps) => { ); const [tableColumnsOrdered] = useAtom(tableColumnsOrderedAtom, tableScope); + const openRowyRunModal = useSetAtom(rowyRunModalAtom, projectScope); + useEffect(() => { + if (!settings.rowyRunUrl) openRowyRunModal({ feature: "Action fields" }); + }, [settings.rowyRunUrl]); + // const [activeStep, setActiveStep] = useState< // "requirements" | "friction" | "action" | "undo" | "customization" // >("requirements"); diff --git a/src/components/fields/Connector/Settings.tsx b/src/components/fields/Connector/Settings.tsx index a2c77c57..36548d03 100644 --- a/src/components/fields/Connector/Settings.tsx +++ b/src/components/fields/Connector/Settings.tsx @@ -1,5 +1,5 @@ -import { lazy, Suspense, useState } from "react"; -import { get } from "lodash-es"; +import { lazy, Suspense, useEffect } from "react"; +import { useAtom, useSetAtom } from "jotai"; import { Grid, @@ -11,7 +11,6 @@ import { Link, } from "@mui/material"; -import SteppedAccordion from "@src/components/SteppedAccordion"; import FieldSkeleton from "@src/components/SideDrawer/FieldSkeleton"; import CodeEditorHelper from "@src/components/CodeEditor/CodeEditorHelper"; import InlineOpenInNewIcon from "@src/components/InlineOpenInNewIcon"; @@ -21,6 +20,11 @@ import connectorDefs from "!!raw-loader!./connector.d.ts"; import { WIKI_LINKS } from "@src/constants/externalLinks"; import { baseFunction } from "./utils"; import { ISettingsProps } from "@src/components/fields/types"; +import { + projectScope, + projectSettingsAtom, + rowyRunModalAtom, +} from "@src/atoms/projectScope"; //import typeDefs from "!!raw-loader!./types.d.ts"; const CodeEditor = lazy( @@ -46,6 +50,13 @@ const diagnosticsOptions = { }; export default function Settings({ config, onChange }: ISettingsProps) { + const [projectSettings] = useAtom(projectSettingsAtom, projectScope); + const openRowyRunModal = useSetAtom(rowyRunModalAtom, projectScope); + useEffect(() => { + if (!projectSettings.rowyRunUrl) + openRowyRunModal({ feature: "Connector fields" }); + }, [projectSettings.rowyRunUrl]); + return ( <>