jonathanperret / paysage

Paysage is a visual shared playground for code.
http://paysage.xyz
GNU Affero General Public License v3.0
19 stars 9 forks source link

Editing the Code Objects list: rename, reorder #43

Open SarahBu07 opened 7 years ago

SarahBu07 commented 7 years ago

When we choose and select several playground samples, we got a list, and it's not possible to delete one or several items in the list, or even the entire list. So we could add a delete button for each item and even add a reset button to start again from scratch. @korayaz

juliendorra commented 7 years ago

Are you talking about the playground list here : www.paysage.xyz/list ? If so: As we can create new, blank playground without limits, what would be the use case of deleting existing Playgrounds? It could be very destructive without real benefits that I can see.

But maybe you are talking about the code object list on the Programmer page (ex of programmer page: www.paysage.xyz/playground/monterraindejeu/programmer ) In this second case, there might be a use case for deleting, renaming the code objects…So we could work on defining a better edit interface on the programmer.

jonathanperret commented 7 years ago

As I understand it, @SarahBu07 is talking about the "creature list" in the programmer. Agreed that there wouldn't be much point in deleting a playground.

Buttons to delete objects would definitely be a useful addition. Reordering would be nice too…

juliendorra commented 7 years ago

Ok, so with reordering, deleting and renaming: renaming the issue to reflect the need for better edit UI/flow of the code object list

SarahBu07 commented 7 years ago

Totally agree for the reordering, so we could choose which creature we want to have above or under each other...

juliendorra commented 7 years ago

Re-ordering would be very useful. It touch the programmer page and the server. The renderer doesn't need to know anything about it, as it will just update and re-render in the order the objects are send. It could be done that way:

juliendorra commented 7 years ago

Now that we have a delete function (thanks @etienneCharignon!), a "send to foreground" action is easy to implement locally in the programmer, without any new code server-side or render-side: we can combine a delete and a re-send of the code with the same code object ID.

The new canvas for rendering the newer code object is added on the top of previous canvas, so delete+re-send will actually place a code object in front of all the others.

That would work that way: