avo-hq / avo

Build Ruby on Rails apps 10x faster
https://avohq.io
Other
1.52k stars 251 forks source link

Drag and drop UI for reordering in a hierarchy #3115

Open rctneil opened 2 months ago

rctneil commented 2 months ago

I'd love an expansion to the drag and drop reordering feature where you can drag and drop left and right to add hierarchies to resources.

Underneath this could be structured via parent child etc or acts as nested set.

Would also provide a nice visual view of the structure of a Resource record type.

I see it as working similarly to the Wordpress menu editor

Example in image below: image

adrianthedev commented 2 months ago

Hey @rctneil I know we talked about this on the Office Hours call. I had mentioned it there as well; we need a specific use-case to be able to evaluate or build this. The Wordpress example has a specific use case. It's managing menu items in menus. We don't have that and probably won't for a while as we manage our menus with code. If you have a different one that can be applied largely to other code-bases, yes, please write more about it so we can discuss it. If it's something very specific, then, it can be done using custom code and probably should be done like that.

So, I'm looking forward to the use-case as it could be something that we overlooked and people might need it.

github-actions[bot] commented 2 months ago

This issue has been marked as stale because there was no activity for the past 15 days.

rctneil commented 1 month ago

Hey @adrianthedev I can see this being super useful for any Resource Models that may use some sort of parent-child setup/gem such as awesome_nested_set.

Having a "Hierarchy" view of that resource could show all the records in their hierarchy and then users can grab a grab handle / the record itself and drag it up and down / left and right to position it where it needs to be.

I see a benefit to this as users can at a glance visually see the structure of their records.

I can also see this possible working as another View of a resource OR in a way like you demoed for the upcoming Kanban board if it is to support multiple Resource types.

I could also see an option to allow people to specific whether it should allow only up/down movement (like current record re-ordering), or up/down and left/right in order to make it super flexible.

It could be used to manage ordering of a multi level navigation / menu (as in Wordpress' case, or handling A family structure, or Photo Albums in Collections, or even just a basic file/folder hierarchy like in Finder/Windows Explorer.

I hope this explains a few use-cases.

github-actions[bot] commented 1 month ago

This issue has been marked as stale because there was no activity for the past 15 days.

adrianthedev commented 1 month ago

Do you have any examples UIs in the wild? Something where we can gather inspiration from. Also, we need to find a JS plugin that already does this and supports the options we want as I don't want us building and maintaining that.

rctneil commented 1 month ago

I'll take a look around and get back to you.

github-actions[bot] commented 1 week ago

This issue has been marked as stale because there was no activity for the past 15 days.