guardian/frontend — pull request #4484 by janua (2014-05-29 15:26:19+00:00)
Title: Fix group order

We need to force sorting by `group` for `collection` `trails`.

When a collection is switched between a grouped collection type and a non grouped collection type, we get into an inconsistent state.

For example, after changing over a `Collection` to a grouped type, we start sending diffs to insert an item to the middle of the list with a higher group. There is no forcing on the order, and this means a group with for example 3, ends up in the middle of the list of items with a group 0, or even no group.

At the time of writing:
- Facia-tool UI sorts by group
- Facia-tool API does no sorting (With this PR forcing a sort)
- Facia templates sort by group
- Content API receives the grouping out of order
- MAPI expects the list to be in order of group

This will make everything align.

@robertberry @stephanfowler