P5.js-web-editor: Order files alphabetically in sidebar and nested folders

Created on 23 Sep 2018  路  25Comments  路  Source: processing/p5.js-web-editor

Nature of issue?

  • [ ] Found a bug
  • [ ] Existing feature enhancement
  • [X] New feature request

New feature details: I would love to be able to rearrange the files in the left file tree, so that I can keep my relevant .js files at the top and the html and css file at the bottom, by simply dragging them around.

good first issue medium feature

Most helpful comment

@siddhant1 go ahead!

All 25 comments

I agree, this would be great. Also, another option鈥攚ould it make sense for the files to be in alphabetical order? Right now the order is just the order in which the files/folders were added to the sketch. Open to whatever feels the most useful.

For me, I think the thing that would be most useful would be the ability to move files in and out of folders.

@catarak

would it make sense for the files to be in alphabetical order?

I vote for alphabetical order, at least as the initial feature. it's easy enough to edit file names to force order and I assume alphabetical order is quicker to implement.

@nopivnick that would at least be a good temporary solution.

I'm not even sure that alphabetical would be faster than a fixed, rearrangeable order. So really, I'm curious which is more desirable.

I think rearranging is more important than alphabetical. Just my opinion though.

custom ordering hands down.

@catarak I feel that sorted alphabatical order would be nice. VS Code follows similar structure, its really nice. Even sublime follows the same.

If it is to be implemented I would like to work upon it.

Isn't #789 and this issue same?

i agree that alphabetical would be best. while a custom order would be nice, i think it introduces some complexity to the UI/UX that i don't think is totally necessary. and no, it is not the same as #789, since that is in references to sketches, rather than the files that are contained within a sketch.

I think I can work on maintaining an alphabetical order for now , should I start @catarak?

@siddhant1 go ahead!

When will we see this?

@TJHUNTER2001 I don't have a timeline for this issue unfortunately. unless anyone else wants to pick it up!

@shakti97 would you like to pick this up?

Sure

Hey @catarak need a little help here can you please tell where is the map function that lays out the files

@ashu8912 Are you still working on the issue?

I would like to do something for the issue, but I am a bit reluctant to touch the reducers because of the comment message given on the FileNode Component as that 'this is a hack and that the state is updated before the props' on line 301
https://github.com/processing/p5.js-web-editor/blob/8bf9c1089a329e875649eac59ffc25d82202aa84/client/modules/IDE/components/FileNode.jsx#L301
Any suggestions or advice would be greatly appreciated. Thanks

No go ahead.

Hey, has anyone completed this? It seems to still be an issue in the live website.

If not, I'll try take a stab at it as my first open source contribution.

@jordanja it hasn't been fixed! you can absolutely go ahead and work on it 馃槃

@jordanja are you still working on this issue?

Hey, @catarak I made a few changes in the file reducer and got this results -

Screenshot from 2020-07-30 22-31-00

Is this fine??

@neelesh7singh yes! make a PR so I can review your code 馃樃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

byfelipesanchez picture byfelipesanchez  路  4Comments

aferriss picture aferriss  路  4Comments

andytilia picture andytilia  路  4Comments

hellonearthis picture hellonearthis  路  4Comments

aldrinjenson picture aldrinjenson  路  4Comments