Skip to content

"Add to Collection" fails silently when triggered from an Example sketch #3767

@Deepak-cell311

Description

@Deepak-cell311

p5.js version

1.11.11

What is your operating system?

Windows

Web browser and version

Chrome 143.0.7499.170

Actual Behavior

I noticed an issue where the "Add to Collection" feature does not work as expected when a logged-in user is viewing an Example sketch. Even though the user is logged in, clicking the button does not add the sketch to the collection, and there is no feedback (success or error message) provided to the user.

Steps to Reproduce

  1. Log in to the p5.js Web Editor.

  2. Go to File > Examples.

  3. Select any example sketch (e.g., Structure > Setup and Draw).

  4. Click on File > Add to Collection.

  5. Select a collection from the list (if the modal opens) or observe the behavior.

  6. Navigate to Dashboard > Collections.

Actual Behavior
The sketch is not added to the collection. (Optional: If the modal doesn't even open, write: "The Add to Collection modal does not trigger/open.") (Optional: If you see errors in the console, mention them here).

https://drive.google.com/file/d/1V1IXHwBRYFIaUfvAzuvtF7SZQxDAHF3h/view?usp=sharing

Expected Behavior

Expected Behavior
One of the following should happen:

  • The Example sketch should be added to the collection successfully.
  • OR The user should be prompted to Duplicate the sketch first (since Examples are read-only).
  • OR The "Add to Collection" option should be Disabled for Example sketches until the user duplicates them.

Steps to Reproduce

  1. Log in to the p5.js Web Editor (https://editor.p5js.org/).
  2. Navigate to File > Examples.
  3. Select any example sketch to load it (e.g., Structure > Setup and Draw).
  4. Once the example loads, click File > Add to Collection.
  5. Observe the behavior: The "Add to Collection" page/modal does not appear, or if it does, selecting a collection does not actually add the sketch.
  6. Navigate to Hello, [Username]! > My Collections.
  7. Check the collection; the example sketch is missing.

Are you working on this issue ?
Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardBugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions