Skip to content

Commit f3157e8

Browse files
authored
Merge branch 'develop' into docs-translation-backup
2 parents 7d0b77e + 34dd97a commit f3157e8

File tree

393 files changed

+109095
-23353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+109095
-23353
lines changed

.babelrc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"env": {
77
"production": {
88
"plugins": [
9+
"babel-plugin-styled-components",
910
"transform-react-remove-prop-types",
1011
"@babel/plugin-transform-react-constant-elements",
1112
"@babel/plugin-transform-react-inline-elements",
@@ -39,7 +40,8 @@
3940
],
4041
"@babel/plugin-proposal-nullish-coalescing-operator",
4142
"@babel/plugin-proposal-do-expressions",
42-
"@babel/plugin-proposal-function-bind"
43+
"@babel/plugin-proposal-function-bind",
44+
["@babel/plugin-proposal-private-methods", { "loose": true }]
4345
],
4446
"presets": [
4547
"@babel/preset-env",
@@ -48,6 +50,7 @@
4850
},
4951
"development": {
5052
"plugins": [
53+
"babel-plugin-styled-components",
5154
"react-hot-loader/babel"
5255
]
5356
}
@@ -83,6 +86,8 @@
8386
],
8487
"@babel/plugin-proposal-nullish-coalescing-operator",
8588
"@babel/plugin-proposal-do-expressions",
86-
"@babel/plugin-proposal-function-bind"
89+
"@babel/plugin-proposal-function-bind",
90+
["@babel/plugin-proposal-private-methods", { "loose": true }],
91+
["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
8792
]
8893
}

.env.example

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,32 @@ API_URL=/editor
22
AWS_ACCESS_KEY=<your-aws-access-key>
33
AWS_REGION=<your-aws-region>
44
AWS_SECRET_KEY=<your-aws-secret-key>
5+
CORS_ALLOW_LOCALHOST=true
56
EMAIL_SENDER=<transactional-email-sender>
67
EMAIL_VERIFY_SECRET_TOKEN=whatever_you_want_this_to_be_it_only_matters_for_production
78
EXAMPLE_USER_EMAIL=[email protected]
89
EXAMPLE_USER_PASSWORD=hellop5js
910
GG_EXAMPLES_USERNAME=generativedesign
1011
GG_EXAMPLES_EMAIL=[email protected]
1112
GG_EXAMPLES_PASS=generativedesign
12-
ML5_EXAMPLES_USERNAME=ml5
13-
ML5_EXAMPLES_EMAIL=[email protected]
14-
ML5_EXAMPLES_PASS=helloml5
1513
GITHUB_ID=<your-github-client-id>
1614
GITHUB_SECRET=<your-github-client-secret>
1715
GOOGLE_ID=<your-google-client-id> (use google+ api)
1816
GOOGLE_SECRET=<your-google-client-secret> (use google+ api)
1917
MAILGUN_DOMAIN=<your-mailgun-domain>
2018
MAILGUN_KEY=<your-mailgun-api-key>
19+
ML5_LIBRARY_USERNAME=ml5
20+
ML5_LIBRARY_EMAIL=[email protected]
21+
ML5_LIBRARY_PASS=helloml5
22+
MOBILE_ENABLED=true
2123
MONGO_URL=mongodb://localhost:27017/p5js-web-editor
2224
PORT=8000
25+
PREVIEW_PORT=8002
26+
EDITOR_URL=http://localhost:8000
27+
PREVIEW_URL=http://localhost:8002
2328
S3_BUCKET=<your-s3-bucket>
2429
S3_BUCKET_URL_BASE=<alt-for-s3-url>
2530
SESSION_SECRET=whatever_you_want_this_to_be_it_only_matters_for_production
31+
TRANSLATIONS_ENABLED=true
2632
UI_ACCESS_TOKEN_ENABLED=false
2733
UPLOAD_LIMIT=250000000

