Open nickshanks opened 5 years ago
Forgot to mention, this isn't described on https://www.bbc.co.uk/gel/guidelines/numbered-pagination either, which is why I was looking at the behaviour of the demo.
We would want guidance of what the interface should be to come from GEL, so this may be a signal to raise this question there.
In actual usage, I can see this working on the /food
site though.
That example was very surprising! Two inferior pages and three superior ones. I went to look myself, and discovered that there's a media breakpoint at 900px where it switches from four inferior and four superior to the example you show. Below 600px it shows prev, first, …, self, next, …, last, next. Below 400px the next page after the current page goes away, and then the blocks start to get messy below 307px. The equivalent of the gef-pages__text element is never shown (it does not exist). It also does not give the ellipses a full block's width.
If you have an interest in pursuing this pattern to make it a good recommendation in GEL, I would approach GEL and ask how to get involved. This example clearly shows that some discussion is needed.
The Load More demo does not show how pages such as 5 and 55 should act with regards to displaying the first page link and a lower-end ellipsis, e.g. I assume we're supposed to do this:
< 1 … 52 53 54 55 56 57 58 … 999 >
But how many page links should be between the two ellipses? Should we display the first page link and the prior ellipsis at all?It would be nice if clicking on the pagination links (which add
?page=n
to the URL) would load a page with that page number selected, and the expected behaviour for the first page link and any initial ellipsis.