Page MenuHomePhabricator

Sparse data: merge small edits
Closed, ResolvedPublic

Description

Smaller fix that should help with some of this (originally taken from https://phabricator.wikimedia.org/T264802 description):

  • During paging, if the last item from the previous page is a small event, and the first item on the next page is a small event within the same day (i.e. collection view section), merge those two cells and update the data. So "2 small changes" on the previous page and "4 small changes" on the next page become a single "6 small changes" cell.

Additional larger effort fix:

  • If we have multiple days that are segmented off into their own collection view sections, and each day only contains small change cells, we need to merge all of them into a single section and have the section titles show a range of dates. Note this collapsing should only occur if the sections are consecutive in the collection view (the event days themselves don't have to be consecutive, just where they are positioned in the collection view).

Loose examples (actual display date depends on what the mock will look like):

Before larger effort fix:

**October 15th**

1 small event
1 large event
2 small events

**October 16th**
3 small events

**October 20th**
2 small events

**October 21st**
1 small event

**October 25th**
2 small events
1 large event
2 small events

After larger effort fix:

**October 15th**

1 small event
1 large event
2 small events

**October 16th - 21st**
6 small events

**October 25th**
2 small events
1 large event
2 small events

Event Timeline

From 264802:

  • Avoid situation with two consecutive small events within the same section. This happens when you page and last event was small and first event on next page is small.
Tsevener added subscribers: cmadeo, Tsevener.

@cmadeo Can we get a quick mock of what a section header with multiple small events that occur across multiple days would look like? Thanks!

JMinor claimed this task.