appsmith
appsmith copied to clipboard
fix: Show loading state of application until all jsobject update calls are complete
Description
[!TIP]
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes https://github.com/appsmithorg/appsmith-ee/issues/4209
[!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
[!CAUTION] 🔴 🔴 🔴 Some tests have failed. Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9124918410 Commit: 2379d2b74ea20665f46d30e1735a0c6b5530db74 Cypress dashboard: Click here! The following are new failures, please fix them before merging the PR:
To know the list of identified flaky tests - Refer here
- cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts
- cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC2_spec.ts
- cypress/e2e/Regression/ClientSide/BugTests/JSParse_Spec.ts
- cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts
- cypress/e2e/Regression/ClientSide/SettingsPane/EmbedSettings_spec.ts
- cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js
Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
/build-deploy-preview skip-tests=true
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9125033210.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 33545.
recreate: .
Deploy-Preview-URL: https://ce-33545.dp.appsmith.com
Previous test run : Caution
🔴 🔴 🔴 Some tests have failed. Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9124918410 Commit: https://github.com/appsmithorg/appsmith/commit/2379d2b74ea20665f46d30e1735a0c6b5530db74 Cypress dashboard: Click here! The following are new failures, please fix them before merging the PR:
cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC2_spec.ts cypress/e2e/Regression/ClientSide/BugTests/JSParse_Spec.ts cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts cypress/e2e/Regression/ClientSide/SettingsPane/EmbedSettings_spec.ts cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js To know the list of identified flaky tests - Refer here
Previous test run :
🔴 🔴 🔴 Some tests have failed. Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9167792219 Commit: https://github.com/appsmithorg/appsmith/commit/983bbab985dc2021567f2acd8ddc21d2f10c3ea7 Cypress dashboard: Click here! The following are new failures, please fix them before merging the PR:
cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters1_spec.ts To know the list of identified flaky tests - Refer here
/build-deploy-preview skip-tests=true
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9188651630.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 33545.
recreate: .
Deploy-Preview-URL: https://ce-33545.dp.appsmith.com
/build-deploy-preview skip-tests=true
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9189051494.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 33545.
recreate: .
Deploy-Preview-URL: https://ce-33545.dp.appsmith.com
The following are new failures, please fix them before merging the PR:
cypress/e2e/Regression/ClientSide/BugTests/GitBugs_Spec.ts cypress/e2e/Regression/ClientSide/Git/GitSync/SwitchBranches_spec.js
Walkthrough
The changes primarily focus on enhancing the handling of JavaScript collection actions within the application. This involves removing deprecated functions, adding new ones to manage save actions, updating constants, and modifying selectors and reducers to support the new save status functionality. The overall goal is to ensure that the save status for JS objects is accurately reflected in the UI during updates.
Changes
| File Path | Change Summary |
|---|---|
app/client/src/actions/jsPaneActions.ts |
Removed updateJSCollection, added jsSaveActionStart and jsSaveActionComplete, repositioned updateJSCollectionBody. |
app/client/src/ce/constants/ReduxActionConstants.tsx |
Removed UPDATE_JS_ACTION_INIT, added JS_ACTION_SAVE_START and JS_ACTION_SAVE_COMPLETE. |
app/client/src/ce/selectors/entitiesSelector.ts |
Converted getApiPaneSavingMap to an exported function. |
app/client/src/reducers/uiReducers/jsPaneReducer.ts |
Renamed action types and adjusted handling of saving and dirty states for JS actions. |
app/client/src/sagas/ActionSagas.ts |
Replaced UPDATE_JS_ACTION_BODY_SUCCESS with EXECUTE_JS_UPDATES in updateEntitySavingStatus. |
app/client/src/sagas/JSPaneSagas.ts |
Added getCurrentLayoutId, jsSaveActionComplete, and jsSaveActionStart, removed refactorJSCollectionAction, refactored handleRefactorJSActionNameSaga. |
app/client/src/selectors/editorSelectors.tsx |
Refactored getIsPageSaving to use createSelector, updated getCurrentLayoutId to define return type explicitly. |
app/client/src/utils/JSPaneUtils.tsx |
Added JSCollectionDifference interface, modified getDifferenceInJSCollection to return JSCollectionDifference. |
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
| Show loader when the JS object update is ongoing (#4209) | ✅ | |
| Loader should start showing when the body update starts and end when the actions update is complete (#4209) | ✅ |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.