diff --git a/app/client/src/IDE/Structure/Toolbar.tsx b/app/client/src/IDE/Structure/Toolbar.tsx new file mode 100644 index 00000000000..bd2f4f0ce7a --- /dev/null +++ b/app/client/src/IDE/Structure/Toolbar.tsx @@ -0,0 +1,52 @@ +import React from "react"; +import { Flex } from "@appsmith/ads"; + +interface ToolbarProps { + children?: React.ReactNode[] | React.ReactNode; +} + +const Toolbar = (props: ToolbarProps) => { + return ( + + {props.children} + + ); +}; + +const Left = (props: ToolbarProps) => { + return ( + + {props.children} + + ); +}; + +const Right = (props: ToolbarProps) => { + return ( + + {props.children} + + ); +}; + +Toolbar.Left = Left; +Toolbar.Right = Right; + +export default Toolbar; diff --git a/app/client/src/IDE/index.ts b/app/client/src/IDE/index.ts index 8a12a855b8e..c57c8ea1872 100644 --- a/app/client/src/IDE/index.ts +++ b/app/client/src/IDE/index.ts @@ -12,6 +12,14 @@ export { IDE_HEADER_HEIGHT } from "./Structure/constants"; export { default as IDEHeader } from "./Structure/Header"; +/** + * The IDEToolbar gets exported with 2 layout subsections. + * IDEToolbar.Left and IDEToolbar.Right + * These are composable components that you can use to spread the content of the toolbar + * It is possible to use the Toolbar without using these subsections + */ +export { default as IDEToolbar } from "./Structure/Toolbar"; + /* ==================================================== **** UI Components **** Components that are smaller UI abstractions for easy use and standardisation within the IDE diff --git a/app/client/src/PluginActionEditor/components/PluginActionToolbar.tsx b/app/client/src/PluginActionEditor/components/PluginActionToolbar.tsx index 64542de3c66..ee90ecc960b 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionToolbar.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionToolbar.tsx @@ -1,7 +1,43 @@ import React from "react"; +import { IDEToolbar } from "IDE"; +import { Button, Tooltip } from "@appsmith/ads"; +import { modText } from "../../utils/helpers"; -const PluginActionToolbar = () => { - return
; +interface PluginActionToolbarProps { + runOptions?: React.ReactNode; + children?: React.ReactNode[] | React.ReactNode; +} + +const PluginActionToolbar = (props: PluginActionToolbarProps) => { + return ( + + {props.children} + + {props.runOptions} + + + + - - - ); -}; - -export default ActionToolbar; diff --git a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx index a3c97d624f1..0721f3ae295 100644 --- a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx +++ b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx @@ -11,7 +11,6 @@ import styled from "styled-components"; import FormRow from "components/editorComponents/FormRow"; import { createMessage, - DEBUGGER_RESPONSE, DOCUMENTATION, DOCUMENTATION_TOOLTIP, } from "ee/constants/messages"; @@ -29,17 +28,12 @@ import { setQueryPaneConfigSelectedTabIndex } from "actions/queryPaneActions"; import type { SourceEntity } from "entities/AppsmithConsole"; import { ENTITY_TYPE as SOURCE_ENTITY_TYPE } from "ee/entities/AppsmithConsole/utils"; import { DocsLink, openDoc } from "../../../constants/DocumentationLinks"; -import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; -import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; import { QueryEditorContext } from "./QueryEditorContext"; import QueryDebuggerTabs from "./QueryDebuggerTabs"; import useShowSchema from "components/editorComponents/ActionRightPane/useShowSchema"; import { doesPluginRequireDatasource } from "ee/entities/Engine/actionHelpers"; import FormRender from "./FormRender"; import QueryEditorHeader from "./QueryEditorHeader"; -import ActionEditor from "../IDE/EditorPane/components/ActionEditor"; -import QueryResponseTab from "./QueryResponseTab"; -import DatasourceSelector from "./DatasourceSelector"; import RunHistory from "ee/components/RunHistory"; const QueryFormContainer = styled.form` @@ -227,10 +221,6 @@ export function EditorJSONtoForm(props: Props) { useShowSchema(currentActionConfig?.pluginId || "") && pluginRequireDatasource; - const isActionRedesignEnabled = useFeatureFlag( - FEATURE_FLAG.release_actions_redesign_enabled, - ); - const dispatch = useDispatch(); const handleDocumentationClick = () => { @@ -256,59 +246,6 @@ export function EditorJSONtoForm(props: Props) { return null; } - if (isActionRedesignEnabled && plugin) { - const responseTabs = []; - if (currentActionConfig) { - responseTabs.push({ - key: "response", - title: createMessage(DEBUGGER_RESPONSE), - panelComponent: ( - - ), - }); - } - return ( - - } - settingsRender={ - - - - } - tabs={responseTabs} - > - - - ); - } - return ( <> {closeEditorLink}