.eslintrc

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"extends": "airbnb",
3-
"parser": "babel-eslint",
2+
"extends": ["airbnb", "prettier"],
3+
"parser": "@babel/eslint-parser",
44
"env": {
55
"browser": true,
66
"node": true,
@@ -16,12 +16,12 @@
1616
"import/no-unresolved": 0,
1717
"import/no-named-as-default": 2,
1818
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
19-
"indent": [2, 2, {"SwitchCase": 1}],
19+
"indent": 0,
2020
"no-console": 0,
2121
"no-alert": 0,
2222
"no-underscore-dangle": 0,
2323
"max-len": [1, 120, 2, {"ignoreComments": true, "ignoreTemplateLiterals": true}],
24-
"quote-props": [1, "consistent-as-needed"],
24+
"quote-props": [1, "as-needed"],
2525
"no-unused-vars": [1, {"vars": "local", "args": "none"}],
2626
"consistent-return": ["error", { "treatUndefinedAsUnspecified": true }],
2727
"no-param-reassign": [2, { "props": false }],
@@ -60,13 +60,16 @@
6060
},
6161
"allowChildren": false
6262
}
63+
],
64+
"prettier/prettier": [
65+
"error"
6366
]
6467
},
6568
"plugins": [
66-
"react", "jsx-a11y", "import"
69+
"react", "jsx-a11y", "import", "prettier"
6770
],
6871
"settings": {
69-
"import/parser": "babel-eslint",
72+
"import/parser": "@babel/eslint-parser",
7073
"import/resolve": {
7174
"moduleDirectory": ["node_modules"]
7275
}
@@ -77,5 +80,13 @@
7780
"__SERVER__": true,
7881
"__DISABLE_SSR__": true,
7982
"__DEVTOOLS__": true
80-
}
83+
},
84+
"overrides": [
85+
{
86+
"files": ["*.stories.jsx"],
87+
"rules": {
88+
"import/no-extraneous-dependencies": "off"
89+
}
90+
}
91+
]
8192
}

.github/CODE_OF_CONDUCT.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,51 @@
1-
# p5.js Code of Conduct
1+
## [p5.js community statement](http://p5js.org/community/)
2+
3+
p5.js is a community interested in exploring the creation of art and design with technology.
4+
5+
We are a community of, and in solidarity with, people from every gender identity and expression, sexual orientation, race, ethnicity, language, neuro-type, size, disability, class, religion, culture, subculture, political opinion, age, skill level, occupation, and background. We acknowledge that not everyone has the time, financial means, or capacity to actively participate, but we recognize and encourage involvement of all kinds. We facilitate and foster access and empowerment. We are all learners.
6+
7+
We like these hashtags: #noCodeSnobs (because we value community over efficiency), #newKidLove (because we all started somewhere), #unassumeCore (because we don't assume knowledge), and #BlackLivesMatter (because of course).
8+
9+
In practice:
10+
* We are not code snobs. We do not assume knowledge or imply there are things that somebody should know.
11+
* We insist on actively engaging with requests for feedback regardless of their complexity.
12+
* We welcome newcomers and prioritize the education of others. We strive to approach all tasks with the enthusiasm of a newcomer. Because we believe that newcomers are just as valuable in this effort as experts.
13+
* We consistently make the effort to actively recognize and validate multiple types of contributions.
14+
* We are always willing to offer help or guidance.
15+
16+
In times of conflict:
17+
* We listen.
18+
* We clearly communicate while acknowledging other's feelings.
19+
* We admit when we're wrong, apologize, and accept responsibility for our actions.
20+
* We are continuously seeking to improve ourselves and our community.
21+
* We keep our community respectful and open.
22+
* We make everyone feel heard.
23+
* We are mindful and kind in our interactions.
24+
25+
In the future:
26+
* The future is now.
27+
28+
29+
## p5.js Code of Conduct
230

331
* **Be mindful of your language.** Any of the following behavior is unacceptable:
432
* Offensive comments related to gender identity and expression, sexual orientation, race, ethnicity, language, neuro-type, size, ability, class, religion, culture, subculture, political opinion, age, skill level, occupation, or background
533
* Threats of violence
634
* Deliberate intimidation
7-
* Sexually explicit or violent material
35+
* Sexually explicit or violent material that is not contextualized and preceded by a considerate warning
836
* Unwelcome sexual attention
937
* Stalking or following
1038
* Or any other kinds of harassment
1139

