Skip to content

Commit a256a97

Browse files
authored
Merge pull request #41088 from appsmithorg/release
07/07 Daily Promotion
2 parents 9df3d69 + e7a73e0 commit a256a97

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

app/client/src/ce/sagas/PageSagas.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ import {
149149
selectGitApplicationCurrentBranch,
150150
} from "selectors/gitModSelectors";
151151
import { appsmithTelemetry } from "instrumentation";
152-
import { getLayoutSavePayload } from "ee/sagas/helpers";
152+
import {
153+
getLayoutSavePayload,
154+
generateUIModuleInstanceSaga,
155+
} from "ee/sagas/helpers";
153156
import { apiFailureResponseInterceptor } from "api/interceptors/response";
154157
import type { AxiosError } from "axios";
155158
import { handleFetchApplicationError } from "./ApplicationSagas";
@@ -271,6 +274,8 @@ export function* handleFetchedPage({
271274
yield put(fetchSnapshotDetailsAction());
272275
// set current page
273276
yield put(updateCurrentPage(pageId, pageSlug, pagePermissions));
277+
// Generate UI module instances when page DSL is loaded
278+
yield call(generateUIModuleInstanceSaga);
274279
// dispatch fetch page success
275280
yield put(fetchPageSuccess());
276281

@@ -449,6 +454,11 @@ export function* fetchPublishedPageResourcesSaga(
449454
}
450455

451456
yield call(postFetchedPublishedPage, pageWithMigratedDsl, pageId);
457+
// In view mode, the fetchPublishedPageResourcesSaga is called only
458+
// when page is switched. So, we need to generate UI module instances.
459+
// Whereas, setupPublishedPageSaga gets called on first time app load in view mode.
460+
// This is differently done for some reason when compared to edit mode.
461+
yield call(generateUIModuleInstanceSaga);
452462

453463
// NOTE: fetchActionsForView is used here to update publishedActions in redux store and not to fetch actions again
454464
yield put(fetchActionsForView({ applicationId: "", publishedActions }));

app/client/src/ce/sagas/helpers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,6 @@ export function* getLayoutSavePayload(
110110
dsl: nestedDSL,
111111
};
112112
}
113+
114+
// This is a placeholder saga and is extended in EE
115+
export function* generateUIModuleInstanceSaga() {}

0 commit comments

Comments
 (0)