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

Return saved date when fetching saved content #5184

Open
5 tasks done
EricBAndrews opened this issue Nov 10, 2024 · 1 comment
Open
5 tasks done

Return saved date when fetching saved content #5184

EricBAndrews opened this issue Nov 10, 2024 · 1 comment
Labels
area: api enhancement New feature or request

Comments

@EricBAndrews
Copy link

Requirements

  • Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a feature request? Do not put multiple feature requests in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

Saved items are currently returned in the order in which they were saved, which is the intuitive behavior; however, the actual save date does not appear to be included in the response. This, combined with the fact that posts and comments are returned in two separate, sorted arrays, makes it impossible to generate a correctly sorted feed of posts and comments sorted by saved date.

Describe the solution you'd like.

Add a field to the response object containing the date the post/comment was saved.

Describe alternatives you've considered.

  1. Display saved posts and comments in separate feeds. This is bad UX, as it is both inconsistent with the web UI and awkward to navigate
  2. Sort using the post publication date as a rough proxy of save date. This only works as long as the user is saving posts from hot/new; posts saved from, e.g., sorting a community by top all time will be buried in the saved feed
  3. Combine each page of posts and comments (as lemmy-ui currently does). This produces similar sorting issues to the above point, where if a user saves posts more frequently than comments (or vice versa) then very old saved comments will be displayed before more recently saved posts.

Additional context

No response

@EricBAndrews EricBAndrews added the enhancement New feature or request label Nov 10, 2024
@dessalines
Copy link
Member

#2444 Will be about multiple types for all the responses, and should also handle sort orders on multiple types.

The saved date might be tricky, because that currently isn't a part of PostView, so we might need to add it as an optional field there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants