hyphacoop/distributed-press-organizing

Randomized sort timeline

Closed this issue · 1 comments

It'd be good to expose people to content that isn't necessarily the "latest".

Add a new field called sort to the timeline url querystring and to the component attributes.
check for this field when generating the list of notes to render.

when the random sort is engaged do the following:

  • get the count() of the notes store
  • get the number of items that should be generated for the page
  • use math.random to generate that many random numbers
  • multiply the random numbers by the total count and round
  • open a cursor for the store
  • use the advance() API with the random number to skip to that post in the collection.
  • yield the note to be rendered

We should then add a link on the main page to the randomized timeline for folks to navigate to.

This can help surface content people would not otherwise see and also show how custom timelines could be made using the reader.

We move this from M3 to M4