Use Case: a photo page. In the panel the user should be able to drop their photos. New photos should get added to the front.
Solution: a files section with a
file.create:before hook that sets sort to 1 for new uploads and resorts all the other photos.
Bad: it’s slow. Very slow with a lot of photos.
Fix: flip sorting so that the highest sorted is visible at the top so that the other sorting numbers don’t have to be touched.
Bad: flipping the photos disables manual sorting. Manual sorting should still be enabled.
Possible fix: still enable manual sorting when
sortBy: sort and
flip: true is set?
I had a similar case with pages: https://github.com/getkirby/ideas/issues/97