1240
Use your best judgement. If it will possibly make others uncomfortable, do not post it.
1341

14-
* **Be respectful.** Disagreement is not an opportunity to attack someone else's thoughts or opinions. Although views may differ, remember to approach every situation with patience and care.
15-
* **Be considerate.** Think about how your contribution will affect others in the community.
42+
* **Be respectful.** Disagreement is not an opportunity to attack someone else's thoughts or opinions. Although views may differ, remember to approach every situation with patience and care.
43+
* **Be considerate.** Think about how your contribution will affect others in the community.
1644
* **Be open minded.** Embrace new people and new ideas. Our community is continually evolving and we welcome positive change.
1745

1846
If you believe someone is violating the code of conduct, we ask that you report it by emailing [[email protected]](mailto:[email protected]). Please include your name and a description of the incident, and we will get back to you ASAP.
1947

20-
Participants asked to stop any harassing behavior are expected to comply immediately. If a participant engages in harassing behavior, the p5.js Team may take any action they deem appropriate, up to and including expulsion from all p5.js spaces and identification of the participant as a harasser to other p5.js members or the general public.
21-
22-
## Also
48+
Sometimes, participants violating the Code of Conduct are unaware that their behavior is harmful, and an open conversation clears things up to move forward. However, if a participant continues with the behavior, the p5.js team may take any action they deem appropriate, up to and including expulsion from all p5.js spaces and identification of the participant as a harasser to other p5.js members or the general public.
2349

