From 0eea37e72a68f15964280e849d54ec3f9da5ac15 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 20 Mar 2019 22:13:38 +0530 Subject: [PATCH 01/29] Fixing Spelling Mistake (#913) * Fixing typos * Fixed Spellings --- client/constants.js | 2 +- developer_docs/installation.md | 2 +- server/migrations/db_reformat.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/constants.js b/client/constants.js index 43536f75..4250cc3b 100644 --- a/client/constants.js +++ b/client/constants.js @@ -1,4 +1,4 @@ -// TODO Organize this file by reducer type, ot break this apart into +// TODO Organize this file by reducer type, to break this apart into // multiple files export const UPDATE_FILE_CONTENT = 'UPDATE_FILE_CONTENT'; export const TOGGLE_SKETCH = 'TOGGLE_SKETCH'; diff --git a/developer_docs/installation.md b/developer_docs/installation.md index 21fc18fa..49e8a555 100644 --- a/developer_docs/installation.md +++ b/developer_docs/installation.md @@ -59,7 +59,7 @@ If you don't have the full server environment running, you can launch a one-off ## S3 Bucket Configuration -Note that this is optional, unless you are working on the part of the application that allows a user to upload images, videos, etc. Please refer to the folllowing [gist](https://gist.github.com/catarak/70c9301f0fd1ac2d6b58de03f61997e3) to set up an S3 bucket to be used with this project. +Note that this is optional, unless you are working on the part of the application that allows a user to upload images, videos, etc. Please refer to the following [gist](https://gist.github.com/catarak/70c9301f0fd1ac2d6b58de03f61997e3) to set up an S3 bucket to be used with this project. If your S3 bucket is in the US East (N Virginia) region (us-east-1), you'll need to set a custom URL base for it, because it does not follow the standard diff --git a/server/migrations/db_reformat.js b/server/migrations/db_reformat.js index 82dadcf4..b6c85a30 100644 --- a/server/migrations/db_reformat.js +++ b/server/migrations/db_reformat.js @@ -178,7 +178,7 @@ objectsResponse.on('end', () => { // // console.log('is selected remains'); // // } -// // if (file.isSelctedFile) { +// // if (file.isSelectedFile) { // // console.log('changed to isSelected file'); // // } // project.save((err, savedProject) => { From e2a6b4595b093fb4447f09acaff5d3c7cc5fa126 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 20 Mar 2019 22:22:00 +0530 Subject: [PATCH 02/29] CSS Fixes (#920) --- client/styles/abstracts/_variables.scss | 2 +- client/styles/components/_copyable-input.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/styles/abstracts/_variables.scss b/client/styles/abstracts/_variables.scss index 103016da..ada53ea9 100644 --- a/client/styles/abstracts/_variables.scss +++ b/client/styles/abstracts/_variables.scss @@ -36,7 +36,7 @@ $themes: ( modal-background-color: #f4f4f4, modal-button-background-color: #e6e6e6, modal-border-color: rgba(17, 17, 17, 0.3), - modal-boder-selected-color: #B9D0E1, + modal-border-selected-color: #B9D0E1, icon-color: $icon-color, icon-hover-color: $icon-hover-color, icon-toast-hover-color: $white, diff --git a/client/styles/components/_copyable-input.scss b/client/styles/components/_copyable-input.scss index 2bd5c476..eb96f38f 100644 --- a/client/styles/components/_copyable-input.scss +++ b/client/styles/components/_copyable-input.scss @@ -51,7 +51,7 @@ } .tooltipped-n::before, -.tooltipped::before, +.tooltipped::before { @include themify() { color: getThemifyVariable('button-background-hover-color'); From 1b468aa4ec5a98bfa2ae1de9802b78ac13c527b7 Mon Sep 17 00:00:00 2001 From: Gaurang Tandon <1gaurangtandon@gmail.com> Date: Wed, 20 Mar 2019 23:58:15 +0530 Subject: [PATCH 03/29] fixes #795 (#935) * fixes #795 * fix lint --- client/modules/IDE/pages/IDEView.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index f9476793..05163b63 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -251,7 +251,9 @@ class IDEView extends React.Component { defaultSize="50%" onChange={() => { this.overlay.style.display = 'block'; }} onDragFinished={() => { this.overlay.style.display = 'none'; }} - resizerStyle={{ marginRight: '0', marginLeft: '-10px' }} + resizerStyle={{ + borderLeftWidth: '2px', borderRightWidth: '2px', width: '2px', margin: '0px 0px' + }} > Date: Thu, 21 Mar 2019 02:02:01 +0530 Subject: [PATCH 04/29] Added length cap to sketch name (#944) --- client/modules/IDE/components/Toolbar.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/modules/IDE/components/Toolbar.jsx b/client/modules/IDE/components/Toolbar.jsx index 2b7101bf..e6d5c14c 100644 --- a/client/modules/IDE/components/Toolbar.jsx +++ b/client/modules/IDE/components/Toolbar.jsx @@ -124,6 +124,7 @@ class Toolbar extends React.Component { Date: Thu, 21 Mar 2019 03:23:03 +0530 Subject: [PATCH 05/29] fixes #906 (#931) --- client/utils/reduxFormUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/utils/reduxFormUtils.js b/client/utils/reduxFormUtils.js index 0f822b9b..cbf1ef2e 100644 --- a/client/utils/reduxFormUtils.js +++ b/client/utils/reduxFormUtils.js @@ -73,8 +73,8 @@ export function validateSignup(formProps) { errors.confirmPassword = 'Please enter a password confirmation'; } - if (formProps.password !== formProps.confirmPassword) { - errors.password = 'Passwords must match'; + if (formProps.password !== formProps.confirmPassword && formProps.confirmPassword) { + errors.confirmPassword = 'Passwords must match'; } return errors; From 80765e03c78ad5f6f350b98be69fbddc491d8651 Mon Sep 17 00:00:00 2001 From: Ankur Ingale <33569473+AnkurIngale@users.noreply.github.com> Date: Fri, 22 Mar 2019 02:38:46 +0530 Subject: [PATCH 06/29] Fixed Issue #659 (#964) * Fixed Issue #659 * Undo changes in package.json and package-lock.json * Resolved error --- client/modules/IDE/components/FileNode.jsx | 15 ++++++++++++--- client/modules/IDE/components/Sidebar.jsx | 18 +++++++++++++++--- server/controllers/project.controller.js | 4 +++- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/client/modules/IDE/components/FileNode.jsx b/client/modules/IDE/components/FileNode.jsx index 252de291..4fbc6ca1 100644 --- a/client/modules/IDE/components/FileNode.jsx +++ b/client/modules/IDE/components/FileNode.jsx @@ -156,7 +156,6 @@ export class FileNode extends React.Component { ref={(element) => { this[`fileOptions-${this.props.id}`] = element; }} tabIndex="0" onClick={this.toggleFileOptions} - onBlur={() => setTimeout(this.hideFileOptions, 200)} > @@ -168,7 +167,10 @@ export class FileNode extends React.Component {
    • -
    • -
    • diff --git a/server/controllers/project.controller.js b/server/controllers/project.controller.js index 9244c270..ef9e0ef9 100644 --- a/server/controllers/project.controller.js +++ b/server/controllers/project.controller.js @@ -110,7 +110,9 @@ export function getProject(req, res) { function deleteFilesFromS3(files) { deleteObjectsFromS3(files.filter((file) => { if (file.url) { - if (!process.env.S3_DATE || (process.env.S3_DATE && isBefore(new Date(process.env.S3_DATE), new Date(file.createdAt)))) { + if (!process.env.S3_DATE || ( + process.env.S3_DATE && + isBefore(new Date(process.env.S3_DATE), new Date(file.createdAt)))) { return true; } } From 679ef12b54616ba879e10a0a773f21c55fd38495 Mon Sep 17 00:00:00 2001 From: cdr Date: Thu, 21 Mar 2019 20:26:52 -0400 Subject: [PATCH 07/29] Remove indentation options from Preferences.jsx --- client/modules/IDE/components/Preferences.jsx | 79 ------------------- 1 file changed, 79 deletions(-) diff --git a/client/modules/IDE/components/Preferences.jsx b/client/modules/IDE/components/Preferences.jsx index 27eddd7d..15ba9d7a 100644 --- a/client/modules/IDE/components/Preferences.jsx +++ b/client/modules/IDE/components/Preferences.jsx @@ -16,7 +16,6 @@ class Preferences extends React.Component { super(props); this.handleUpdateAutosave = this.handleUpdateAutosave.bind(this); this.handleUpdateFont = this.handleUpdateFont.bind(this); - this.handleUpdateIndentation = this.handleUpdateIndentation.bind(this); this.handleLintWarning = this.handleLintWarning.bind(this); } @@ -34,20 +33,6 @@ class Preferences extends React.Component { this.props.setFontSize(value); } - handleUpdateIndentation(event) { - let value = parseInt(event.target.value, 10); - if (Number.isNaN(value)) { - value = 2; - } - if (value > 6) { - value = 6; - } - if (value < 0) { - value = 0; - } - this.props.setIndentation(value); - } - handleUpdateAutosave(event) { const value = event.target.value === 'true'; this.props.setAutosave(value); @@ -144,65 +129,6 @@ class Preferences extends React.Component {
      Increase
      -
      -

      Indentation amount

      - - { this.indentationInput = element; }} - onClick={() => { - this.indentationInput.select(); - }} - /> - - - - - -

      Autosave

      @@ -318,11 +244,6 @@ class Preferences extends React.Component { Preferences.propTypes = { fontSize: PropTypes.number.isRequired, - indentationAmount: PropTypes.number.isRequired, - setIndentation: PropTypes.func.isRequired, - indentWithSpace: PropTypes.func.isRequired, - indentWithTab: PropTypes.func.isRequired, - isTabIndent: PropTypes.bool.isRequired, setFontSize: PropTypes.func.isRequired, autosave: PropTypes.bool.isRequired, setAutosave: PropTypes.func.isRequired, From 096f8a1f651538b2395a98cb123234ce813d08c3 Mon Sep 17 00:00:00 2001 From: cdr Date: Thu, 21 Mar 2019 20:52:56 -0400 Subject: [PATCH 08/29] Hardcode 2-space configuration in Editor.jsx --- client/modules/IDE/components/Editor.jsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 485302e5..d756657d 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -137,9 +137,6 @@ class Editor extends React.Component { }); this._cm.getWrapperElement().style['font-size'] = `${this.props.fontSize}px`; - this._cm.setOption('indentWithTabs', this.props.isTabIndent); - this._cm.setOption('tabSize', this.props.indentationAmount); - this._cm.setOption('indentUnit', this.props.indentationAmount); this.props.provideController({ tidyCode: this.tidyCode, @@ -174,13 +171,6 @@ class Editor extends React.Component { if (this.props.fontSize !== prevProps.fontSize) { this._cm.getWrapperElement().style['font-size'] = `${this.props.fontSize}px`; } - if (this.props.indentationAmount !== prevProps.indentationAmount) { - this._cm.setOption('tabSize', this.props.indentationAmount); - this._cm.setOption('indentUnit', this.props.indentationAmount); - } - if (this.props.isTabIndent !== prevProps.isTabIndent) { - this._cm.setOption('indentWithTabs', this.props.isTabIndent); - } if (this.props.theme !== prevProps.theme) { this._cm.setOption('theme', `p5-${this.props.theme}`); } @@ -254,8 +244,8 @@ class Editor extends React.Component { tidyCode() { const beautifyOptions = { - indent_size: this.props.indentationAmount, - indent_with_tabs: this.props.isTabIndent + indent_size: 2, + indent_with_tabs: false }; const mode = this._cm.getOption('mode'); @@ -351,8 +341,6 @@ Editor.propTypes = { })), updateLintMessage: PropTypes.func.isRequired, clearLintMessage: PropTypes.func.isRequired, - indentationAmount: PropTypes.number.isRequired, - isTabIndent: PropTypes.bool.isRequired, updateFileContent: PropTypes.func.isRequired, fontSize: PropTypes.number.isRequired, file: PropTypes.shape({ From ddb93e6c8db6de30ad55eee3a65ce95b710dee09 Mon Sep 17 00:00:00 2001 From: cdr Date: Thu, 21 Mar 2019 21:02:22 -0400 Subject: [PATCH 09/29] Remove indentation PropTypes from IDEView.jsx --- client/modules/IDE/pages/IDEView.jsx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index 05163b63..8dda673a 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -202,11 +202,6 @@ class IDEView extends React.Component { > Date: Thu, 21 Mar 2019 21:08:59 -0400 Subject: [PATCH 10/29] Remove indentation config from actions, reducers, and constants --- client/constants.js | 8 ---- client/modules/IDE/actions/preferences.js | 52 ---------------------- client/modules/IDE/reducers/preferences.js | 12 ----- 3 files changed, 72 deletions(-) diff --git a/client/constants.js b/client/constants.js index 4250cc3b..338d7914 100644 --- a/client/constants.js +++ b/client/constants.js @@ -13,14 +13,6 @@ export const OPEN_PREFERENCES = 'OPEN_PREFERENCES'; export const CLOSE_PREFERENCES = 'CLOSE_PREFERENCES'; export const SET_FONT_SIZE = 'SET_FONT_SIZE'; -export const INCREASE_INDENTATION = 'INCREASE_INDENTATION'; -export const DECREASE_INDENTATION = 'DECREASE_INDENTATION'; -export const UPDATE_INDENTATION = 'UPDATE_INDENTATION'; -export const SET_INDENTATION = 'SET_INDENTATION'; - -export const INDENT_WITH_SPACE = 'INDENT_WITH_SPACE'; -export const INDENT_WITH_TAB = 'INDENT_WITH_TAB'; - export const AUTH_USER = 'AUTH_USER'; export const UNAUTH_USER = 'UNAUTH_USER'; export const AUTH_ERROR = 'AUTH_ERROR'; diff --git a/client/modules/IDE/actions/preferences.js b/client/modules/IDE/actions/preferences.js index 3e26e45a..8919167d 100644 --- a/client/modules/IDE/actions/preferences.js +++ b/client/modules/IDE/actions/preferences.js @@ -32,58 +32,6 @@ export function setFontSize(value) { }; } -export function setIndentation(value) { - return (dispatch, getState) => { - dispatch({ - type: ActionTypes.SET_INDENTATION, - value - }); - const state = getState(); - if (state.user.authenticated) { - const formParams = { - preferences: { - indentationAmount: value - } - }; - updatePreferences(formParams, dispatch); - } - }; -} - -export function indentWithTab() { - return (dispatch, getState) => { - dispatch({ - type: ActionTypes.INDENT_WITH_TAB - }); - const state = getState(); - if (state.user.authenticated) { - const formParams = { - preferences: { - isTabIndent: true - } - }; - updatePreferences(formParams, dispatch); - } - }; -} - -export function indentWithSpace() { - return (dispatch, getState) => { - dispatch({ - type: ActionTypes.INDENT_WITH_SPACE - }); - const state = getState(); - if (state.user.authenticated) { - const formParams = { - preferences: { - isTabIndent: false - } - }; - updatePreferences(formParams, dispatch); - } - }; -} - export function setAutosave(value) { return (dispatch, getState) => { dispatch({ diff --git a/client/modules/IDE/reducers/preferences.js b/client/modules/IDE/reducers/preferences.js index 8441f042..21efcb8d 100644 --- a/client/modules/IDE/reducers/preferences.js +++ b/client/modules/IDE/reducers/preferences.js @@ -2,8 +2,6 @@ import * as ActionTypes from '../../../constants'; const initialState = { fontSize: 18, - indentationAmount: 2, - isTabIndent: true, autosave: true, lintWarning: false, textOutput: false, @@ -17,16 +15,6 @@ const preferences = (state = initialState, action) => { switch (action.type) { case ActionTypes.SET_FONT_SIZE: return Object.assign({}, state, { fontSize: action.value }); - case ActionTypes.SET_INDENTATION: - return Object.assign({}, state, { indentationAmount: action.value }); - case ActionTypes.INDENT_WITH_TAB: - return Object.assign({}, state, { - isTabIndent: true - }); - case ActionTypes.INDENT_WITH_SPACE: - return Object.assign({}, state, { - isTabIndent: false - }); case ActionTypes.SET_AUTOSAVE: return Object.assign({}, state, { autosave: action.value }); case ActionTypes.SET_LINT_WARNING: From 20be8eb5bd863f7947a7b98fd930caffc81db5fa Mon Sep 17 00:00:00 2001 From: cdr Date: Sat, 23 Mar 2019 20:53:07 -0400 Subject: [PATCH 11/29] Fix tab indentation setting --- client/modules/IDE/components/Editor.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index d756657d..f57569b6 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -50,6 +50,9 @@ const unsavedChangesDotUrl = require('../../../images/unsaved-changes-dot.svg'); const rightArrowUrl = require('../../../images/right-arrow.svg'); const leftArrowUrl = require('../../../images/left-arrow.svg'); +const IS_TAB_INDENT = false; +const INDENTATION_AMOUNT = 2; + class Editor extends React.Component { constructor(props) { super(props); @@ -105,6 +108,7 @@ class Editor extends React.Component { delete this._cm.options.lint.options.errors; this._cm.setOption('extraKeys', { + Tab: cm => cm.replaceSelection(Array(INDENTATION_AMOUNT + 1).join(' ')), [`${metaKey}-Enter`]: () => null, [`Shift-${metaKey}-Enter`]: () => null, [`${metaKey}-F`]: 'findPersistent', @@ -244,8 +248,8 @@ class Editor extends React.Component { tidyCode() { const beautifyOptions = { - indent_size: 2, - indent_with_tabs: false + indent_size: INDENTATION_AMOUNT, + indent_with_tabs: IS_TAB_INDENT }; const mode = this._cm.getOption('mode'); From 49e786a82d537f3a893769b4f4b288179f6ce26e Mon Sep 17 00:00:00 2001 From: cdr Date: Tue, 26 Mar 2019 02:12:42 -0400 Subject: [PATCH 12/29] Use more straightforward tab keymap function --- client/modules/IDE/components/Editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index f57569b6..a86447f6 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -108,7 +108,7 @@ class Editor extends React.Component { delete this._cm.options.lint.options.errors; this._cm.setOption('extraKeys', { - Tab: cm => cm.replaceSelection(Array(INDENTATION_AMOUNT + 1).join(' ')), + Tab: cm => cm.replaceSelection(' '.repeat(INDENTATION_AMOUNT)), [`${metaKey}-Enter`]: () => null, [`Shift-${metaKey}-Enter`]: () => null, [`${metaKey}-F`]: 'findPersistent', From 8a7c858834e305430da7e415ae6547fde50e1777 Mon Sep 17 00:00:00 2001 From: Abhinav sagar Date: Tue, 26 Mar 2019 19:15:58 +0530 Subject: [PATCH 13/29] Improved documentation --- developer_docs/deployment.md | 2 ++ developer_docs/installation.md | 10 ++++--- developer_docs/preparing_a_pull_request.md | 31 ++++++++++++++-------- package-lock.json | 28 ++++++++++++++----- package.json | 8 +++--- 5 files changed, 54 insertions(+), 25 deletions(-) diff --git a/developer_docs/deployment.md b/developer_docs/deployment.md index 013061aa..fcd708b2 100644 --- a/developer_docs/deployment.md +++ b/developer_docs/deployment.md @@ -39,6 +39,8 @@ You'll only need to do this if you're testing the production environment locally 8. Since production assumes your environment variables are in the shell environment, and not in a `.env` file, you will have to run `export $(grep -v '^#' .env | xargs)` or a similar command, see this [Stack Overflow answer](https://stackoverflow.com/a/20909045/4086967). 9. `$ npm run start:prod` +NOTE- Windows user should use `copy` in place of `cp` during above installation. + ## Self Hosting - Heroku Deployment If you are interested in hosting and deploying your own p5.js Web Editor instance, you can! It would be the same as the official editor instance at editor.p5js.org, except with a different domain, and you would be in charge of the maintenance. We recommend using Heroku as you can host it for free. diff --git a/developer_docs/installation.md b/developer_docs/installation.md index 21fc18fa..222bf3de 100644 --- a/developer_docs/installation.md +++ b/developer_docs/installation.md @@ -6,14 +6,14 @@ Follow these instructions to set up your development environment, which you need 1. Install [node.js](http://nodejs.org/), which also automatically installs the [npm](https://www.npmjs.org) package manager. 2. [Fork](https://help.github.com/articles/fork-a-repo) the [p5.js Web Editor repository](https://github.com/processing/p5.js-web-editor) into your own GitHub account. -3. [Clone](https://help.github.com/articles/cloning-a-repository/) your new fork of the repository from GitHub onto your local computer. +3. [Clone](https://help.github.com/articles/cloning-a-repository/) your new fork of the repository from GitHub onto your local computer. ``` $ git clone https://github.com/YOUR_USERNAME/p5.js-web-editor.git ``` 4. Navigate into the project folder and install all its necessary dependencies with npm. - + ``` $ cd p5.js-web-editor $ npm install @@ -29,6 +29,8 @@ Follow these instructions to set up your development environment, which you need 11. Install the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) 12. Open and close the Redux DevTools using `ctrl+h`, and move them with `ctrl+w` +NOTE- Windows user should use `copy` in place of `cp` during above installation. + ## Docker Installation Using Docker, you can have a complete, consistent development environment without having to manually install dependencies such as Node, Mongo, etc. It also helps isolate these dependencies and their data from other projects that you may have on the same computer that use different/conflicting versions, etc. @@ -57,6 +59,8 @@ If you don't have the full server environment running, you can launch a one-off 10. `$ docker-compose -f docker-compose-development.yml run app --rm bash -l` +NOTE- Windows user should use `copy` in place of `cp` during above installation. + ## S3 Bucket Configuration Note that this is optional, unless you are working on the part of the application that allows a user to upload images, videos, etc. Please refer to the folllowing [gist](https://gist.github.com/catarak/70c9301f0fd1ac2d6b58de03f61997e3) to set up an S3 bucket to be used with this project. @@ -75,4 +79,4 @@ name, you can also set it using this variable. I.e.: For more information on using a custom domain, see this documentation link: -http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingCustomURLs \ No newline at end of file +http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingCustomURLs diff --git a/developer_docs/preparing_a_pull_request.md b/developer_docs/preparing_a_pull_request.md index 7da74f92..6711dde4 100644 --- a/developer_docs/preparing_a_pull_request.md +++ b/developer_docs/preparing_a_pull_request.md @@ -6,10 +6,10 @@ Pull-requests are easier when your code is up to date! You can use git rebase to ## Save and Update -### Save everything you have! - git status +### Save everything you have! + git status git add -u - git commit + git commit ### Find out about changes @@ -23,25 +23,34 @@ If you see an error, you'll need to start tracking the main p5.js repo as an "up Then ask git about the latest changes. - git fetch upstream + git fetch upstream ### Just in case: make a copy of your changes in a new branch - git branch your-branch-name-backup + git branch your-branch-name-backup -### Apply changes from master branch, adds your changes *after* - git rebase upstream/master +### Apply changes from master branch, adds your changes *after* + git rebase upstream/master + +### Switches back to master branch + git checkout master + +### Helps other contributors fully understand the changes that you made + git commit -m "Fixed documentation typos" + +### Verifies what git will be committing + git status ## CONFLICTS -You will probably have some conflicts! +You will probably have some conflicts! If it’s just lib/p5.js and lib/p5.min.js, it’s easy to fix. just build the project again with grunt. - grunt + grunt git add -u git rebase --continue If you have conflicts in other files & you're not sure how to resolve them... ask for help! Lauren, David, Kevin, and Kate are familiar with recent changes and can help you figure out what's new. ## And finally, for great glory - git push origin + git push --set-upstream origin your-branch-name-backup -Here's a good reference on rebasing, in case you're intensely curious about the technical details. https://www.atlassian.com/git/tutorials/merging-vs-rebasing \ No newline at end of file +Here's a good reference on rebasing, in case you're intensely curious about the technical details. https://www.atlassian.com/git/tutorials/merging-vs-rebasing diff --git a/package-lock.json b/package-lock.json index e23af10d..5e5de221 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5099,11 +5099,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5116,15 +5118,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5227,7 +5232,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5237,6 +5243,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5249,17 +5256,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5276,6 +5286,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5348,7 +5359,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5358,6 +5370,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -5463,6 +5476,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/package.json b/package.json index 8dc0e8e4..2165647d 100644 --- a/package.json +++ b/package.json @@ -49,27 +49,27 @@ "chunk-manifest-webpack-plugin": "github:catarak/chunk-manifest-webpack-plugin", "css-loader": "^0.23.1", "cssnano": "^3.10.0", - "eslint": "^4.19.1", "enzyme": "^3.7.0", "enzyme-adapter-react-16": "^1.6.0", + "eslint": "^4.19.1", "eslint-config-airbnb": "^16.1.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.2", - "eslint-plugin-react": "^7.12.3", + "eslint-plugin-react": "^7.12.4", "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^2.0.0", + "jest": "^23.6.0", "node-sass": "^4.11.0", "nodemon": "^1.18.9", "postcss-cssnext": "^2.11.0", - "jest": "^23.6.0", "postcss-focus": "^1.0.0", "postcss-loader": "^0.9.1", "postcss-reporter": "^1.4.1", + "react-test-renderer": "^16.6.0", "rimraf": "^2.6.3", "sass-loader": "^6.0.7", "style-loader": "^0.13.2", "webpack-manifest-plugin": "^2.0.4", - "react-test-renderer": "^16.6.0", "webpack-node-externals": "^1.7.2" }, "engines": { From 92c4c9a30fd637cc8ada59686bb39e25bbe3f6f6 Mon Sep 17 00:00:00 2001 From: Pranav Tharoor Date: Tue, 26 Mar 2019 23:08:19 +0530 Subject: [PATCH 14/29] Fixes issue with drop-down arrow not being clickable (#982) --- client/components/Nav.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index 8660f2bc..26aeccd0 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -487,8 +487,8 @@ class Nav extends React.PureComponent { onFocus={this.clearHideTimeout} > My Account + -
      +
      +

      Word Wrap

      +
      + this.props.setLinewrap(true)} + aria-label="linewrap on" + name="linewrap" + id="linewrap-on" + className="preference__radio-button" + value="On" + checked={this.props.linewrap} + /> + + this.props.setLinewrap(false)} + aria-label="linewrap off" + name="linewrap" + id="linewrap-off" + className="preference__radio-button" + value="Off" + checked={!this.props.linewrap} + /> + +
      +
      @@ -325,7 +358,9 @@ Preferences.propTypes = { isTabIndent: PropTypes.bool.isRequired, setFontSize: PropTypes.func.isRequired, autosave: PropTypes.bool.isRequired, + linewrap: PropTypes.bool.isRequired, setAutosave: PropTypes.func.isRequired, + setLinewrap: PropTypes.func.isRequired, textOutput: PropTypes.bool.isRequired, gridOutput: PropTypes.bool.isRequired, soundOutput: PropTypes.bool.isRequired, diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index 05163b63..bd8c785e 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -209,7 +209,9 @@ class IDEView extends React.Component { isTabIndent={this.props.preferences.isTabIndent} setFontSize={this.props.setFontSize} autosave={this.props.preferences.autosave} + linewrap={this.props.preferences.linewrap} setAutosave={this.props.setAutosave} + setLinewrap={this.props.setLinewrap} lintWarning={this.props.preferences.lintWarning} setLintWarning={this.props.setLintWarning} textOutput={this.props.preferences.textOutput} @@ -266,6 +268,7 @@ class IDEView extends React.Component { > { }); case ActionTypes.SET_AUTOSAVE: return Object.assign({}, state, { autosave: action.value }); + case ActionTypes.SET_LINEWRAP: + return Object.assign({}, state, { linewrap: action.value }); case ActionTypes.SET_LINT_WARNING: return Object.assign({}, state, { lintWarning: action.value }); case ActionTypes.SET_TEXT_OUTPUT: diff --git a/client/styles/components/_overlay.scss b/client/styles/components/_overlay.scss index 2065a230..8662bc2d 100644 --- a/client/styles/components/_overlay.scss +++ b/client/styles/components/_overlay.scss @@ -22,7 +22,7 @@ display: flex; flex-wrap: wrap; flex-flow: column; - max-height: 80%; + max-height: 88%; max-width: 65%; } diff --git a/server/models/user.js b/server/models/user.js index 168a71ca..ec4037e2 100644 --- a/server/models/user.js +++ b/server/models/user.js @@ -27,6 +27,7 @@ const userSchema = new Schema({ indentationAmount: { type: Number, default: 2 }, isTabIndent: { type: Boolean, default: false }, autosave: { type: Boolean, default: true }, + linewrap: { type: Boolean, default: true }, lintWarning: { type: Boolean, default: false }, textOutput: { type: Boolean, default: false }, gridOutput: { type: Boolean, default: false }, From c1ba5cb072312d9081c9bd80d37133cc40050a48 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 26 Mar 2019 15:51:55 -0400 Subject: [PATCH 16/29] revert overlay max-height --- client/styles/components/_overlay.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/styles/components/_overlay.scss b/client/styles/components/_overlay.scss index 8662bc2d..2065a230 100644 --- a/client/styles/components/_overlay.scss +++ b/client/styles/components/_overlay.scss @@ -22,7 +22,7 @@ display: flex; flex-wrap: wrap; flex-flow: column; - max-height: 88%; + max-height: 80%; max-width: 65%; } From b361902468f42e1b47113b9cf094e41c3731cc57 Mon Sep 17 00:00:00 2001 From: Abhinav sagar Date: Wed, 27 Mar 2019 13:11:11 +0530 Subject: [PATCH 17/29] Improved documentation --- developer_docs/deployment.md | 2 +- developer_docs/installation.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/developer_docs/deployment.md b/developer_docs/deployment.md index fcd708b2..37d85dc5 100644 --- a/developer_docs/deployment.md +++ b/developer_docs/deployment.md @@ -39,7 +39,7 @@ You'll only need to do this if you're testing the production environment locally 8. Since production assumes your environment variables are in the shell environment, and not in a `.env` file, you will have to run `export $(grep -v '^#' .env | xargs)` or a similar command, see this [Stack Overflow answer](https://stackoverflow.com/a/20909045/4086967). 9. `$ npm run start:prod` -NOTE- Windows user should use `copy` in place of `cp` during above installation. +NOTE- Windows users should use `copy` instead of `cp` during installation. ## Self Hosting - Heroku Deployment diff --git a/developer_docs/installation.md b/developer_docs/installation.md index 222bf3de..fbf6a7c4 100644 --- a/developer_docs/installation.md +++ b/developer_docs/installation.md @@ -29,7 +29,7 @@ Follow these instructions to set up your development environment, which you need 11. Install the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) 12. Open and close the Redux DevTools using `ctrl+h`, and move them with `ctrl+w` -NOTE- Windows user should use `copy` in place of `cp` during above installation. +NOTE- Windows users should use `copy` instead of `cp` during installation. ## Docker Installation @@ -59,7 +59,7 @@ If you don't have the full server environment running, you can launch a one-off 10. `$ docker-compose -f docker-compose-development.yml run app --rm bash -l` -NOTE- Windows user should use `copy` in place of `cp` during above installation. +NOTE- Windows users should use `copy` instead of `cp` during installation. ## S3 Bucket Configuration From 9433d188fc6d6135991372aafb474db4b5c149fe Mon Sep 17 00:00:00 2001 From: siddhant <30566406+siddhant1@users.noreply.github.com> Date: Wed, 27 Mar 2019 22:20:55 +0530 Subject: [PATCH 18/29] Added autoOpen items on hover (#900) * AutoOpen Header * removed nav heading * Fixed #908 * Fixed Styles * Fixed styles * Refactor editor * Issues Fixed * keyup -> keyown --- client/components/Nav.jsx | 79 +++++++++---------- client/styles/components/_nav.scss | 120 ++++++++++++++++++----------- 2 files changed, 115 insertions(+), 84 deletions(-) diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index 26aeccd0..e1203f62 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -28,14 +28,16 @@ class Nav extends React.PureComponent { this.clearHideTimeout = this.clearHideTimeout.bind(this); this.handleClick = this.handleClick.bind(this); this.handleClickOutside = this.handleClickOutside.bind(this); + this.closeDropDown = this.closeDropDown.bind(this); } - componentWillMount() { + componentDidMount() { document.addEventListener('mousedown', this.handleClick, false); + document.addEventListener('keydown', this.closeDropDown, false); } - componentWillUnmount() { document.removeEventListener('mousedown', this.handleClick, false); + document.removeEventListener('keydown', this.closeDropDown, false); } setDropdown(dropdown) { @@ -44,8 +46,17 @@ class Nav extends React.PureComponent { }); } + closeDropDown(e) { + if (e.keyCode === 27) { + this.setDropdown('none'); + } + } + handleClick(e) { - if (this.node.contains(e.target)) { + if (!this.node) { + return; + } + if (this.node && this.node.contains(e.target)) { return; } @@ -124,18 +135,16 @@ class Nav extends React.PureComponent { onClick={this.toggleDropdown.bind(this, 'file')} onBlur={this.handleBlur} onFocus={this.clearHideTimeout} + onMouseOver={() => { + if (this.state.dropdownOpen !== 'none') { + this.setDropdown('file'); + } + }} > File
        -
      • -
          - +
            • -
              • -
                • -
                • Date: Wed, 27 Mar 2019 22:58:14 +0530 Subject: [PATCH 19/29] Update package.json --- package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2165647d..55a48ac8 100644 --- a/package.json +++ b/package.json @@ -49,27 +49,27 @@ "chunk-manifest-webpack-plugin": "github:catarak/chunk-manifest-webpack-plugin", "css-loader": "^0.23.1", "cssnano": "^3.10.0", + "eslint": "^4.19.1", "enzyme": "^3.7.0", "enzyme-adapter-react-16": "^1.6.0", - "eslint": "^4.19.1", "eslint-config-airbnb": "^16.1.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.2", - "eslint-plugin-react": "^7.12.4", + "eslint-plugin-react": "^7.12.3", "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^2.0.0", - "jest": "^23.6.0", "node-sass": "^4.11.0", "nodemon": "^1.18.9", "postcss-cssnext": "^2.11.0", + "jest": "^23.6.0", "postcss-focus": "^1.0.0", "postcss-loader": "^0.9.1", "postcss-reporter": "^1.4.1", - "react-test-renderer": "^16.6.0", "rimraf": "^2.6.3", "sass-loader": "^6.0.7", "style-loader": "^0.13.2", "webpack-manifest-plugin": "^2.0.4", + "react-test-renderer": "^16.6.0", "webpack-node-externals": "^1.7.2" }, "engines": { @@ -158,3 +158,4 @@ "xhr": "^2.5.0" } } + From caef7b278f610d1a06f89babbf99c5f6e9b19bdc Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Wed, 27 Mar 2019 23:02:02 +0530 Subject: [PATCH 20/29] Update package-lock.json --- package-lock.json | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5e5de221..e23af10d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5099,13 +5099,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5118,18 +5116,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -5232,8 +5227,7 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -5243,7 +5237,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5256,20 +5249,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.3.5", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5286,7 +5276,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -5359,8 +5348,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -5370,7 +5358,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -5476,7 +5463,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", From 2e0788d22f6528ff79b0f066c0434db324c97b31 Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Wed, 27 Mar 2019 23:03:00 +0530 Subject: [PATCH 21/29] Update package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 55a48ac8..8dc0e8e4 100644 --- a/package.json +++ b/package.json @@ -158,4 +158,3 @@ "xhr": "^2.5.0" } } - From 3bf3fe1452291d18269b5136053d2170d87661fc Mon Sep 17 00:00:00 2001 From: Marton Soos Date: Wed, 27 Mar 2019 20:52:57 +0100 Subject: [PATCH 22/29] Fix multiple file options showing up (#987) (#988) * Fix multiple file options showing up (#987) This change ensures that the file options composite widget is hidden if and only if none of its components is in focus. This is achieved by having a variable keep track of the state of the composite widget (in focus / not in focus). * Fix #987 Modified fix for #987 according to the requested changes. Moved isFocused to the components state and created a method for hadling the function calls executed in onBlur. * Fix #987 - final touches Renamed method blurComponent to onBlurComponent. Moved duplicated code from onFocus callback to a new method called onFocusComponent. --- client/modules/IDE/components/FileNode.jsx | 30 +++++++++++++++++++--- client/modules/IDE/components/Sidebar.jsx | 26 ++++++++++++++++++- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/client/modules/IDE/components/FileNode.jsx b/client/modules/IDE/components/FileNode.jsx index 4fbc6ca1..a749eb9c 100644 --- a/client/modules/IDE/components/FileNode.jsx +++ b/client/modules/IDE/components/FileNode.jsx @@ -24,13 +24,29 @@ export class FileNode extends React.Component { this.hideFileOptions = this.hideFileOptions.bind(this); this.showEditFileName = this.showEditFileName.bind(this); this.hideEditFileName = this.hideEditFileName.bind(this); + this.onBlurComponent = this.onBlurComponent.bind(this); + this.onFocusComponent = this.onFocusComponent.bind(this); this.state = { isOptionsOpen: false, isEditingName: false, + isFocused: false, }; } + onFocusComponent() { + this.setState({ isFocused: true }); + } + + onBlurComponent() { + this.setState({ isFocused: false }); + setTimeout(() => { + if (!this.state.isFocused) { + this.hideFileOptions(); + } + }, 200); + } + handleFileClick(e) { e.stopPropagation(); if (this.props.name !== 'root' && !this.isDeleting) { @@ -105,6 +121,7 @@ export class FileNode extends React.Component { 'sidebar__file-item--editing': this.state.isEditingName, 'sidebar__file-item--closed': this.props.isFolderClosed }); + return (
                  {(() => { // eslint-disable-line @@ -156,6 +173,8 @@ export class FileNode extends React.Component { ref={(element) => { this[`fileOptions-${this.props.id}`] = element; }} tabIndex="0" onClick={this.toggleFileOptions} + onBlur={this.onBlurComponent} + onFocus={this.onFocusComponent} > @@ -171,6 +190,8 @@ export class FileNode extends React.Component { this.props.newFile(); setTimeout(() => this.hideFileOptions(), 0); }} + onBlur={this.onBlurComponent} + onFocus={this.onFocusComponent} className="sidebar__file-item-option" > Add File @@ -189,6 +210,8 @@ export class FileNode extends React.Component { this.props.newFolder(); setTimeout(() => this.hideFileOptions(), 0); }} + onBlur={this.onBlurComponent} + onFocus={this.onFocusComponent} className="sidebar__file-item-option" > Add Folder @@ -205,6 +228,8 @@ export class FileNode extends React.Component { setTimeout(() => this.fileNameInput.focus(), 0); setTimeout(() => this.hideFileOptions(), 0); }} + onBlur={this.onBlurComponent} + onFocus={this.onFocusComponent} className="sidebar__file-item-option" > Rename @@ -219,9 +244,8 @@ export class FileNode extends React.Component { setTimeout(() => this.props.deleteFile(this.props.id, this.props.parentId), 100); } }} - onBlur={() => { - setTimeout(this.hideFileOptions, 200); - }} + onBlur={this.onBlurComponent} + onFocus={this.onFocusComponent} className="sidebar__file-item-option" > Delete diff --git a/client/modules/IDE/components/Sidebar.jsx b/client/modules/IDE/components/Sidebar.jsx index b1fc82ea..c7f825dc 100644 --- a/client/modules/IDE/components/Sidebar.jsx +++ b/client/modules/IDE/components/Sidebar.jsx @@ -12,6 +12,25 @@ class Sidebar extends React.Component { super(props); this.resetSelectedFile = this.resetSelectedFile.bind(this); this.toggleProjectOptions = this.toggleProjectOptions.bind(this); + this.onBlurComponent = this.onBlurComponent.bind(this); + this.onFocusComponent = this.onFocusComponent.bind(this); + + this.state = { + isFocused: false, + }; + } + + onBlurComponent() { + this.setState({ isFocused: false }); + setTimeout(() => { + if (!this.state.isFocused) { + this.props.closeProjectOptions(); + } + }, 200); + } + + onFocusComponent() { + this.setState({ isFocused: true }); } resetSelectedFile() { @@ -65,6 +84,8 @@ class Sidebar extends React.Component { tabIndex="0" ref={(element) => { this.sidebarOptions = element; }} onClick={this.toggleProjectOptions} + onBlur={this.onBlurComponent} + onFocus={this.onFocusComponent} > @@ -76,6 +97,8 @@ class Sidebar extends React.Component { this.props.newFolder(); setTimeout(this.props.closeProjectOptions, 0); }} + onBlur={this.onBlurComponent} + onFocus={this.onFocusComponent} > Add folder @@ -87,7 +110,8 @@ class Sidebar extends React.Component { this.props.newFile(); setTimeout(this.props.closeProjectOptions, 0); }} - onBlur={() => { setTimeout(this.props.closeProjectOptions, 200); }} + onBlur={this.onBlurComponent} + onFocus={this.onFocusComponent} > Add file From 5bb345b95517781a1d140e4d7cb760961f6b5c03 Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Thu, 28 Mar 2019 11:06:32 +0530 Subject: [PATCH 23/29] Update deployment.md --- developer_docs/deployment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer_docs/deployment.md b/developer_docs/deployment.md index 37d85dc5..55369d9b 100644 --- a/developer_docs/deployment.md +++ b/developer_docs/deployment.md @@ -29,6 +29,8 @@ These are the steps that happen when you deploy the application. You'll only need to do this if you're testing the production environment locally. +Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` in place of `cp`. + 1. Clone this repository and `cd` into it 2. `$ npm install` 3. Install MongoDB and make sure it is running @@ -39,8 +41,6 @@ You'll only need to do this if you're testing the production environment locally 8. Since production assumes your environment variables are in the shell environment, and not in a `.env` file, you will have to run `export $(grep -v '^#' .env | xargs)` or a similar command, see this [Stack Overflow answer](https://stackoverflow.com/a/20909045/4086967). 9. `$ npm run start:prod` -NOTE- Windows users should use `copy` instead of `cp` during installation. - ## Self Hosting - Heroku Deployment If you are interested in hosting and deploying your own p5.js Web Editor instance, you can! It would be the same as the official editor instance at editor.p5js.org, except with a different domain, and you would be in charge of the maintenance. We recommend using Heroku as you can host it for free. From 49897cab168f5aa24a7e5c6a58253d8c2ef031d2 Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Thu, 28 Mar 2019 11:08:36 +0530 Subject: [PATCH 24/29] Update installation.md --- developer_docs/installation.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/developer_docs/installation.md b/developer_docs/installation.md index fbf6a7c4..b20dbcee 100644 --- a/developer_docs/installation.md +++ b/developer_docs/installation.md @@ -4,6 +4,8 @@ Follow these instructions to set up your development environment, which you need ## Manual Installation +Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` instead of `cp`. + 1. Install [node.js](http://nodejs.org/), which also automatically installs the [npm](https://www.npmjs.org) package manager. 2. [Fork](https://help.github.com/articles/fork-a-repo) the [p5.js Web Editor repository](https://github.com/processing/p5.js-web-editor) into your own GitHub account. 3. [Clone](https://help.github.com/articles/cloning-a-repository/) your new fork of the repository from GitHub onto your local computer. @@ -29,10 +31,10 @@ Follow these instructions to set up your development environment, which you need 11. Install the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) 12. Open and close the Redux DevTools using `ctrl+h`, and move them with `ctrl+w` -NOTE- Windows users should use `copy` instead of `cp` during installation. - ## Docker Installation +Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` instead of `cp`. + Using Docker, you can have a complete, consistent development environment without having to manually install dependencies such as Node, Mongo, etc. It also helps isolate these dependencies and their data from other projects that you may have on the same computer that use different/conflicting versions, etc. Note that this takes up a significant amount of space on your machine. Make sure you have at least 5GB free. @@ -59,8 +61,6 @@ If you don't have the full server environment running, you can launch a one-off 10. `$ docker-compose -f docker-compose-development.yml run app --rm bash -l` -NOTE- Windows users should use `copy` instead of `cp` during installation. - ## S3 Bucket Configuration Note that this is optional, unless you are working on the part of the application that allows a user to upload images, videos, etc. Please refer to the folllowing [gist](https://gist.github.com/catarak/70c9301f0fd1ac2d6b58de03f61997e3) to set up an S3 bucket to be used with this project. From c4245d64afa9e90e8381f14005b88c2f6eb30bd3 Mon Sep 17 00:00:00 2001 From: Abhinav Sagar <40603139+abhinavsagar@users.noreply.github.com> Date: Thu, 28 Mar 2019 11:08:56 +0530 Subject: [PATCH 25/29] Update deployment.md --- developer_docs/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_docs/deployment.md b/developer_docs/deployment.md index 55369d9b..cbf72b91 100644 --- a/developer_docs/deployment.md +++ b/developer_docs/deployment.md @@ -29,7 +29,7 @@ These are the steps that happen when you deploy the application. You'll only need to do this if you're testing the production environment locally. -Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` in place of `cp`. +Note: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` instead of `cp`. 1. Clone this repository and `cd` into it 2. `$ npm install` From 391a92a1fdc797b0dea44317aaed5057437f75cd Mon Sep 17 00:00:00 2001 From: Apoorv Taneja Date: Thu, 28 Mar 2019 23:51:43 +0530 Subject: [PATCH 26/29] Logo color changes with theme. Fix #916 (#997) * color changes with theme * color changes with theme * color changes with theme * color changes with theme --- client/components/Nav.jsx | 2 +- client/styles/components/_nav.scss | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index e1203f62..31f80bef 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -128,7 +128,7 @@ class Nav extends React.PureComponent {