to-boldly-go / tbg-shipdesigner

Ship designer webapp for To Boldly Go
2 stars 2 forks source link

Add ability to reorder parts in parts list editor #74

Closed lbmaian closed 6 years ago

lbmaian commented 6 years ago

Currently, the only way to change the order of parts list in the editor is to sort them, but that's a view-only temporary sort that doesn't affect the underlying parts list data, the sort is unstable and thus precludes secondary sorting, and the oftentimes the user just wants to reorder a single or couple parts rather than the whole list. We should add a way to manually reorder (via drag & drop?) parts. And/or allow permanent resorts?

OnAGravitasHunt commented 6 years ago

I'm using Vue.Draggable in my project. I'm probably also going to work it into my data lists (the Edit button) which I based on the part editor list.

lbmaian commented 6 years ago

Correction: the sort is permanent, not temporary (if parts list is saved). As a workaround, I'm going to make the sort stable so that it allow secondary, tertiary, etc. sorting.

lbmaian commented 6 years ago

Implemented and deployed!

edit: I mean, not only stable sorting, but also draggable part re-ordering (and better add/copy part button behavior)