24-
* You can read our [community statement](http://p5js.org/community/) on our website.
50+
---
51+
This statement is licensed under a [Creative Commons license](https://creativecommons.org/licenses/by-sa/4.0/). Please feel free to share and remix with attribution.

.github/CONTRIBUTING.md

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ Hello! We welcome community contributions to the p5.js Web Editor. Contributing
1515
- [Issue Search and Tagging](#issue-search-and-tagging)
1616
- [Beginning Work](#beginning-work)
1717
- [Contribution Guides](#contribution-guides)
18-
- [Writing Commit Messages](#writing-commit-messages)
19-
- [Tips](#tips)
2018

2119
## Code of Conduct
2220

23-
Please follow the guidelines in the [Code of Conduct](https://github.com/processing/p5.js-web-editor/blob/master/.github/CODE_OF_CONDUCT.md).
21+
Please follow the guidelines in the [Code of Conduct](https://github.com/processing/p5.js-web-editor/blob/develop/.github/CODE_OF_CONDUCT.md).
2422

2523
## How Can I Contribute?
2624
If you're new to open source, [read about how to contribute to open source](https://opensource.guide/how-to-contribute/).
@@ -33,11 +31,13 @@ Don't know where to begin? Here are some suggestions to get started:
3331
- Front end: React/Redux, CSS/Sass, CodeMirror
3432
- Back end: Node, Express, MongoDB, Jest, AWS
3533
- DevOps: Travis CI, Jest, Docker, Kubernetes, AWS
34+
- Documentation
35+
- Translations: Application and documentation
3636
* 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.
3737
* 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!"
38-
* Try getting the project running locally on your computer by following the [installation steps](./../developer_docs/installation.md).
39-
* Look through the documentation in the [developer docs](../developer_docs/). Is there anything that could be expanded? Is there anything missing?
40-
* Look at the [development guide](./../developer_docs/development.md).
38+
* Try getting the project running locally on your computer by following the [installation steps](./../contributor_docs/installation.md).
39+
* Look through the documentation in the [developer docs](../contributor_docs/). Is there anything that could be expanded? Is there anything missing?
40+
* Look at the [development guide](./../contributor_docs/development.md).
4141

4242
### Good First Issues
4343
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), or [issues that need documentation of steps to reproduce](https://github.com/processing/p5.js-web-editor/issues?q=is%3Aissue+is%3Aopen+label%3A%22needs+steps+to+reproduce%22). 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.
@@ -60,45 +60,9 @@ If you feel like an issue is tagged incorrectly (e.g. it's low priority and you
6060

6161
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.
6262

63-
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.
63+
Then, look at the [development guide](https://github.com/processing/p5.js-web-editor/blob/develop/contributor_docs/development.md) for instructions on how to install the project locally and follow the right development workflow.
6464

6565
### Contribution Guides
6666

6767
* [https://guides.github.com/activities/hello-world/](https://guides.github.com/activities/hello-world/)
6868
* [https://guides.github.com/activities/forking/](https://guides.github.com/activities/forking/)
69-
70-
## Writing Commit Messages
71-
72-
Good commit messages serve at least three important purposes:
73-
74-
* They speed up the reviewing process.
75-
* They help us write good release notes.
76-
* They help future maintainers understand your change and the reasons behind it.
77-
78-
Structure your commit message like this:
79-
80-
```
81-
Short (50 chars or less) summary of changes ( involving Fixes #Issue-number keyword )
82-
83-
More detailed explanatory text, if necessary. Wrap it to about 72
84-
characters or so. In some contexts, the first line is treated as the
85-
subject of an email and the rest of the text as the body. The blank
86-
line separating the summary from the body is critical (unless you omit
87-
the body entirely); tools like rebase can get confused if you run the
88-
two together.
89-
90-
Further paragraphs come after blank lines.
91-
92-
- Bullet points are okay, too
93-
94-
- Typically a hyphen or asterisk is used for the bullet, preceded by a
95-
single space, with blank lines in between, but conventions vary here
96-
```
97-
98-
* Write the summary line and description of what you have done in the imperative mode, that is as if you were commanding someone. Start the line with "Fix", "Add", "Change" instead of "Fixed", "Added", "Changed".
99-
* Always leave the second line blank.
100-
* Be as descriptive as possible in the description. It helps reasoning about the intention of commits and gives more context about why changes happened.
101-
102-
## Tips
103-
104-
* If it seems difficult to summarize what your commit does, it may be because it includes several logical changes or bug fixes, and are better split up into several commits using `git add -p`.

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: processing
2+
custom: https://processingfoundation.org/

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Existing Feature Enhancement
3+
about: This template is for suggesting an improvement for an existing feature.
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Hi there!
12+
13+
To check an option in the sub-areas list, replace the "[ ]" with a "[x]". Be sure to check out how it looks in the Preview tab! Feel free to remove any portion of the template that is not relevant for your issue.
14+
-->
15+
16+
### How would this new feature help [increase access](https://github.com/processing/p5.js/blob/main/contributor_docs/access.md) to the p5.js Editor?
17+
18+
#### Feature enhancement details:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: New Feature Request
3+
about: This template is for requesting a new feature be added.
4+
title: ''
5+
labels: feature request
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Hi there!
12+
13+
Thank you for contributing to the p5.js Editor project
14+
15+
Until further notice, we will only add new features that increase access.
16+
17+
In order to request a new feature for the p5.js Editor, we need to know how the new feature will increase access.
18+
-->
19+
20+
### How would this new feature help [increase access](https://github.com/processing/p5.js/blob/main/contributor_docs/access.md) to the p5.js Editor?
21+
22+
#### New feature details:

.github/ISSUE_TEMPLATE/found-a-bug.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Found a Bug
3+
about: This template is for reporting bugs (broken or incorrect behavior). If you have questions about your own code, please visit our forum discourse.processing.org instead.
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Hi there!
12+
13+
To check any option, replace the "[ ]" with a "[x]". Be sure to check out how it looks in the Preview tab! Feel free to remove any portion of the template that is not relevant for your issue.
14+
-->
15+
16+
#### Details about the bug:
17+
18+
- p5.js version: <!-- You can find this in the first line of the p5.js file -->
19+
- Web browser and version: <!-- In the address bar, on Chrome enter "chrome://version", on Firefox enter "about:support". On Safari, use "About Safari". -->
20+
- Operating System: <!-- Ex: Windows/MacOSX/Linux/Android/iOS along with version -->
21+
- Steps to reproduce this:
22+
<!-- Include a simple code snippet that demonstrates the problem, along with any console errors produced. If this isn't possible, then simply describe the issue as best you can! -->

0 commit comments

Comments
 (0)