Skip to content

Commit

Permalink
chore: Accept app mode param in fetch environment action (#38786)
Browse files Browse the repository at this point in the history
## Description
Adds mode as a a param to the fetchingEnvironmentConfigs action to
handle the environment resolution on page load. The extended code is in
EE where this change is leveraged.

EE PR appsmithorg/appsmith-ee#5977

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 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/12926385771>
> Commit: 980841c
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12926385771&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 23 Jan 2025 10:53:11 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**
- Enhanced environment configuration fetching with optional application
mode parameter
	- Improved workspace ID setting to include application mode context

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
ashit-rath authored Jan 23, 2025
1 parent 9c632b5 commit 72251cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/client/src/ce/actions/environmentAction.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { APP_MODE } from "entities/App";

// Redux action to show the environment info modal before deploy
export const showEnvironmentDeployInfoModal = () => ({});

Expand All @@ -11,12 +13,14 @@ export const setCurrentEditingEnvironmentID = (currentEditingId: string) => ({
export const fetchingEnvironmentConfigs = ({
editorId,
fetchDatasourceMeta = false,
mode,
workspaceId,
}: {
editorId: string;
fetchDatasourceMeta: boolean;
workspaceId: string;
mode?: APP_MODE;
}) => ({
type: "",
payload: { workspaceId, editorId, fetchDatasourceMeta },
payload: { workspaceId, editorId, fetchDatasourceMeta, mode },
});
1 change: 1 addition & 0 deletions app/client/src/ce/sagas/ApplicationSagas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ export function* fetchAppAndPagesSaga(
payload: {
workspaceId: response.data.workspaceId,
editorId: response.data.application?.id,
mode: request.mode,
},
});

Expand Down

0 comments on commit 72251cb

Please sign in to comment.