From 170230490585060e4a63534fbefc6451fc2f9d56 Mon Sep 17 00:00:00 2001 From: Diljit Date: Thu, 24 Oct 2024 16:36:10 +0530 Subject: [PATCH] chore: remove an extra eval cycle caused by the FETCH_FORM_CONFIG_SUCCESS action (#37013) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description `FETCH_FORM_CONFIG_SUCCESS` is part of the EVAL trigger action list and is used to trigger evaluation in other entities such as templates, packages, and modules. This was part of the pre-consolidated API implementation, where fetching form configurations was a separate API call, and we needed to re-trigger the evaluation once the form configurations were fetched. With the consolidated API now including form configurations, there is no longer a need to re-trigger evaluation upon the dispatch of the `FETCH_FORM_CONFIG_SUCCESS` action. This change ensures that `FETCH_ALL_PAGE_ENTITY_COMPLETION` is dispatched after the `FETCH_FORM_CONFIG_SUCCESS` action. This update eliminates an unnecessary evaluation cycle during the initial page load. Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 23ec5017c53169568ce5035533136a5adf98b78f > Cypress dashboard. > Tags: `@tag.All` > Spec: >
Wed, 23 Oct 2024 09:05:06 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Improved loading process for plugins and datasources, now integrated within the page themes and actions loading. - **Bug Fixes** - Enhanced initialization sequence for the editor setup, ensuring timely server reset after setup completion. --- app/client/src/entities/Engine/AppEditorEngine.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/client/src/entities/Engine/AppEditorEngine.ts b/app/client/src/entities/Engine/AppEditorEngine.ts index 8b63d0f333..d2ff14faf7 100644 --- a/app/client/src/entities/Engine/AppEditorEngine.ts +++ b/app/client/src/entities/Engine/AppEditorEngine.ts @@ -192,6 +192,13 @@ export default class AppEditorEngine extends AppEngine { yield call(waitForFetchEnvironments); endSpan(waitForFetchEnvironmentsSpan); + yield call( + this.loadPluginsAndDatasources, + allResponses, + rootSpan, + applicationId, + ); + yield put(fetchAllPageEntityCompletion([executePageLoadActions()])); endSpan(loadPageThemesAndActionsSpan); } @@ -265,12 +272,6 @@ export default class AppEditorEngine extends AppEngine { allResponses, rootSpan, ); - yield call( - this.loadPluginsAndDatasources, - allResponses, - rootSpan, - applicationId, - ); } public *completeChore(rootSpan: Span) {