Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enables URL parsing of p5.js version and add-on libraries #3715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Hugo-RM wants to merge 5 commits into processing:develop
base: develop
Choose a base branch
Loading
from Enochteo:feat/url-parsing-p5.js-version

Conversation

@Hugo-RM
Copy link

@Hugo-RM Hugo-RM commented Nov 3, 2025
edited
Loading

Fixes #3647

Changes:

  • Adds URL parser to allow p5.js version to be configured from URL.
  • Includes URL parser test file to test edge cases and fallback response.

(Potential future extensions)

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

Hugo-RM and others added 5 commits November 3, 2025 05:50
Helper functions will ensure URL parameters are
normalized before being used.
I have added a test file for the URL parameter parsing utility located at client/utils/parseURLParams.js. This test file includes various test cases to ensure the correct functionality of the parseURLParams function, covering edge cases and typical usage scenarios. For the add-on flags I allowed 'on', 'true', '1', 'ON', 'True', and 'TRUE' to be interpreted as true, while 'off', 'false', '0', 'OFF', 'False', and 'FALSE' are interpreted as false. This should enhance the robustness of the URL parameter parsing in our application.
Convert defaultHTML from a constant string to a function that accepts
an options object for version and add-on library configuration. This
enables URL parameter parsing for library selection.
Maintains backward compatibility - calling defaultHTML() with no
arguments produces the same output as before.
Add validation functions to ensure URL parameters for p5.js versioning
is correctly parsed and handled. Falls back to default functionality
for invalid/missing parameters.
Use npx prettier --write to format all modified files.
Change test fallbacks to be consistent with default behavior.
Add URL parser to client/modules/IDE/reducers/file.js
Co-authored-by: Oscar Bedolla <GoodKimchi@users.noreply.github.com>
Co-authored-by: Enoch Owoade <enochowoade@gmail.com>
Copy link

welcome bot commented Nov 3, 2025

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Enable URL parsing of p5.js version

AltStyle によって変換されたページ (->オリジナル) /