PowerlineApp / powerline-mobile

Other
4 stars 16 forks source link

UX Redesign Support: Comment Preview #583

Open jterps08 opened 7 years ago

jterps08 commented 7 years ago

The ability for the system to provide a "preview" of the most recent comment on any item. This will be displayed either in the newsfeed below an item (post/petition/poll/discussion/fundraiser/event) OR below a parent comment.

The app may ask for the most-recent comment or the second-most-recent comment in the event that the app wants to show two previews and not just one. The app will truncate the preview to 150 characters likely. The user may tap on that preview to open up the full comment modal (with its full children comments visible, infinite scrolling, etc.)

igaponov commented 7 years ago

@jterps08 we have an endpoint now to get comments for any item, I can add sorting (by date) and there is a "limit" parameter, so frontend will be able to get one or two or xxx last comments. But there is no endpoint to get all children.

jterps08 commented 7 years ago

can you clarify the use of the api endpoint for this please @igaponov

igaponov commented 7 years ago

https://api-dev.powerli.ne/api-doc#get--api-v2-posts-{id}-comments sort by createdAt - DESC, per_page = 1 to get the last comment use a parent query param to filter all children of a comment