## Description
Replaces the old boring action selector dropdown with a much more
sophisticated UI that is capable of going above and beyond. Users with
an aversion to code can now build their more complex workflows with a
click of a few buttons.
Consider this code snippet
```javascript
Api1.run(() => {
showAlert("Hello");
navigateTo('Page1', {}, 'SAME_WINDOW');
}, () => {
removeValue("test");
});
```
|**Old action selector** |**New action selector**|
|:-:|:-:|
|<img width="250" alt="Screenshot 2023-03-29 at 16 54 14"
src="https://user-images.githubusercontent.com/32433245/228520661-a639b580-8986-4aec-a0f5-e2786d1a0f56.png">|
<img width="250" alt="Screenshot 2023-03-29 at 16 55 15"
src="https://user-images.githubusercontent.com/32433245/228521043-5025aa42-af95-4574-b586-bc4c721240bc.png">|
**Click on an action block to edit its parameters.**
<img width="500" alt="Screenshot 2023-03-29 at 17 01 18"
src="https://user-images.githubusercontent.com/32433245/228522479-493769d0-9d2c-4b67-b493-a79e3bb9c947.png">
**Switch to JS mode to get the raw code**
<img width="273" alt="Screenshot 2023-03-29 at 17 05 51"
src="https://user-images.githubusercontent.com/32433245/228523458-13bc0302-4c94-4176-b5aa-3ec208122f57.png">
### Code changes
**New UI components**
- ActionCreator component splits the code into block statements.
- Each block statement is represented by ActionTree.tsx UI component.
- ActionTree.tsx represents an action and its chains.
- ActionCard.tsx is the block that represents the individual action on
the UI.
- ActionSelector.tsx component is popover that contains the form for
editing individual action.
- TabView, TextView, SelectorView, ActionSelectorView and KeyValueView
are components that represent configurable fields in ActionSelector
form.
**AST methods**
- Added methods to get/set function names, expressions, arguments.
- Added methods to get/set then/catch blocks to allow chaining of
actions.
- Added methods to check if code is convertible to UI.
Fixes #10160
Fixes #21588
Fixes #21392
Fixes #21393
Fixes #7903
Fixes #15895
Fixes #17765
Fixes #14562
Depends on https://github.com/appsmithorg/design-system/pull/306
## Type of change
- New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
- Manual
- Jest
- Cypress
### Test Plan
https://github.com/appsmithorg/TestSmith/issues/2296
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [x] Test plan has been approved by relevant developers
- [x] Test plan has been peer reviewed by QA
- [x] Cypress test cases have been added and approved by either SDET or
manual QA
- [x] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [x] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: Rimil Dey <rimil@appsmith.com>
Co-authored-by: arunvjn <arun@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
331 lines
11 KiB
JSON
331 lines
11 KiB
JSON
{
|
|
"name": "appsmith",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"engines": {
|
|
"node": "^16.14.0",
|
|
"npm": "^8.5.5"
|
|
},
|
|
"workspaces": [
|
|
"packages/**/*"
|
|
],
|
|
"cracoConfig": "craco.dev.config.js",
|
|
"scripts": {
|
|
"analyze": "yarn cra-bundle-analyzer",
|
|
"start": "BROWSER=none EXTEND_ESLINT=true REACT_APP_ENVIRONMENT=DEVELOPMENT REACT_APP_CLIENT_LOG_LEVEL=debug HOST=dev.appsmith.com craco start",
|
|
"build": "./build.sh",
|
|
"build-local": "craco --max-old-space-size=4096 build --config craco.build.config.js",
|
|
"build-staging": "REACT_APP_ENVIRONMENT=STAGING craco --max-old-space-size=4096 build --config craco.build.config.js",
|
|
"test": "CYPRESS_BASE_URL=https://dev.appsmith.com cypress/test.sh",
|
|
"test:ci": "CYPRESS_BASE_URL=https://dev.appsmith.com cypress/test.sh --env=ci",
|
|
"eject": "react-scripts eject",
|
|
"start-prod": "REACT_APP_ENVIRONMENT=PRODUCTION craco start",
|
|
"cytest": "REACT_APP_TESTING=TESTING REACT_APP_ENVIRONMENT=DEVELOPMENT craco start & ./node_modules/.bin/cypress open",
|
|
"test:unit": "$(npm bin)/jest -b --colors --no-cache --silent --coverage --collectCoverage=true --coverageDirectory='../../' --coverageReporters='json-summary'",
|
|
"test:jest": "$(npm bin)/jest --watch",
|
|
"generate:widget": "plop --plopfile generators/index.js",
|
|
"postinstall": "patch-package && CURRENT_SCOPE=client node ../shared/install-dependencies.js",
|
|
"preinstall": "CURRENT_SCOPE=client node ../shared/build-shared-dep.js",
|
|
"install": "node cypress/apply-patches.js",
|
|
"storybook": "yarn workspace @design-system/storybook storybook",
|
|
"lint:ci": "eslint --cache --ext .js,.ts,.tsx ./src && eslint --cache --ext .js,.ts ./cypress && yarn run lint:packages",
|
|
"lint:packages": "workspaces-foreach -pt yarn lint:ci",
|
|
"prettier:ci": "prettier --check ./src && prettier --check ./cypress && yarn run prettier:packages",
|
|
"prettier:packages": "workspaces-foreach -pt yarn prettier:ci",
|
|
"check-types": "yarn tsc --noEmit",
|
|
"prepare": "cd ../.. && husky install app/client/.husky"
|
|
},
|
|
"dependencies": {
|
|
"@blueprintjs/core": "^3.36.0",
|
|
"@blueprintjs/datetime": "^3.23.6",
|
|
"@blueprintjs/icons": "^3.10.0",
|
|
"@blueprintjs/popover2": "^0.5.0",
|
|
"@blueprintjs/select": "^3.10.0",
|
|
"@design-system/widgets": "*",
|
|
"@fusioncharts/powercharts": "^3.16.0",
|
|
"@github/g-emoji-element": "^1.1.5",
|
|
"@googlemaps/markerclusterer": "^2.0.14",
|
|
"@googlemaps/react-wrapper": "^1.1.35",
|
|
"@manaflair/redux-batch": "^1.0.0",
|
|
"@mantine/hooks": "^5.10.1",
|
|
"@sentry/react": "^6.2.4",
|
|
"@sentry/tracing": "^6.2.4",
|
|
"@tanstack/virtual-core": "^3.0.0-beta.18",
|
|
"@tinymce/tinymce-react": "^3.13.0",
|
|
"@types/google.maps": "^3.51.0",
|
|
"@types/react-page-visibility": "^6.4.1",
|
|
"@uppy/core": "^1.16.0",
|
|
"@uppy/dashboard": "^1.16.0",
|
|
"@uppy/file-input": "^1.4.22",
|
|
"@uppy/google-drive": "^1.5.22",
|
|
"@uppy/image-editor": "^0.2.4",
|
|
"@uppy/onedrive": "^1.1.22",
|
|
"@uppy/react": "^1.11.2",
|
|
"@uppy/url": "^1.5.16",
|
|
"@uppy/webcam": "^1.8.4",
|
|
"@welldone-software/why-did-you-render": "^4.2.5",
|
|
"algoliasearch": "^4.2.0",
|
|
"axios": "^0.27.2",
|
|
"classnames": "^2.3.1",
|
|
"clsx": "^1.2.1",
|
|
"codemirror": "^5.59.2",
|
|
"codemirror-graphql": "^1.2.14",
|
|
"copy-to-clipboard": "^3.3.1",
|
|
"core-js": "^3.9.1",
|
|
"country-flag-emoji-polyfill": "^0.1.4",
|
|
"craco-alias": "^2.1.1",
|
|
"craco-babel-loader": "^1.0.4",
|
|
"cypress-log-to-output": "^1.1.2",
|
|
"dayjs": "^1.10.6",
|
|
"deep-diff": "^1.0.2",
|
|
"design-system-old": "npm:@appsmithorg/design-system-old@1.1.3",
|
|
"downloadjs": "^1.4.7",
|
|
"exceljs": "^4.3.0",
|
|
"fast-deep-equal": "^3.1.3",
|
|
"fast-xml-parser": "^3.17.5",
|
|
"fastdom": "^1.0.11",
|
|
"focus-trap-react": "^8.9.2",
|
|
"fuse.js": "^3.4.5",
|
|
"fusioncharts": "^3.18.0",
|
|
"fusionmaps": "^3.18.0",
|
|
"graphql": "^16.3.0",
|
|
"history": "^4.10.1",
|
|
"http-proxy": "^1.18.1",
|
|
"immer": "^9.0.6",
|
|
"instantsearch.css": "^7.4.2",
|
|
"interweave": "^12.7.2",
|
|
"interweave-autolink": "^4.4.2",
|
|
"jest-preview": "^0.3.1",
|
|
"js-beautify": "^1.14.0",
|
|
"js-sha256": "^0.9.0",
|
|
"jshint": "^2.13.4",
|
|
"klona": "^2.0.5",
|
|
"libphonenumber-js": "^1.9.44",
|
|
"linkedom": "^0.14.20",
|
|
"localforage": "^1.7.3",
|
|
"lodash": "^4.17.21",
|
|
"lodash-es": "4.17.21",
|
|
"loglevel": "^1.7.1",
|
|
"lottie-web": "^5.7.4",
|
|
"mammoth": "^1.5.1",
|
|
"marked": "^4.0.18",
|
|
"memoize-one": "^6.0.0",
|
|
"micro-memoize": "^4.0.10",
|
|
"moment": "2.29.4",
|
|
"moment-timezone": "^0.5.35",
|
|
"nanoid": "^2.0.4",
|
|
"node-forge": "^1.3.0",
|
|
"normalizr": "^3.3.0",
|
|
"object-hash": "^3.0.0",
|
|
"papaparse": "^5.3.2",
|
|
"path-to-regexp": "^6.2.0",
|
|
"popper.js": "^1.15.0",
|
|
"prismjs": "^1.27.0",
|
|
"proxy-memoize": "^1.2.0",
|
|
"punycode": "^2.1.1",
|
|
"rc-pagination": "^3.1.3",
|
|
"rc-select": "^14.1.9",
|
|
"rc-tree-select": "^5.4.0",
|
|
"re-reselect": "^3.4.0",
|
|
"react": "^17.0.2",
|
|
"react-append-to-body": "^2.0.26",
|
|
"react-beautiful-dnd": "^12.2.0",
|
|
"react-custom-scrollbars": "^4.2.1",
|
|
"react-device-detect": "^2.2.2",
|
|
"react-dnd": "^9.3.4",
|
|
"react-dnd-html5-backend": "^9.3.4",
|
|
"react-dnd-touch-backend": "^9.4.0",
|
|
"react-documents": "^1.0.4",
|
|
"react-dom": "^17.0.2",
|
|
"react-full-screen": "^1.1.0",
|
|
"react-fusioncharts": "^3.1.2",
|
|
"react-google-recaptcha": "^2.1.0",
|
|
"react-helmet": "^5.2.1",
|
|
"react-hook-form": "^7.28.0",
|
|
"react-instantsearch-dom": "^6.4.0",
|
|
"react-json-view": "^1.21.3",
|
|
"react-masonry-css": "^1.0.16",
|
|
"react-media-recorder": "^1.6.1",
|
|
"react-modal": "^3.15.1",
|
|
"react-page-visibility": "^7.0.0",
|
|
"react-paginating": "^1.4.0",
|
|
"react-player": "^2.3.1",
|
|
"react-qr-barcode-scanner": "^1.0.6",
|
|
"react-rating": "^2.0.5",
|
|
"react-redux": "^7.2.4",
|
|
"react-responsive": "^9.0.0-beta.3",
|
|
"react-router": "^5.1.2",
|
|
"react-router-dom": "^5.1.2",
|
|
"react-scripts": "^5.0.1",
|
|
"react-select": "^3.0.8",
|
|
"react-spring": "^9.4.0",
|
|
"react-syntax-highlighter": "^15.5.0",
|
|
"react-table": "^7.0.0",
|
|
"react-table-sticky": "^1.1.3",
|
|
"react-tabs": "^3.0.0",
|
|
"react-timer-hook": "^3.0.4",
|
|
"react-toastify": "^5.5.0",
|
|
"react-use-gesture": "^7.0.4",
|
|
"react-virtuoso": "^1.9.0",
|
|
"react-webcam": "^7.0.1",
|
|
"react-window": "^1.8.6",
|
|
"react-zoom-pan-pinch": "^1.6.1",
|
|
"redux": "^4.0.1",
|
|
"redux-form": "^8.2.6",
|
|
"redux-saga": "^1.1.3",
|
|
"remixicon-react": "^1.0.0",
|
|
"reselect": "^4.0.0",
|
|
"scroll-into-view-if-needed": "^2.2.26",
|
|
"shallowequal": "^1.1.0",
|
|
"showdown": "^1.9.1",
|
|
"simplebar-react": "^2.4.3",
|
|
"smartlook-client": "^8.0.0",
|
|
"socket.io-client": "^4.5.4",
|
|
"styled-components": "^5.3.6",
|
|
"tern": "^0.21.0",
|
|
"tinycolor2": "^1.4.2",
|
|
"toposort": "^2.0.2",
|
|
"tslib": "^2.3.1",
|
|
"typescript": "4.5.5",
|
|
"unescape-js": "^1.1.4",
|
|
"url-search-params-polyfill": "^8.0.0",
|
|
"webfontloader": "^1.6.28",
|
|
"webpack-retry-chunk-load-plugin": "^3.1.1",
|
|
"yjs": "^13.5.12",
|
|
"zipcelx": "^1.6.2"
|
|
},
|
|
"browserslist": [
|
|
">0.2%",
|
|
"not dead",
|
|
"not ie <= 11",
|
|
"not op_mini all"
|
|
],
|
|
"devDependencies": {
|
|
"@babel/helper-create-regexp-features-plugin": "^7.18.6",
|
|
"@babel/helper-string-parser": "^7.19.4",
|
|
"@craco/craco": "^7.0.0",
|
|
"@faker-js/faker": "^7.4.0",
|
|
"@redux-saga/testing-utils": "^1.1.5",
|
|
"@sentry/webpack-plugin": "^1.18.9",
|
|
"@testing-library/jest-dom": "5.16.1",
|
|
"@testing-library/react": "12.1.2",
|
|
"@testing-library/react-hooks": "^7.0.2",
|
|
"@testing-library/user-event": "13.5.0",
|
|
"@types/codemirror": "^0.0.96",
|
|
"@types/deep-diff": "^1.0.0",
|
|
"@types/dom-mediacapture-record": "^1.0.11",
|
|
"@types/downloadjs": "^1.4.2",
|
|
"@types/jest": "^27.4.1",
|
|
"@types/js-beautify": "^1.13.2",
|
|
"@types/jshint": "^2.12.0",
|
|
"@types/lodash": "^4.14.120",
|
|
"@types/marked": "^4.0.3",
|
|
"@types/moment-timezone": "^0.5.10",
|
|
"@types/nanoid": "^2.0.0",
|
|
"@types/node": "^10.12.18",
|
|
"@types/node-forge": "^0.10.0",
|
|
"@types/object-hash": "^2.2.1",
|
|
"@types/papaparse": "^5.3.5",
|
|
"@types/prismjs": "^1.16.1",
|
|
"@types/react": "^17.0.2",
|
|
"@types/react-beautiful-dnd": "^11.0.4",
|
|
"@types/react-custom-scrollbars": "^4.0.7",
|
|
"@types/react-dom": "^17.0.2",
|
|
"@types/react-google-recaptcha": "^2.1.1",
|
|
"@types/react-helmet": "^5.0.14",
|
|
"@types/react-instantsearch-dom": "^6.3.0",
|
|
"@types/react-modal": "^3.13.1",
|
|
"@types/react-redux": "^7.0.1",
|
|
"@types/react-router-dom": "^5.1.2",
|
|
"@types/react-select": "^3.0.5",
|
|
"@types/react-syntax-highlighter": "^13.5.2",
|
|
"@types/react-table": "^7.0.13",
|
|
"@types/react-tabs": "^2.3.1",
|
|
"@types/react-test-renderer": "^17.0.1",
|
|
"@types/react-window": "^1.8.2",
|
|
"@types/redux-form": "^8.1.9",
|
|
"@types/redux-mock-store": "^1.0.2",
|
|
"@types/resize-observer-browser": "^0.1.5",
|
|
"@types/showdown": "^1.9.4",
|
|
"@types/styled-components": "^5.1.26",
|
|
"@types/tern": "0.22.0",
|
|
"@types/tinycolor2": "^1.4.2",
|
|
"@types/toposort": "^2.0.3",
|
|
"@types/webfontloader": "1.6.33",
|
|
"@types/zipcelx": "^1.5.0",
|
|
"@typescript-eslint/eslint-plugin": "^5.25.0",
|
|
"@typescript-eslint/parser": "^5.25.0",
|
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
"chalk": "^4.1.1",
|
|
"compression-webpack-plugin": "^10.0.0",
|
|
"cra-bundle-analyzer": "^0.1.0",
|
|
"cy-verify-downloads": "^0.0.5",
|
|
"cypress": "9.7.0",
|
|
"cypress-file-upload": "^4.1.1",
|
|
"cypress-image-snapshot": "^4.0.1",
|
|
"cypress-multi-reporters": "^1.2.4",
|
|
"cypress-real-events": "^1.7.1",
|
|
"cypress-wait-until": "^1.7.2",
|
|
"cypress-xpath": "^1.4.0",
|
|
"diff": "^5.0.0",
|
|
"dotenv": "^8.1.0",
|
|
"eslint": "^8.35.0",
|
|
"eslint-config-prettier": "^8.6.0",
|
|
"eslint-import-resolver-babel-module": "^5.3.1",
|
|
"eslint-plugin-cypress": "^2.11.2",
|
|
"eslint-plugin-import": "^2.25.2",
|
|
"eslint-plugin-prettier": "^4.2.1",
|
|
"eslint-plugin-react": "^7.30.0",
|
|
"eslint-plugin-react-hooks": "^2.3.0",
|
|
"eslint-plugin-sort-destructure-keys": "^1.3.5",
|
|
"factory.ts": "^0.5.1",
|
|
"husky": "^8.0.0",
|
|
"jest-canvas-mock": "^2.3.1",
|
|
"jest-styled-components": "^7.0.8",
|
|
"lint-staged": "^13.2.0",
|
|
"mocha": "^9.0.2",
|
|
"mocha-junit-reporter": "^2.0.0",
|
|
"mochawesome": "^7.1.2",
|
|
"mochawesome-report-generator": "^6.1.1",
|
|
"msw": "^0.28.0",
|
|
"patch-package": "^6.4.7",
|
|
"plop": "^3.1.1",
|
|
"postinstall-postinstall": "^2.1.0",
|
|
"prettier": "^2.8.6",
|
|
"prop-types": "^15.8.1",
|
|
"raw-loader": "^4.0.2",
|
|
"react-is": "^16.12.0",
|
|
"react-test-renderer": "^16.11.0",
|
|
"redux-devtools": "^3.5.0",
|
|
"redux-devtools-extension": "^2.13.8",
|
|
"redux-mock-store": "^1.5.4",
|
|
"semver": "^7.3.5",
|
|
"ts-jest": "27.0.0",
|
|
"ts-jest-mock-import-meta": "^0.12.0",
|
|
"ts-loader": "^9.4.1",
|
|
"webpack-merge": "^5.8.0",
|
|
"workbox-webpack-plugin": "^6.5.3",
|
|
"yarn-workspaces-foreach": "^0.2.0"
|
|
},
|
|
"resolutions": {
|
|
"browserslist": "4.20.3",
|
|
"chokidar": "3.5.3",
|
|
"css-select": "4.1.3",
|
|
"ejs": "3.1.7",
|
|
"fast-csv": "4.3.6",
|
|
"focus-trap-react/**/tabbable": "5.2.1",
|
|
"json-schema": "0.4.0",
|
|
"node-fetch": "2.6.7",
|
|
"minimatch": "^5.0.0",
|
|
"loader-utils": "^2.0.4",
|
|
"json5": "2.2.3",
|
|
"dns-packet": "5.4.0",
|
|
"glob-parent": "5.1.2",
|
|
"ua-parser-js": "1.0.33",
|
|
"got": "11.8.5",
|
|
"trim-newlines": "3.0.1",
|
|
"trim": "0.0.3",
|
|
"webpack": "5.76.0"
|
|
}
|
|
}
|