﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	parents
5365	Some improvements to collections views	Daniel Krol	Jessica Tallon	"My feature branch, which is split up into 3 commits at the moment:

https://github.com/orblivion/mediagoblin/commits/collection-ui-improvements

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:

https://github.com/orblivion/mediagoblin/commit/25e424023226a4823b0f50258fe54a28964a202e

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 (`position`, `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 `position` and `id` to be opposite of each other?)

Also in this commit, I filter by whether the media item is processed.

https://github.com/orblivion/mediagoblin/commit/ad9a9d8a756a55e36e83696639d6dd558eb497e3

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:

https://github.com/orblivion/mediagoblin/commit/577911aed004e8a9fb2d2c6f9d133568dac3361c"	enhancement	in_progress	major		programming			tsyesika	
