Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
amp-live-list sort order is not configurable #5396
Agreed that this would be nice to have. I'm assuming you need a sort order configurable by the user, right? Feel free to include a link to a non-AMP implementation so we can get a good idea of the UX.
This might be reasonably straightforward with single-page
For instance, way a live blog were broken up across multiple pages. In newest-first order, this isn't an issue (new updates come in, and get slotted at the top of the
a) flip the order of the list to newest-first order and take the user to the top of the page
Or updates could be disabled in oldest-first order
There's also a question of how to toggle the sort order in a paginated situation. There would need to be a server call of some kind to fetch the data living on another page.
A good v1 for this might be to enable it for single-page implementations, and to explore options for paginated implementations as an enhancement.
Just to capture notes on this request, after doing a little exploration, there are at least two changes necessary to make this work:
Also, my sense for the live Q&A use-case is that a toggle to automatically pull in all new updates (#4524) could be as appropriate as a button
Our liveblogs allow insertions to occur anywhere in the liveblog, not just at the top or bottom. Ideally, amp-live-list would look at the
P3: When Possible
To be deprecated - Type: Request
Feb 7, 2017
referenced this issue
Jan 24, 2018
@erwinmombay is planning to work on a fix that will support the static case of oldest-first order
Note: With this update, amp-live-list would work for items in chronological order, but users would not yet be able to switch the ordering dynamically, as per @westonruter 's request—though @erwinmombay , would that be possible to do?
@ericlindley-g I should clarify that users do not need to dynamically change the ordering when viewing the list. The switching of the sort order is a setting in the admin. In other words, WordPress just needs to be able to change the ordering of the comments when first rendering the page. They don't need to change while the page has loaded. Dynamically changing the order after could be nice feature, but it would not be a core requirement.
referenced this issue
Feb 20, 2018
This was referenced
Mar 17, 2018
@ericlindley-g It doesn't seem that