RE: Call for consensus for the pagination design (ISSUE-42)

On Wednesday, October 21, 2015 7:01 PM, Dietrich Schulten wrote:
> Am 21.10.2015 11:40 schrieb elf Pavlik <perpetual-tripper@wwelves.org>:
> >
> >
> > We could also mention that this only applies to 'default paging', in 
> > case of using some alternative paging mechanism. Response from: 
> >
> > GET /an-issue/comments 
> >
> > may include some other kind of view on that particular collection. For 
> > example chat messages posted to this collection (ChatChannel) today with 
> > prev control to show them day by day. Similar to what we can see on 
> >
> > http://socialwg.indiewebcamp.com/irc/social/2015-10-20
> 
> That is an interesting point. A microblog server may choose to respond
> with a view that represents the current day as the initial response,
> i.e. the last page is the first view the client receives. An event
> service might respond with current events as the first page and allow
> to go to the past and the future from there.
>
> Proposal: "the client must not make assumptions which partial view it
> receives as initial response, it has to rely on available navigation controls".

Yes, that's the main point of having hypermedia controls. 


> But this poses a question. Currently we have only the page number to qualify
> the current view.

Actually we don't even have the page number.

> Somehow I want to be able to recognize that I am
> back at the initial page.

hydra:first explicitly tells you what the initial page is.


> Can the initial page be No.  0, with
> positive and negative page numbers?

If the server decides so, sure. Why not.


> Should the PartialCollectionView
> have an optional title which could give a human readable string like
> 'Today' , 'Yesterday' , 'Tomorrow' or so -

You can certainly do that if you think it helps developers. For a machine client it wouldn't make any difference.


> or maybe even a predicate
> to say exactly which range I am looking at? The latter gets
> complicated fast ;)

IMO that wouldn't be too interesting information for a client and thus it's probably not necessary. Can you think of a use case (apart from just showing it to the end user) where that information would be crucial?



--
Markus Lanthaler
@markuslanthaler

Received on Monday, 26 October 2015 18:45:41 UTC