From 5abb3a5586b02783524c5241d967fdbd884ae8d5 Mon Sep 17 00:00:00 2001 From: ashu8912 Date: Wed, 15 Jan 2020 17:50:00 +0530 Subject: [PATCH 1/7] fixed cursor position on tidy --- client/modules/IDE/components/Editor.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index b8e81650..ac10e8e5 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -271,6 +271,7 @@ class Editor extends React.Component { }; const mode = this._cm.getOption('mode'); + const currentPosition = this._cm.doc.getCursor(); if (mode === 'javascript') { this._cm.doc.setValue(beautifyJS(this._cm.doc.getValue(), beautifyOptions)); } else if (mode === 'css') { @@ -278,6 +279,7 @@ class Editor extends React.Component { } else if (mode === 'htmlmixed') { this._cm.doc.setValue(beautifyHTML(this._cm.doc.getValue(), beautifyOptions)); } + this._cm.doc.setCursor({ line: currentPosition.line, ch: currentPosition.ch }); } initializeDocuments(files) { From 08f1c52f969f996d19d2ea590a5dbf12b3b10528 Mon Sep 17 00:00:00 2001 From: ashu8912 Date: Sat, 25 Jan 2020 18:30:17 +0530 Subject: [PATCH 2/7] Fixed Indentation on setCursor --- 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 ac10e8e5..946bb83c 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -269,17 +269,21 @@ class Editor extends React.Component { indent_size: INDENTATION_AMOUNT, indent_with_tabs: IS_TAB_INDENT }; - + console.log('inside'); const mode = this._cm.getOption('mode'); const currentPosition = this._cm.doc.getCursor(); if (mode === 'javascript') { this._cm.doc.setValue(beautifyJS(this._cm.doc.getValue(), beautifyOptions)); + console.log('beautifying'); } else if (mode === 'css') { this._cm.doc.setValue(beautifyCSS(this._cm.doc.getValue(), beautifyOptions)); } else if (mode === 'htmlmixed') { this._cm.doc.setValue(beautifyHTML(this._cm.doc.getValue(), beautifyOptions)); } - this._cm.doc.setCursor({ line: currentPosition.line, ch: currentPosition.ch }); + setImmediate(() => { + this._cm.focus(); + this._cm.doc.setCursor({ line: currentPosition.line, ch: currentPosition.ch + INDENTATION_AMOUNT }); + }); } initializeDocuments(files) { From 5937af22f365f83f6122c46a7ceb407de4ed10e8 Mon Sep 17 00:00:00 2001 From: ashu8912 Date: Sun, 26 Jan 2020 02:55:07 +0530 Subject: [PATCH 3/7] changed setImmediate with setTimeout --- client/modules/IDE/components/Editor.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 946bb83c..762409e7 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -280,10 +280,10 @@ class Editor extends React.Component { } else if (mode === 'htmlmixed') { this._cm.doc.setValue(beautifyHTML(this._cm.doc.getValue(), beautifyOptions)); } - setImmediate(() => { + setTimeout(() => { this._cm.focus(); this._cm.doc.setCursor({ line: currentPosition.line, ch: currentPosition.ch + INDENTATION_AMOUNT }); - }); + }, 0); } initializeDocuments(files) { From 8545a3b7ce8f187c396d32666f21362f304168a4 Mon Sep 17 00:00:00 2001 From: ashu8912 Date: Sun, 26 Jan 2020 12:47:37 +0530 Subject: [PATCH 4/7] removed console.log --- client/modules/IDE/components/Editor.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 762409e7..ac353ab7 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -269,7 +269,6 @@ class Editor extends React.Component { indent_size: INDENTATION_AMOUNT, indent_with_tabs: IS_TAB_INDENT }; - console.log('inside'); const mode = this._cm.getOption('mode'); const currentPosition = this._cm.doc.getCursor(); if (mode === 'javascript') { From 5891b3b77ab98fe70297a91f1d1a2ea8a160337f Mon Sep 17 00:00:00 2001 From: ashu8912 Date: Wed, 29 Jan 2020 16:12:08 +0530 Subject: [PATCH 5/7] removed console.log --- client/modules/IDE/components/Editor.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index ac353ab7..95f9ba9b 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -273,7 +273,6 @@ class Editor extends React.Component { const currentPosition = this._cm.doc.getCursor(); if (mode === 'javascript') { this._cm.doc.setValue(beautifyJS(this._cm.doc.getValue(), beautifyOptions)); - console.log('beautifying'); } else if (mode === 'css') { this._cm.doc.setValue(beautifyCSS(this._cm.doc.getValue(), beautifyOptions)); } else if (mode === 'htmlmixed') { From 58a1ac9005fb4dcb1bdda37764513aae36b34d5e Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 4 Feb 2020 17:05:48 -0500 Subject: [PATCH 6/7] Update main README and Contribution docs --- .github/CONTRIBUTING.md | 40 +++++++++++++++++++++++++++------------- README.md | 26 ++++++++++++++++---------- developer_docs/README.md | 1 + 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0fab27f8..0d0d0b0a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,16 +1,15 @@ # Contributing to the p5.js Web Editor -Hello! We welcome community contributions to the p5.js Web Editor. Contributing takes many forms and doesn't have to be **writing code**, it can be **report bugs**, **proposing new features**, **creating UI/UX designs**, and **updating documentation**. - -Here are links to all the sections in this document: - - +Hello! We welcome community contributions to the p5.js Web Editor. Contributing takes many forms and doesn't have to be **writing code**, it can be **reporting bugs**, **proposing new features**, **creating UI/UX designs**, and **updating documentation**. +## Table of Contents - [Contributing to the p5.js Web Editor](#contributing-to-the-p5js-web-editor) + - [Table of Contents](#table-of-contents) - [Code of Conduct](#code-of-conduct) - [How Can I Contribute?](#how-can-i-contribute) - - [First Timers](#first-timers) - - [Milestones](#milestones) + - [First Steps](#first-steps) + - [Good First Issues](#good-first-issues) + - [Project Board](#project-board) - [Project Ideas](#project-ideas) - [Issue Search and Tagging](#issue-search-and-tagging) - [Beginning Work](#beginning-work) @@ -20,15 +19,30 @@ Here are links to all the sections in this document: ## Code of Conduct -Please follow the guidelines mentioned at [CODE OF CONDUCT.md](https://github.com/processing/p5.js-web-editor/blob/master/.github/CODE_OF_CONDUCT.md). +Please follow the guidelines in the [Code of Conduct](https://github.com/processing/p5.js-web-editor/blob/master/.github/CODE_OF_CONDUCT.md). ## How Can I Contribute? +If you're new to open source, [read about how to contribute to open source](https://opensource.guide/how-to-contribute/). -### First Timers -For first-time contributors or those who want to start with a small task: [check out our list of good first bugs](https://github.com/processing/p5.js-web-editor/labels/good%20first%20issue). First read the github discussion on that issue and find out if there's currently a person working on that or not. If no one is working on it or if there has was one claimed to but has not been active for a while, ask if it is up for grabs. It's okay to not know how to fix an issue and feel free to ask questions about to approach the problem! We are all just here to learn and make something awesome. Someone from the community would help you out and these are great issues for learning about the web editor, its file structure and its development process. +### First Steps +Don't know where to begin? Here are some suggestions to get started: +* Think about what you're hoping to learn by working on open source. The web editor is a full-stack web application, therefore there's tons of different areas to focus on: + - UI/UX design + - Project management: Organizing tickets, pull requests, tasks + - Front end: React/Redux, CSS/Sass, CodeMirror + - Back end: Node, Express, MongoDB, Jest, AWS + - DevOps: Travis CI, Jest, Docker, Kubernetes, AWS +* Use the [p5.js Web Editor](https://editor.p5js.org)! Find a bug? Think of something you think would add to the project? Open an issue. +* Expand an existing issue. Sometimes issues are missing steps to reproduce, or need suggestions for potential solutions. Sometimes they need another voice saying, "this is really important!" +* Try getting the project running locally on your computer by following the [installation steps](./../developer_docs/installation.md). +* Look through the documentation in the [developer docs](../developer_docs/). Is there anything that could be expanded? Is there anything missing? +* Look at the [development guide](./../developer_docs/development.md). -### Milestones -A good place to check for tickets to work on is [milestones](https://github.com/processing/p5.js-web-editor/milestones), as miletones have a due date, and will give you a sense of tickets the tickets that maintainers would like to be completed sooner rather than later. +### Good First Issues +For first-time contributors or those who want to start with a small task, [check out the list of good first issues](https://github.com/processing/p5.js-web-editor/labels/good%20first%20issue). If the issue has not been assigned to anyone, then you can work on it! It's okay to not know how to fix an issue, and feel free to ask questions about to approach the problem! We are all here to learn and make something awesome. Someone from the community would help you out and these are great issues for learning about the web editor, its file structure and its development process. + +### Project Board +Many issues are related to each other and fall under bigger projects. To get a bigger picture, look at the [All Projects](https://github.com/processing/p5.js-web-editor/projects/4) board. ### Project Ideas If you're looking for inspiration for Google Summer of Code or a bigger project, there's a [project list](https://github.com/processing/processing/wiki/Project-List#p5js-web-editor) maintained on the Processing wiki. @@ -40,7 +54,7 @@ If you feel like an issue is tagged incorrectly (e.g. it's low priority and you ### Beginning Work -If you'd like to work on an issue, please comment on it to let the maintainers know. If someone else has already commented and taken up that issue, please refrain from working on it and submitting a PR without asking the maintainers as it leads to unnecessary duplication of effort. +If you'd like to work on an issue, please comment on it to let the maintainers know, so that they can assign it to you. If someone else has already commented and taken up that issue, please refrain from working on it and submitting a PR without asking the maintainers as it leads to unnecessary duplication of effort. Then, follow the [installation guide](https://github.com/processing/p5.js-web-editor/blob/master/developer_docs/installation.md) to get the project building and working on your computer. diff --git a/README.md b/README.md index 3eb1e492..63efbb8d 100644 --- a/README.md +++ b/README.md @@ -4,26 +4,32 @@ The p5.js Web Editor is a platform for creative coding, with a focus on making c We also strive to give the community as much ownership and control as possible. You can download your sketches so that you can edit them locally or host them elsewhere. You can also host your own version of the editor, giving you control over its data. -The p5.js Web Editor is currently in active development, and looking for contributions of any type! Please check out the [contribution guide](https://github.com/processing/p5.js-web-editor/blob/master/.github/CONTRIBUTING.md) for more details. +## Community -If you have found a bug in the p5.js Web Editor, you can file it under the ["issues" tab](https://github.com/processing/p5.js-web-editor/issues). +New to the p5.js community? Read our [community statement](https://p5js.org/community/). + +## Code of Conduct + +All contributors to the p5.js Web Editor are expected to follow the [Code of Conduct](./.github/CODE_OF_CONDUCT.md). We strive to create a friendly and safe community! + +## Get Involved + +The p5.js Web Editor is a collaborative project created by many individuals, and you are invited to help. All types of involvement are welcome! Please check out the [contribution guide](./.github/CONTRIBUTING.md) for more details. + +Developers, check the [developer docs](https://github.com/processing/p5.js-web-editor/blob/master/developer_docs/) details about contributing code, bug fixes, and documentation. To start writing code, a great place to start is the [development guide](https://github.com/processing/p5.js-web-editor/blob/master/developer_docs/development.md). ## Issues +If you have found a bug in the p5.js Web Editor, you can file it under the ["issues" tab](https://github.com/processing/p5.js-web-editor/issues). + Please post bugs and feature requests in the correct repository: -* p5.js general and p5.dom: [https://github.com/processing/p5.js/issues](https://github.com/processing/p5.js/issues) +* p5.js library and p5.dom: [https://github.com/processing/p5.js/issues](https://github.com/processing/p5.js/issues) * p5.accessibility: [https://github.com/processing/p5.accessibility/issues](https://github.com/processing/p5.accessibility/issues) * p5.sound: [https://github.com/processing/p5.js-sound/issues](https://github.com/processing/p5.js-sound/issues) * p5.js website: [https://github.com/processing/p5.js-website/issues](https://github.com/processing/p5.js-website/issues) -## Get Involved - -The p5.js Web Editor is a collaborative project created by many individuals, and you are invited to help. All types of involvement are welcome. You can start with the [p5.js community section](https://p5js.org/community), which also applies to this project. - -Developers, check the [developer docs](https://github.com/processing/p5.js-web-editor/blob/master/developer_docs/) details about contributing code, bug fixes, and documentation. To start writing code, a great place to start is the [development guide](https://github.com/processing/p5.js-web-editor/blob/master/developer_docs/development.md). - -## Support +## Acknowledgements Support for this project has come from [Processing Foundation](https://processingfoundation.org/), [NYU ITP](https://tisch.nyu.edu/itp), and [CS4All, NYC DOE](http://cs4all.nyc/). diff --git a/developer_docs/README.md b/developer_docs/README.md index 3586d5cb..e4cf46d7 100644 --- a/developer_docs/README.md +++ b/developer_docs/README.md @@ -1,6 +1,7 @@ This folder contains documents intended for developers of the p5.js Web Editor. ## List of Documents +* [Getting Started](getting_started.md) - A place to get started! * [Installation](installation.md) - A guide for setting up your development environment * [Development](development.md) - A guide for adding code to the web editor * [Preparing a pull-request](preparing_a_pull_request.md) - Instructions for how to make a pull-request From 58bdf901401f1e7ecaa370534064ca565ccd7baf Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 4 Feb 2020 17:12:05 -0500 Subject: [PATCH 7/7] Update Node version in installation docs --- developer_docs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_docs/installation.md b/developer_docs/installation.md index 26c477fb..88dd7c23 100644 --- a/developer_docs/installation.md +++ b/developer_docs/installation.md @@ -6,7 +6,7 @@ Follow these instructions to set up your development environment, which you need _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](https://nodejs.org/download/release/v10.15.0/) version 10.15.0 which also automatically installs the [npm](https://www.npmjs.org) package manager. +1. Install [node.js](https://nodejs.org/download/release/v11.15.0/) version 11.15.0 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.