From 3177a4d3d26a8a3d8a50a403602e4cefc6b463d8 Mon Sep 17 00:00:00 2001 From: Ayush Pahwa Date: Thu, 6 Jun 2024 21:21:24 +0530 Subject: [PATCH] fix: code split for run history resize issue in workflows editor (#34049) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Run history for workflows is a system wide pane but due to the nature of the panes in appsmith, a pane has to be individually imported to each editor (jsobject, query,data and api). This PR is the code split PR which imports the pane into the respective component. The logic for the pane is in EE and can only be opened by a trigger that is only in workflow editor. [EE PR](https://github.com/appsmithorg/appsmith-ee/pull/4366) for reference. Fixes #33024 ## Automation /test ide ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 3d5d2c136c4c1cd343fd0f310d7832d120318e13 > Cypress dashboard url: Click here! ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **New Features** - Introduced `RunHistory` component to track and display run history in various editors. - **Enhancements** - Added `RunHistory` component to API Editor, JS Editor, and Query Editor for improved user experience. These updates aim to provide better visibility and tracking of run histories across different sections of the application. --- app/client/src/ce/components/RunHistory/index.tsx | 3 +++ app/client/src/ee/components/RunHistory/index.tsx | 3 +++ app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx | 2 ++ app/client/src/pages/Editor/JSEditor/Form.tsx | 3 ++- app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx | 2 ++ 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 app/client/src/ce/components/RunHistory/index.tsx create mode 100644 app/client/src/ee/components/RunHistory/index.tsx diff --git a/app/client/src/ce/components/RunHistory/index.tsx b/app/client/src/ce/components/RunHistory/index.tsx new file mode 100644 index 000000000000..356a2df85c5a --- /dev/null +++ b/app/client/src/ce/components/RunHistory/index.tsx @@ -0,0 +1,3 @@ +export default function RunHistory({}: any) { + return null; +} diff --git a/app/client/src/ee/components/RunHistory/index.tsx b/app/client/src/ee/components/RunHistory/index.tsx new file mode 100644 index 000000000000..d09cd4fe124c --- /dev/null +++ b/app/client/src/ee/components/RunHistory/index.tsx @@ -0,0 +1,3 @@ +export * from "ce/components/RunHistory"; +import { default as CE_RunHistory } from "ce/components/RunHistory"; +export default CE_RunHistory; diff --git a/app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx b/app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx index 7b668668fe35..814b6b598892 100644 --- a/app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx +++ b/app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx @@ -61,6 +61,7 @@ import { } from "@appsmith/utils/BusinessFeatures/permissionPageHelpers"; import { ApiEditorContext } from "./ApiEditorContext"; import ActionRightPane from "components/editorComponents/ActionRightPane"; +import RunHistory from "@appsmith/components/RunHistory"; const Form = styled.form` position: relative; @@ -746,6 +747,7 @@ function CommonEditorForm(props: CommonFormPropsWithExtraParams) { responseDisplayFormat={responseDisplayFormat} theme={theme} /> + + diff --git a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx index f8fbdbdc1e4e..6650cecdfcaf 100644 --- a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx +++ b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx @@ -40,6 +40,7 @@ import QueryEditorHeader from "./QueryEditorHeader"; import ActionEditor from "../IDE/EditorPane/components/ActionEditor"; import QueryResponseTab from "./QueryResponseTab"; import DatasourceSelector from "./DatasourceSelector"; +import RunHistory from "@appsmith/components/RunHistory"; const QueryFormContainer = styled.form` flex: 1; @@ -386,6 +387,7 @@ export function EditorJSONtoForm(props: Props) { runErrorMessage={runErrorMessage} showSchema={showSchema} /> +