brockenbrough / ssu-social-frontend

6 stars 4 forks source link

For you feed makes little sense. #30

Open brockenbrough opened 2 weeks ago

brockenbrough commented 2 weeks ago

For you, it gives you just the posts of people you are following. And the order is random.

For you:

Or propose something better.

brockenbrough commented 2 weeks ago

The feed is created by the backend, so this is a backend change not tied to UI. Here is code from postlist.js showing the call to the backend if (type === "feed") { url = user ? ${process.env.REACT_APP_BACKEND_SERVER_URI}/feed/${user.username} : ${process.env.REACT_APP_BACKEND_SERVER_URI}/feed/; } else if (type === "privateuserprofile") { url = ${process.env.REACT_APP_BACKEND_SERVER_URI}/posts/getPostPageByUsername/${user.username}?page=${page}&postPerPage=${POST_PER_PAGE}; } else if (type === "publicuserprofile") { url = ${process.env.REACT_APP_BACKEND_SERVER_URI}/posts/getPostPageByUsername/${profileUsername}?page=${page}&postPerPage=${POST_PER_PAGE}; } else if (type === "all") { url = ${process.env.REACT_APP_BACKEND_SERVER_URI}/posts/getPostPage?page=${page}&postPerPage=${POST_PER_PAGE}; }

brockenbrough commented 2 weeks ago

The current algorithm is pretty awful. It shows you only posts of those you follow and they are not even in chronological order. Come up with a new idea.

Here is one. • Currently it gets just people you follow. • Keep only the ones that are 2 weeks old or less. • That makes up the posts at the front of the list. • After that, add in all posts that are 1 month old or less. • It’s ok if some posts are doubled.