Skip to content

Enable URL parsing of p5.js version #3647

@ksen0

Description

@ksen0

Increasing Access

Currently, educators who want to use p5.js 2.0 have to instruct students to always open library management settings, and select the 2.0 version. URL parsing on the editor would enable educational materials to list the URL with the version already specified. Currently, this is especially relevant for using 2.x, but in the future, it would be important for any non-default version: Once 2.x is default, for example, a tutorial that requires 1.x would also benefit from this feature.

Feature request details

Parse URL, so that editor.p5js.org?version=2.0.4 opens a sketch with that library set. If no version, or a nonexistent version, is provided, then the editor should open a blank sketch with the current default version - as it does now. In addition to implementing this functionality, make sure that as much of this feature as possible is covered with automated test(s).

Currently, version is only controlled as follows:

Image

With URL parsing, it would still be managed in this dialog, but also through URL.

Potential future extensions - these are open to discussion, and any contributors working on the main issue are welcome to share their thoughts:

  • interpret not only specific version numbers (as above), but also latest patch editor.p5js.org?version=2.0 or minor version (editor.p5js.org?version=2 )
  • include add-on libraries; for example, p5.sound.js, or the three 1.x compatibility add-ons provide 1.x-style functionality in a 2.x sketch, which may also be needed in some cases.

Metadata

Metadata

Labels

CodeDayFeature RequestProposal for adding a new functionalityReady for WorkIssue is ready for development work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions