Skip to content

Commit 0a58072

Browse files
authored
Merge branch 'develop' into fix-docs-pr-template
2 parents e085d76 + b332a99 commit 0a58072

File tree

12 files changed

+646
-81
lines changed

12 files changed

+646
-81
lines changed

README.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,36 @@ We are a community of, and in solidarity with, people from every gender identity
1010

1111
Learn more about [our community](https://p5js.org/community/) and read our [Community Statement and Code of Conduct](./.github/CODE_OF_CONDUCT.md). You can directly support our work with p5.js by [donating to the Processing Foundation](https://processingfoundation.org/support).
1212

13-
Stay in touch with Processing Foundation across other platforms:
13+
Stay in touch with Processing Foundation across other platforms:
14+
1415
- [Instagram](https://www.instagram.com/p5xjs)
1516
- [Youtube](https://www.youtube.com/@ProcessingFoundation)
1617
- [X](https://x.com/p5xjs)
1718
- [Discord](https://discord.com/invite/esmGA6H6wm)
1819
- [Forum](https://discourse.processing.org)
1920

20-
2121
## Using the p5.js Editor 🤔
2222

23-
Make your first sketch in the [p5.js Editor](https://editor.p5js.org/)! Learn more about sketching with p5.js on the [Get Started](https://p5js.org/tutorials/get-started/) and find everything you can do in the [Reference](https://p5js.org/reference/). You can also look at [examples](https://editor.p5js.org/p5/sketches) and remix them in the p5.js Editor.
23+
Make your first sketch in the [p5.js Editor](https://editor.p5js.org/)! Learn more about sketching with p5.js on the [Get Started](https://p5js.org/tutorials/get-started/) and find everything you can do in the [Reference](https://p5js.org/reference/). You can also look at [examples](https://editor.p5js.org/p5/sketches) and remix them in the p5.js Editor.
2424

25-
For more information on usage guidelines for the p5.js Editor, check out the [p5.js Editor Terms of Use](https://editor.p5js.org/terms-of-use). To gain better insight into how we handle user data and data privacy, refer to the [p5.js Editor Privacy Policy](https://editor.p5js.org/privacy-policy).
25+
For more information on usage guidelines for the p5.js Editor, check out the [p5.js Editor Terms of Use](https://editor.p5js.org/terms-of-use). To gain better insight into how we handle user data and data privacy, refer to the [p5.js Editor Privacy Policy](https://editor.p5js.org/privacy-policy).
2626

2727
## Contributing 📖 🐛 🎨
2828

29-
The p5.js Editor is a collaborative project created by many individuals, mostly volunteers, and you are invited to help. All types of involvement are welcome. To get started with contributing to the p5.js Editor, we recommend exploring the following resources in order:
29+
The p5.js Editor is a collaborative project created by many individuals, mostly volunteers, and you are invited to help. All types of involvement are welcome. To get started with contributing to the p5.js Editor, we recommend exploring the following resources in order:
3030

3131
1. [p5.js Community Statement and Code of Conduct](https://editor.p5js.org/code-of-conduct) - Read our Community Statement and Code of Conduct to understand the values that guide our community and how to participate respectfully and constructively.
3232

3333
2. [Contributor Docs](https://github.com/processing/p5.js-web-editor/blob/develop/contributor_docs/README.md) - For a deeper look at how to get involved with the p5.js Editor, check out our Contributor Docs for more in-depth details about contributing to different areas of the project, including code, bug fixes, documentation, discussion, and more.
3434

3535
3. [All Contributors list on the p5.js repository](https://github.com/processing/p5.js?tab=readme-ov-file#contributors) - Explore the All Contributors list to see the wide range of contributions by our amazing community!
3636

37-
> **TypeScript Migration:**
38-
> As of July 2025, we are working on migrating the repo to TypeScript as part of the **[p5.js Web Editor pr05 Grant](https://github.com/processing/pr05-grant/wiki/2025-pr05-Program-Page)**.
39-
> This migration will occur in two phases:
40-
> 1. **Grant Work (July – October 31, 2025)** – Setting up TypeScript configuration, tooling, and starting partial migration. Contributions will be **closed** during this period.
41-
> 2. **Open Contribution (After October 31, 2025)** – TypeScript migration tasks will **open** to all contributors, with guidelines and tutorials available.
37+
> **TypeScript Migration:** We have initiated migrating the repo to Typescript as part of the **[p5.js Web Editor pr05 Grant](https://github.com/processing/pr05-grant/wiki/2025-pr05-Program-Page)**, and the repo is now open to migration contributions.
4238
>
43-
> For full details, see [TypeScript Migration Plan](./contributor_docs/typescript-migration.md).
39+
> Please see [Typescript Migration](contributor_docs/typescript_migration.md) for migration guidelines. Please see [2025 pr05 Typescript Migration Project](contributor_docs/pr05_2025_typescript_migration/index.md) for details and technical decisions for the migration project.
4440
4541
## Acknowledgements 🙏
4642

47-
Support for this project has come from [Processing Foundation](https://processingfoundation.org/), [NYU ITP](https://tisch.nyu.edu/itp), [CS4All, NYC DOE](http://cs4all.nyc/), [COSA at DU](https://liberalarts.du.edu/emergent-digital-practices/open-source-arts), [STUDIO for Creative Inquiry](https://studioforcreativeinquiry.org/), [Grant for the Web](https://www.grantfortheweb.org/), [New Media Rights](https://www.newmediarights.org/), and many others.
43+
Support for this project has come from [Processing Foundation](https://processingfoundation.org/), [NYU ITP](https://tisch.nyu.edu/itp), [CS4All, NYC DOE](http://cs4all.nyc/), [COSA at DU](https://liberalarts.du.edu/emergent-digital-practices/open-source-arts), [STUDIO for Creative Inquiry](https://studioforcreativeinquiry.org/), [Grant for the Web](https://www.grantfortheweb.org/), [New Media Rights](https://www.newmediarights.org/), and many others.
4844

49-
Hosting and technical support has come from:
50-
<br />
51-
<br />
52-
<a href="https://releasehub.com/" target="_blank"><img width="100" src="https://assets.website-files.com/603dd147c5b0a480611bd348/603dd147c5b0a469bc1bd451_logo--dark.svg" /></a>
53-
<br />
54-
<a href="https://www.browserstack.com/" target="_blank"><img width="100" src="https://user-images.githubusercontent.com/6063380/46976166-ab280a80-d096-11e8-983b-18dd38c8cc9b.png" /></a>
45+
Hosting and technical support has come from: <br /> <br /> <a href="https://releasehub.com/" target="_blank"><img width="100" src="https://assets.website-files.com/603dd147c5b0a480611bd348/603dd147c5b0a469bc1bd451_logo--dark.svg" /></a> <br /> <a href="https://www.browserstack.com/" target="_blank"><img width="100" src="https://user-images.githubusercontent.com/6063380/46976166-ab280a80-d096-11e8-983b-18dd38c8cc9b.png" /></a>

client/index.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ const store = setupStore(initialState);
2323

2424
const DONATE_LOGO_IMAGE_URL = 'https://donorbox.org/images/white_logo.svg';
2525

26+
const showDonateCampaign = false;
27+
2628
if (
29+
showDonateCampaign &&
2730
window.location.href.indexOf('full') === -1 &&
2831
window.location.href.indexOf('embed') === -1
2932
) {

client/utils/rename-variable.js

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ function startRenaming(cm, ast, fromPos, newName, oldName) {
4646

4747
const startIndex = node.start;
4848
const endIndex = node.end;
49-
50-
if (node.name !== oldName) return;
51-
5249
const pos = cm.posFromIndex(startIndex);
5350

5451
if (
@@ -57,19 +54,15 @@ function startRenaming(cm, ast, fromPos, newName, oldName) {
5754
parent.type === 'ArrowFunctionExpression') &&
5855
parent.params.some((p) => p.type === 'Identifier' && p.name === oldName)
5956
) {
60-
if (!parent.params.includes(node)) {
61-
return;
62-
}
57+
if (!parent.params.includes(node)) return;
6358
}
6459

6560
if (
6661
parent.type === 'MemberExpression' &&
6762
parent.property === node &&
6863
!parent.computed
6964
) {
70-
if (parent.object.type === 'ThisExpression' && !isBaseThis) {
71-
return;
72-
}
65+
if (parent.object.type === 'ThisExpression' && !isBaseThis) return;
7366
}
7467

7568
const thisContext = getContext(
@@ -84,6 +77,8 @@ function startRenaming(cm, ast, fromPos, newName, oldName) {
8477
let shouldRenameGlobalVar = false;
8578
const isThis = isThisReference(cm, ast, pos, oldName);
8679

80+
shouldRenameGlobalVar = isGlobal && thisContext === 'global';
81+
8782
// Handle renaming inside classes
8883
if (isInsideClassContext) {
8984
const tempPos = {
@@ -121,14 +116,6 @@ function startRenaming(cm, ast, fromPos, newName, oldName) {
121116
isThis === isBaseThis &&
122117
baseContext === thisContext
123118
) {
124-
Object.entries(classMeta.methodVars || {}).forEach(
125-
([methodName, vars]) => {
126-
if (!vars.includes(oldName) && thisContext === methodName) {
127-
const shouldRenameMethodVar = true;
128-
}
129-
}
130-
);
131-
132119
shouldRename =
133120
thisContext === baseContext &&
134121
(currentMethodName === 'constructor' || shouldRenameGlobalVar);
@@ -162,7 +149,6 @@ function startRenaming(cm, ast, fromPos, newName, oldName) {
162149
isGlobal &&
163150
!Object.prototype.hasOwnProperty.call(thisScopeVars, oldName);
164151
}
165-
shouldRenameGlobalVar = isGlobal && thisContext === 'global';
166152
}
167153
// Handle renaming outside classes
168154
else {
@@ -201,15 +187,13 @@ function startRenaming(cm, ast, fromPos, newName, oldName) {
201187
isBaseThis
202188
);
203189

204-
if (
205-
isThisGlobal &&
206-
thisContext in userDefinedFunctionMetadata &&
207-
userDefinedFunctionMetadata[thisContext].params.some(
208-
(param) => param.p === oldName
209-
)
210-
) {
211-
return;
212-
}
190+
const params = userDefinedFunctionMetadata[thisContext]?.params || [];
191+
const hasParamNamedOldName = params.some((param) =>
192+
typeof param === 'string'
193+
? param === oldName
194+
: param?.name === oldName || param?.p === oldName
195+
);
196+
if (isThisGlobal && hasParamNamedOldName) return;
213197

214198
const methodPath = path.findParent((p) => p.isClassMethod());
215199
let currentMethodName = null;

client/utils/showRenameDialog.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import announceToScreenReader from './ScreenReaderHelper';
22
import p5CodeAstAnalyzer from './p5CodeAstAnalyzer';
3-
import { getClassContext, getContext, getAST } from './renameVariableHelper';
3+
import { getContext, getAST } from './renameVariableHelper';
44

55
const allFuncs = require('./p5-reference-functions.json');
66

common/p5Versions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const currentP5Version = '1.11.10'; // Don't update to 2.x until 2026
1+
export const currentP5Version = '1.11.11'; // Don't update to 2.x until 2026
22

33
// Generated from https://www.npmjs.com/package/p5?activeTab=versions
44
// Run this in the console:
@@ -11,6 +11,7 @@ export const p5Versions = [
1111
'2.0.2',
1212
'2.0.1',
1313
'2.0.0',
14+
'1.11.11',
1415
'1.11.10',
1516
'1.11.9',
1617
'1.11.8',

contributor_docs/README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
# Contributor Documentation
2+
23
This folder contains guides for contributing to the p5.js Web Editor. You don't need to know everything to get started—explore at your own pace! To begin, we highly recommend starting with the [Contribution Guide](https://github.com/processing/p5.js-web-editor/blob/develop/.github/CONTRIBUTING.md)!
34

45
These guides aren't exhaustive, and do not cover all the possible ways you can contribute to a project. If you have an idea for how you'd like to help and don't see a guide for it here, you're welcome to add it to the "Documents to Create" list below by opening an issue!
56

6-
77
## List of Documents
8-
* [Contribution Guide](https://github.com/processing/p5.js-web-editor/blob/develop/.github/CONTRIBUTING.md) - A place to get started!
9-
* [Installation](installation.md) - A guide for setting up your development environment.
10-
* [Development](development.md) - A guide for contributing code to the codebase.
11-
* [Testing](./testing.md) - A guide for writing and running tests in the codebase.
12-
* [Preparing an Issue](preparing_an_issue.md) - Instructions for creating and navigating issues.
13-
* [Preparing a Pull Request](preparing_a_pull_request.md) - Instructions for making a pull-request.
14-
* [Accessibility Guidelines](accessibility.md) - Guidelines for writing code to create an accessible application.
15-
* [Translations Guidelines](translations.md) - Guidelines for translating the p5.js editor.
16-
* [Deployment](deployment.md) - A guide to production deployment, and all platforms that are being used.
17-
* [Release](./release.md) - A guide to creating a production release.
18-
* [Typescript Migration](./typescript_migration.md) - About the Typescript Migration project.
198

9+
- [Contribution Guide](https://github.com/processing/p5.js-web-editor/blob/develop/.github/CONTRIBUTING.md) - A place to get started!
10+
- [Installation](installation.md) - A guide for setting up your development environment.
11+
- [Development](development.md) - A guide for contributing code to the codebase.
12+
- [Testing](./testing.md) - A guide for writing and running tests in the codebase.
13+
- [Preparing an Issue](preparing_an_issue.md) - Instructions for creating and navigating issues.
14+
- [Preparing a Pull Request](preparing_a_pull_request.md) - Instructions for making a pull-request.
15+
- [Accessibility Guidelines](accessibility.md) - Guidelines for writing code to create an accessible application.
16+
- [Translations Guidelines](translations.md) - Guidelines for translating the p5.js editor.
17+
- [Deployment](deployment.md) - A guide to production deployment, and all platforms that are being used.
18+
- [Release](./release.md) - A guide to creating a production release.
19+
- [Typescript Migration](typescript_migration.md) - About the Typescript Migration project.
2020

2121
## Documents to Create
22-
* Software Design Principles - reference [p5.js software design principles](https://github.com/processing/p5.js/blob/eb61f7a260531d17930de3c987949558ce242d35/contributor_docs/contributor_guidelines.md#software-design-principles)
23-
* File Structure - An explanation of the file structure of this application.
22+
23+
- Software Design Principles - reference [p5.js software design principles](https://github.com/processing/p5.js/blob/eb61f7a260531d17930de3c987949558ce242d35/contributor_docs/contributor_guidelines.md#software-design-principles)
24+
- File Structure - An explanation of the file structure of this application.
3.06 MB
Loading
164 KB
Loading

0 commit comments

Comments
 (0)