frzyc / genshin-optimizer

An Artifact optimizer for Genshin Impact.
https://frzyc.github.io/genshin-optimizer/
MIT License
781 stars 229 forks source link

Add ability to sort/reorder loadouts and builds #1725

Open nguyentvan7 opened 7 months ago

nguyentvan7 commented 7 months ago

There probably isn't a great way to do this automatically using heuristic, so maybe just allow custom sorting, similar to multi opt?

HassnHamada commented 6 months ago

I'll work on this

nguyentvan7 commented 6 months ago

Please check with @frzyc on how he wants to do this. I know he was experimenting with dnd so not sure what he wants the future standard to be

frzyc commented 6 months ago

Yeah will probably need more thought here, because there isnt an actual "array" to persist, so this is more complicated than other sort/reorder, and there isnt a meaningful "last edit" either. I'd say we can defer this until a more evident use case arises.

HassnHamada commented 6 months ago

I thought about it and dnd sound like the better idea. So I'll just take leave it to him.


Just to share thoughts these are the two ways I would have done it

To Manually Order

The way I would have done it is using arrows (MoveUp/MoveDown/MoveToStart/MoveToEnd).

Which got two problems

To Automatically Sort

One solution is to displaying the value for the target being currently optimized next to the build name and sort base on that. It's only problem people may not like it since It may move a certain build from a certain location they are used to, essentially confusing them.

frzyc commented 6 months ago

Yeah, I don't think a "custom sort order" is the way to go here, just a lot of extra UI and complicated logic. The best we can do is sort by loadout name (non-persist and dynamic), but I am honestly not sure what people expect here in terms of sort, hence why I want more feedback before doing any engineering time.