Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Ordering Mismatch for Global Shared #1022

Closed
dosiecki opened this issue Jun 5, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@dosiecki
Copy link
Collaborator

commented Jun 5, 2017

The /social/river_stories?global_feed=true API appears to return stories in an order different than our understood default based on story timestamp. As a result, new API-pages of stories come in and displace existing stories in the UI, leading to a bad UX. Which JSON field in the Story block should be used for sortation of stories fetched via this API to match fetch order?

(as reported in https://getsatisfaction.com/newsblur/topics/android-global-shared-stories-jumps-back-to-the-top-as-new-stories-are-added)

@dosiecki dosiecki added the android label Jun 5, 2017

@samuelclay

This comment has been minimized.

Copy link
Owner

commented Jun 5, 2017

Global Shared Stories do not support ordering. So have the Android app just enforce "Newest First", which should correct for this bug.

@dosiecki

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 5, 2017

Sorry, should have been more clear - we still need to know which date field is the sortation key to implement Newest First.

@samuelclay

This comment has been minimized.

Copy link
Owner

commented Jun 5, 2017

Ohhh, well in that case, we don't retain stories loaded from Global Shared Stories, so they retain the order they came in. You'll have to implement some workaround for Android, or suggest something I can give you to order them.

@dosiecki

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 5, 2017

Due to the incredibly async nature of fetch loops on Android, it would be really great if the API could expose whatever field it is using to order the stories. We do have an existing hack framework to support "in the order returned by the API" ordering that I can sub in, but it is not ideal.

I now see that the more general problem that needs to be solved is how to display a list of stories that contains both slightly older existing stories and also periodicaly integrates newer ones. Since many devices aren't powerful enough to support cleanup every time the feed is displayed, new stories pushing down the top of the list will always be a UX in some cases. Ideally we can concoct something that lets the list position be maintained in spite of data being added on either end of the list.

@samuelclay

This comment has been minimized.

Copy link
Owner

commented Jun 5, 2017

You can use the story.friend_shares[0].date.

@dosiecki

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 7, 2017

For me, at least, the story.friend_shares list is always empty for global_feed=true results. For now I will implement the hackish attempt at in-order-received ordering, but long term it would be really nice from a client perspective to have a top-level key in any story result that reflects the ordering used on the backend.

@dosiecki

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 4, 2017

workaround implemented and looking much better in Prod.

@dosiecki dosiecki closed this Jul 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.