Repository navigation
feat: add v2 example sketches from the latest website/repo - #4407
Open
syedbarkath980 wants to merge 1 commit into
Open
syedbarkath980 wants to merge 1 commit into
syedbarkath980 wants to merge 1 commit into
Conversation
|
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. |
This was referenced Nov 8, 2026
syedbarkath980
force-pushed
the
feat/add-v2-example-sketches-from-up-to-date-repo
branch
from
November 11, 2026 02:58
16db4d0 to
a148f0f
Compare
syedbarkath980
force-pushed
the
feat/add-v2-example-sketches-from-up-to-date-repo
branch
from
November 15, 2026 06:03
a148f0f to
afd49ac
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
Fixes #4106
Description
Updates
server/scripts/examples.jsto fetch example sketches fromboth the legacy v1 source and the current v2 source, so the editor's
example picker includes up-to-date p5.js v2 sketches alongside the
existing v1 ones.
V1 Source (unchanged)
V2 Source (new)
Changes made:
authHeaders()helper to remove repeated auth headerconstruction across all API calls
(
getCategories,getSketchesInCategories,getSketchContent,addAssetsToProject,createProjectsInP5user)importV2Examples()which fetches fromprocessing/p5.js-examplegetp5User()to run both v1 and v2 imports sequentiallyforEachtoPromise.allforconsistency with the rest of the async code
BEFORE (adding v2 example-sketches):
https://github.com/user-attachments/assets/a485ba7a-e9a7-4bc9-a5fe-3c9f6c4d723b
AFTER (adding v2 example-sketches):
example.sketches.After.v2.example.sketches.implementation.mp4
I have verified that this pull request:
npm run lint)npm run test)npm run typecheck)developbranch.Fixes #123