Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions app/client/src/actions/pageActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import type {
PageAction,
} from "../constants/AppsmithActionConstants/ActionConstants";
import { ReplayOperation } from "entities/Replay/ReplayEntity/ReplayOperations";
import type { PACKAGE_PULL_STATUS } from "ee/constants/ModuleConstants";
import type { ApiResponse } from "api/ApiResponses";

export interface FetchPageListPayload {
applicationId: string;
Expand Down Expand Up @@ -657,18 +659,21 @@ export interface SetupPageActionPayload {
id: string;
isFirstLoad?: boolean;
pageWithMigratedDsl?: FetchPageResponse;
packagePullStatus?: ApiResponse<PACKAGE_PULL_STATUS>;
}

export const setupPageAction = (
pageId: string,
export const setupPageAction = ({
id,
isFirstLoad = false,
pageWithMigratedDsl?: FetchPageResponse,
): ReduxAction<SetupPageActionPayload> => ({
packagePullStatus,
pageWithMigratedDsl,
}: SetupPageActionPayload) => ({
type: ReduxActionTypes.SETUP_PAGE_INIT,
payload: {
id: pageId,
id,
isFirstLoad,
pageWithMigratedDsl,
packagePullStatus,
},
});

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// The implementation of this is present in EE
function PackageUpgradeStatus() {
return null;
}

export default PackageUpgradeStatus;
6 changes: 6 additions & 0 deletions app/client/src/ce/constants/ModuleConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ export interface ModuleMetadata {
pluginId: string;
pluginType: PluginType;
}

export enum PACKAGE_PULL_STATUS {
UPGRADABLE = "UPGRADABLE",
UPGRADED = "UPGRADED",
UPGRADING = "UPGRADING",
}
2 changes: 2 additions & 0 deletions app/client/src/components/BottomBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { useDispatch } from "react-redux";
import { softRefreshActions } from "actions/pluginActionActions";
import { START_SWITCH_ENVIRONMENT } from "ee/constants/messages";
import { getIsAnvilEnabledInCurrentApplication } from "layoutSystems/anvil/integrations/selectors";
import PackageUpgradeStatus from "ee/components/BottomBar/PackageUpgradeStatus";

export default function BottomBar() {
const appId = useSelector(getCurrentApplicationId) || "";
Expand Down Expand Up @@ -44,6 +45,7 @@ export default function BottomBar() {
</Wrapper>
{!isPreviewMode && (
<Wrapper>
<PackageUpgradeStatus />
<ManualUpgrades showTooltip>
<Button
className="t--upgrade"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "ce/components/BottomBar/PackageUpgradeStatus";
import { default as CE_PackageUpgradeStatus } from "ce/components/BottomBar/PackageUpgradeStatus";
export default CE_PackageUpgradeStatus;
8 changes: 7 additions & 1 deletion app/client/src/entities/Engine/AppEditorEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,19 @@ export default class AppEditorEngine extends AppEngine {
const {
currentTheme,
customJSLibraries,
packagePullStatus,
pageWithMigratedDsl,
themes,
unpublishedActionCollections,
unpublishedActions,
} = allResponses;
const initActionsCalls = [
setupPageAction(toLoadPageId, true, pageWithMigratedDsl),
setupPageAction({
id: toLoadPageId,
isFirstLoad: true,
pageWithMigratedDsl,
packagePullStatus,
Comment on lines +134 to +138
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you share the EE pr with me @ashit-rath .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}),
fetchActions({ applicationId, unpublishedActions }, []),
fetchJSCollections({ applicationId, unpublishedActionCollections }),
fetchSelectedAppThemeAction(applicationId, currentTheme),
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/pages/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ const mapDispatchToProps = (dispatch: any) => {
initEditor: (payload: InitEditorActionPayload) =>
dispatch(initEditorAction(payload)),
resetEditorRequest: () => dispatch(resetEditorRequest()),
setupPage: (pageId: string) => dispatch(setupPageAction(pageId)),
setupPage: (pageId: string) => dispatch(setupPageAction({ id: pageId })),
updateCurrentPage: (pageId: string) => dispatch(updateCurrentPage(pageId)),
widgetConfigBuildSuccess: () => dispatch(widgetInitialisationSuccess()),
};
Expand Down
2 changes: 2 additions & 0 deletions app/client/src/sagas/InitSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ import {
} from "UITelemetry/generateTraces";
import type { ApplicationPayload } from "entities/Application";
import type { Page } from "entities/Page";
import type { PACKAGE_PULL_STATUS } from "ee/constants/ModuleConstants";

export const URL_CHANGE_ACTIONS = [
ReduxActionTypes.CURRENT_APPLICATION_NAME_UPDATE,
Expand Down Expand Up @@ -133,6 +134,7 @@ export interface EditConsolidatedApi {
pluginFormConfigs: ApiResponse<PluginFormPayload>[];
unpublishedActions: ApiResponse<Action[]>;
unpublishedActionCollections: ApiResponse<JSCollection[]>;
packagePullStatus: ApiResponse<PACKAGE_PULL_STATUS>;
}
export type InitConsolidatedApi = DeployConsolidatedApi | EditConsolidatedApi;
export function* failFastApiCalls(
Expand Down