P5.js-web-editor: new sketch option doesn't work from sketch tab

Created on 16 Mar 2021  路  5Comments  路  Source: processing/p5.js-web-editor

Nature of issue?

  • Bug

Bug details:

If a user clicks new sketch from the sketch tab, the website simply gets the user back to the editor window without creating a new sketch, just acts as a back button. In my opinion, it should initialize a new sketch instead of staying in the opened sketch.

To implement the feature we may face some challenges like what if the user hasn't saved his/her previous changes. We may encounter by adding a pop-up a window having two buttons to save the changes there and a link to get back to the editor.
I would love to have a discussion on this.

good first issue help wanted medium bug

Most helpful comment

@satyasaibhushan yes we can mock the existed behavior just like from the file menu. And I'm also updating the comment to the bug.

All 5 comments

Can you share more details or screenshots? I tried the steps in editor but it is creates a new sketch instead of behavior you observed.

OIEHQcSb9e

@two-ticks use the new sketch option from the sketches tab.
Screenshot from 2021-03-19 15-10-42

Use the new sketch button from this window.

To implement the feature we may face some challenges like what if the user hasn't saved his/her previous changes. We may encounter by adding a pop-up a window having two buttons to save the changes there and a link to get back to the editor.

Yeah @Ajaya1000 , It seems to be a bug. But, I don't think it would be a problem that user hasn't saved the progress because they will already be warned while opening the sketch-list.

I think the problem can be solved by correcting either of these cases

  1. while opening the sketch-list from the sketch tab,
    where the user only being forwarded to /username/sketches,but not resetting the editor (i.e, state is not being changed by calling RESET_PROJECT)
  1. when clicked on the New sketch button, where the user is only being forwarded to / path, but not resetting the editor

@satyasaibhushan yes we can mock the existed behavior just like from the file menu. And I'm also updating the comment to the bug.

Thanks for reporting! I'm able to reproduce this, when the sketch that had been opened was an unsaved, new sketch.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aldrinjenson picture aldrinjenson  路  4Comments

AltoRetrato picture AltoRetrato  路  4Comments

hellonearthis picture hellonearthis  路  4Comments

byfelipesanchez picture byfelipesanchez  路  4Comments

maartenwijntjes picture maartenwijntjes  路  3Comments