diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e05d86b1ab..4053f29964 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,21 +5,26 @@ Appsmith is a project by developers for developers and there are a lot of ways y Feel free to propose changes to this document in a pull request. ### Table of contents -- [Code of conduct](CODE_OF_CONDUCT.md) -- [How can I contribute?](#how-can-i-contribute) -- [How to set up local development?](#how-to-set-up-local-development) -- [How to run tests?](#how-to-run-tests) +- Code of conduct +- How can I contribute? +- Git Workflow +- Setting up local development +- Running tests ## How can I contribute? There are many ways in which we/one can to contribute to Appsmith. All contributions are highly appreciated. - Beta testing -- Raise Issues -- Feature Requests -- Documentation +- Raise Issues / Feature Requests +- Improve the Documentation - Code contribution - - Widgets - - Datasources + - Introduce New Widgets + - Introduce New Database Integrations + - Introduce New SAAS Integrations + +## Code of conduct + +Read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing ## Git Workflow @@ -34,7 +39,7 @@ Pull requests are the best way to propose changes to the codebase and get them r 5. Create an issue referencing the pull request. This ensures that we can track the bug being fixed or feature being added easily. -## ๐Ÿ‘จโ€๐Ÿ’ป How to set up local development +## ๐Ÿ‘จโ€๐Ÿ’ป Setting up local development ### Client Appsmith's client (UI/frontend) uses the ReactJS library and Typescript. The application also uses libraries like react-redux and redux-saga for workflows. @@ -102,14 +107,43 @@ echo "127.0.0.1 dev.appsmith.com" | sudo tee -a /etc/hosts - We use MongoDB for our database. 1. After cloning the repository, change your directory to `app/server` -2. Run `mvn clean compile`. This generates a bunch of classes required by IntelliJ for compiling the rest of the source code. + +2. Run the command +```bash + mvn clean compile +``` + +This generates a bunch of classes required by IntelliJ for compiling the rest of the source code. Without this step, your IDE may complain about missing classes and will be unable to compile the code. + 3. Create a copy of the `envs/dev.env.example` ```shell script - cp envs/dev.env.example envs/dev.env + cp envs/dev.env.example .env ``` -## ๐Ÿงช How to run tests +This command creates a `.env` file in the `app/server` folder. All run scripts pick up environment configuration from this file. + +4. Modify the property values in the file `.env` to point to your local running instance of MongoDB and Redis. + +5. In order to create the final JAR for the Appsmith server, run the command: +``` +./build.sh +``` + +This command will create a `dist` folder which contains the final packaged jar along with multiple jars for the binaries for plugins as well. + +6. Start the Java server by running + +``` +./scripts/start-dev-server.sh +``` +By default, the server will start on port 8080. + +7. When the server starts, it automatically runs migrations on MongoDB and will populate it with some initial required data. + +8. You can check the status of the server by hitting the endpoint: [http://localhost:8080](http://localhost:8080) on your browser. By default you should see an blank page. + +## ๐Ÿงช Running tests ##### Client 1. In order to run the Cypress integration tests, run: @@ -128,4 +162,4 @@ echo "127.0.0.1 dev.appsmith.com" | sudo tee -a /etc/hosts 2. Run the command to execute tests ```bash mvn clean package -``` \ No newline at end of file +``` diff --git a/app/client/src/components/designSystems/appsmith/RichTextEditorComponent.tsx b/app/client/src/components/designSystems/appsmith/RichTextEditorComponent.tsx index 5931172de8..3b6b72b35d 100644 --- a/app/client/src/components/designSystems/appsmith/RichTextEditorComponent.tsx +++ b/app/client/src/components/designSystems/appsmith/RichTextEditorComponent.tsx @@ -39,7 +39,9 @@ export const RichtextEditorComponent = ( editorInstance !== null && props.defaultValue !== editorContent.current ) { - editorInstance.setContent(props.defaultValue, { format: "html" }); + setTimeout(() => { + editorInstance.setContent(props.defaultValue, { format: "html" }); + }, 200); } }, [props.defaultValue]); useEffect(() => { diff --git a/app/server/envs/dev.env.example b/app/server/envs/dev.env.example index ee294d34da..7a63880366 100644 --- a/app/server/envs/dev.env.example +++ b/app/server/envs/dev.env.example @@ -1,5 +1,16 @@ #!/bin/sh -APPSMITH_MONGODB_URI="mongodb://localhost:27017/mobtools" +APPSMITH_MONGODB_URI="mongodb://localhost:27017/appsmith" APPSMITH_REDIS_URL="redis://127.0.0.1:6379" + +APPSMITH_MAIL_ENABLED=false + +APPSMITH_ENCRYPTION_PASSWORD=abcd +APPSMITH_ENCRYPTION_SALT=abcd + +#APPSMITH_OAUTH2_GOOGLE_CLIENT_ID="" +#APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET="" + +#APPSMITH_OAUTH2_GITHUB_CLIENT_ID="" +#APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET="" \ No newline at end of file diff --git a/deploy/install.sh b/deploy/install.sh index ce47c67faf..63e162bb68 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -313,11 +313,11 @@ bye() { # Prints a friendly good bye message and exits the script. curl -s -O --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ --data-raw '{ - "userId": "'"$email"'", + "userId": "'"$APPSMITH_INSTALLATION_ID"'", "event": "Installation Support", "data": { "os": "'"$os"'", - "instanceId": "'"$APPSMITH_INSTALLATION_ID"'" + "email": "'"$email"'" } }' echo -e "\nExiting for now. Bye! \U1F44B\n" @@ -338,10 +338,10 @@ APPSMITH_INSTALLATION_ID=$(curl -s 'https://api6.ipify.org') curl -s -O --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", "event": "Installation Started", "data": { - "os": "'"$os"'", - "instanceId": "'"$APPSMITH_INSTALLATION_ID"'" + "os": "'"$os"'" } }' @@ -475,10 +475,10 @@ if confirm n "Do you have a custom domain that you would like to link? (Only for curl -s -O --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", "event": "Installation Custom Domain", "data": { - "os": "'"$os"'", - "instanceId": "'"$APPSMITH_INSTALLATION_ID"'" + "os": "'"$os"'" } }' echo "" @@ -569,21 +569,21 @@ if [[ $status_code -ne 401 ]]; then curl -s -O --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ --data-raw '{ - "userId": "'"$email"'", + "userId": "'"$APPSMITH_INSTALLATION_ID"'", "event": "Installation Support", "data": { "os": "'"$os"'", - "instanceId": "'"$APPSMITH_INSTALLATION_ID"'" + "email": "'"$email"'" } }' else curl -s -O --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ --data-raw '{ + "userId": "'"$APPSMITH_INSTALLATION_ID"'", "event": "Installation Success", "data": { - "os": "'"$os"'", - "instanceId": "'"$APPSMITH_INSTALLATION_ID"'" + "os": "'"$os"'" } }' echo "+++++++++++ SUCCESS ++++++++++++++++++++++++++++++" @@ -604,11 +604,11 @@ else curl -s -O --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \ --header 'Content-Type: text/plain' \ --data-raw '{ - "userId": "'"$email"'", + "userId": "'"$APPSMITH_INSTALLATION_ID"'", "event": "Identify Successful Installation", "data": { "os": "'"$os"'", - "instanceId": "'"$APPSMITH_INSTALLATION_ID"'" + "email": "'"$email"'" } }' fi