Skip to content

Commit

Permalink
chore: remove an extra eval cycle caused by the FETCH_FORM_CONFIG_SUC…
Browse files Browse the repository at this point in the history
…CESS action (#37013)

## 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"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11473435022>
> Commit: 23ec501
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11473435022&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 23 Oct 2024 09:05:06 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## 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.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
dvj1988 authored Oct 24, 2024
1 parent 0b93768 commit 1702304
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/client/src/entities/Engine/AppEditorEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -265,12 +272,6 @@ export default class AppEditorEngine extends AppEngine {
allResponses,
rootSpan,
);
yield call(
this.loadPluginsAndDatasources,
allResponses,
rootSpan,
applicationId,
);
}

public *completeChore(rootSpan: Span) {
Expand Down

0 comments on commit 1702304

Please sign in to comment.