processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.37k stars 1.32k forks source link

Better handling when renaming files #3014

Closed Keshav-0907 closed 4 months ago

Keshav-0907 commented 7 months ago

p5.js version

v2.11.0

What is your operating system?

Mac OS

Web browser and version

Brave v1.61.109

Actual Behavior

When renaming a file from the side-bar, the blinking text cursor is placed at the end. But in general cases only the file name is to be changed not the extension ( .js , .html, .png, etc).

Currently we have to explicitly, move the cursor back from the end.

https://github.com/processing/p5.js-web-editor/assets/91189139/344d55b4-24f2-4612-89a0-b40876225bf1

Expected Behavior

To solve this issue, when renaming we can auto-place the blinking text cursor at the end of the filename, excluding the extension

In addition, we can also have a confirmation when the user tries to change the extension for a file

Steps to reproduce

Steps:

  1. Visit https://editor.p5js.org/
  2. Try Renaming a file form the sidebar
lindapaiste commented 7 months ago

In addition, we can also have a confirmation when the user tries to change the extension for a file

We actually don't allow this it all, but it's not explained to the user. It will keep the previous file name. So there is definitely room for improvement there! I would be fine with allowing them to change the extension with a confirmation.

rahulrana701 commented 7 months ago

@lindapaiste I would like to work on this issue because I think I can solve it , so could you please assign it to me

Keshav-0907 commented 7 months ago

@rahulrana701 I am already working on this

rahulrana701 commented 7 months ago

@Keshav-0907 ok