-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Parse js actions for view mode changes #18357
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Unable to find test scripts. Please add necessary tests to the PR. |
/ok-to-test sha=dd1dbf7 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3530231300. |
/ok-to-test sha=846e7d1 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3531716068. |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3531884132. |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3531898511. |
/ok-to-test sha=a4aa226 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3532804329. |
/ok-to-test sha=80bb50a |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3546691853. |
a01446b
to
80e7b11
Compare
/ok-to-test sha=80e7b11 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3570650277. |
delete dataTreeEvalRef.currentJSCollectionState[`${entityName}`]; | ||
const jsActions = entity.meta; | ||
//think about adding variables as currentJSCollectionState | ||
Object.keys(jsActions).forEach((jsAction: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would have the functions inside resolvedFunctions already. Could you please check ?
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3662543290. |
/perf-test |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3663065347. |
/ok-to-test sha=ff924b6 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3673075541. |
/ok-to-test sha=575964e |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3674980212. |
This reverts commit efa8b68.
Description
Each time we load an application in view/edit mode, we parse each js object body to get the functions and variables to be executed. After parsing, we convert each js object function from string to function format.
As part of performance improvement, we realized we don't need to parse each js object body to get functions and variables in view mode because we don't update js objects in view if any discrepancies are detected on the client and server-side.
As a result of that, we can completely rely on the state of the js object we get from the backend. Each js object has an actions property and each action has js function saved in the body in string format which can be converted into function format to be executed which makes view mode faster because we will avoid parsing .
Fixes #18291
Type of change
How Has This Been Tested?
Manual
https://github.com/appsmithorg/TestSmith/issues/2113
Jest
Cypress
Test Plan
Issues raised during DP testing
Checklist:
Dev activity
QA activity: