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

implement comment.number #53

Open
estebanabaroa opened this issue Feb 21, 2025 · 0 comments
Open

implement comment.number #53

estebanabaroa opened this issue Feb 21, 2025 · 0 comments

Comments

@estebanabaroa
Copy link
Member

estebanabaroa commented Feb 21, 2025

it should be a value added by the sub owner, it should be the index of the comment + 1 (so it starts at 1). it should be optional but recommended.

this number should never be used an as comment id for the following reasons:

  • this number cant be validate by the client, the sub owner can put any value in comment.number, like it could put all duplicate numbers, and then the UI seems buggy and more difficult to use
  • the sub owner could put a wrong number to trick the user into think someone replied to the wrong person
  • it might not be compatible with some other uses cases, like an ownerless sub moderated by some token holders, has nobody with authority to decide comment.number
  • it wont match the URL of the comment like c/
  • it wont be compatible with in content links, like comment.content: "this is great c/"
  • users can say "checked" using cids, they form patterns and have duplicate charaters
  • the parentComment.number might load slowly, or never load, so the parent id would never be known, or display a janky loading indicator
  • we want comment cids to be a standard of the plebbit protocol. like bittorrent has standard infohash, everyone knows what it is in all clients
  • lottery based on comment.number should be done using flairs, as most UIs display flairs, but most don't display comment cids or numbers
  • cids shouldnt be converted to digits encoding because it causes too many digits, and if you shorten the digits, it becomes easy to bruteforce any id

we might want to call it comment.sequenceNumber as well.

we should probably wait until instant replies and p2p voting is implemented so that we dont use colliding props.

another option could be also to have comment.postNumber and comment.number to also count posts.

usecases:

  • when scrolling all posts pages sorted by new, or comment.previousCid, can know how many posts are left by looking at the number
  • can display the comment number in the UI, like imageboards do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant