Collapse view

When the view is collapsed, the view boxes will be packed as tightly in the grid as possible. I.e. if a 3 row view, only contains 2 elements in the first row, the first element from the second row will be moved up into the first row.