Merge branch 'master' into feature/public-api

This commit is contained in:
Cassie Tarakajian 2020-02-04 18:04:00 -05:00
commit 01665fde54
5 changed files with 50 additions and 25 deletions

View file

@ -1,16 +1,15 @@
# Contributing to the p5.js Web Editor # 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**. 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**.
Here are links to all the sections in this document:
<!-- If you change any of the headings in this document, remember to update the table of contents. -->
## Table of Contents
- [Contributing to the p5.js Web Editor](#contributing-to-the-p5js-web-editor) - [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) - [Code of Conduct](#code-of-conduct)
- [How Can I Contribute?](#how-can-i-contribute) - [How Can I Contribute?](#how-can-i-contribute)
- [First Timers](#first-timers) - [First Steps](#first-steps)
- [Milestones](#milestones) - [Good First Issues](#good-first-issues)
- [Project Board](#project-board)
- [Project Ideas](#project-ideas) - [Project Ideas](#project-ideas)
- [Issue Search and Tagging](#issue-search-and-tagging) - [Issue Search and Tagging](#issue-search-and-tagging)
- [Beginning Work](#beginning-work) - [Beginning Work](#beginning-work)
@ -20,15 +19,30 @@ Here are links to all the sections in this document:
## Code of Conduct ## 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? ## 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 ### First Steps
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. 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 ### Good First Issues
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. 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 ### 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. 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 ### 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. 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.

View file

@ -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. 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 ## 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: 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.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.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) * p5.js website: [https://github.com/processing/p5.js-website/issues](https://github.com/processing/p5.js-website/issues)
## Get Involved ## Acknowledgements
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
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/). 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/).

View file

@ -269,8 +269,8 @@ class Editor extends React.Component {
indent_size: INDENTATION_AMOUNT, indent_size: INDENTATION_AMOUNT,
indent_with_tabs: IS_TAB_INDENT indent_with_tabs: IS_TAB_INDENT
}; };
const mode = this._cm.getOption('mode'); const mode = this._cm.getOption('mode');
const currentPosition = this._cm.doc.getCursor();
if (mode === 'javascript') { if (mode === 'javascript') {
this._cm.doc.setValue(beautifyJS(this._cm.doc.getValue(), beautifyOptions)); this._cm.doc.setValue(beautifyJS(this._cm.doc.getValue(), beautifyOptions));
} else if (mode === 'css') { } else if (mode === 'css') {
@ -278,6 +278,10 @@ class Editor extends React.Component {
} else if (mode === 'htmlmixed') { } else if (mode === 'htmlmixed') {
this._cm.doc.setValue(beautifyHTML(this._cm.doc.getValue(), beautifyOptions)); this._cm.doc.setValue(beautifyHTML(this._cm.doc.getValue(), beautifyOptions));
} }
setTimeout(() => {
this._cm.focus();
this._cm.doc.setCursor({ line: currentPosition.line, ch: currentPosition.ch + INDENTATION_AMOUNT });
}, 0);
} }
initializeDocuments(files) { initializeDocuments(files) {

View file

@ -1,6 +1,7 @@
This folder contains documents intended for developers of the p5.js Web Editor. This folder contains documents intended for developers of the p5.js Web Editor.
## List of Documents ## List of Documents
* [Getting Started](getting_started.md) - A place to get started!
* [Installation](installation.md) - A guide for setting up your development environment * [Installation](installation.md) - A guide for setting up your development environment
* [Development](development.md) - A guide for adding code to the web editor * [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 * [Preparing a pull-request](preparing_a_pull_request.md) - Instructions for how to make a pull-request

View file

@ -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`. _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. 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.