Some improvements to collections views
My feature branch, which is split up into 3 commits at the moment:
These are some improvements that I thought would be good, though it could be controversial. The sorting/filtering part is spawned from what I thought was somewhat of a requirement created by #5360, though independent enough that I split it out.
1) Media items in the collection view don't show the title of the media entry, we just show the collection item note. I think it makes sense to default to the media entry title if there is no note:
The potential issue I see with this is that collections can hold things other than media entries, and those might not have titles. I'm not sure what else you had in mind to hold, so I'll put this out there for now to see what you think. I could work around it but I want to make sure it's necessary.
2) Collections are currently sorted by descending
position. I actually don't see anywhere in the codebase that
position is ever set, so I presume this is a "TODO". The problem is that the way collections work now, it *sort of* sorts by ascending
id. I guess the database does this naturally. The reason I say *sort of* is that I think some things start to get funny if you delete items. So, I thought I'd formalize it by sorting collections by ascending (
id). If you start setting
position and leave it as sorting descending, you'll end up reversing the way it's been working so far. (Unless you intended the sense of
id to be opposite of each other?)
Also in this commit, I filter by whether the media item is processed.
3) Collections currently show up as a text list. This seems rather unpolished. Here, I make it a gallery view, using the first item in the gallery if available: