-
Notifications
You must be signed in to change notification settings - Fork 240
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
Indicate when story has comments you haven't read #200
Comments
Not such a bad idea - we would only need to know the last time they viewed the comments for a particular item and then just see if there are any new comments since that date. |
I think a simple way to do it would be have a list of users who have seen the comments on that item. When a new comment is added, clear the list. It's doesn't add any database calls when viewing the home page. |
i'm working on this right now. It adds the date of the latest comment and name of the latest commenter to the news item object, and sets it in the view as data items in the comment link. I'm planning to use session storage (maybe) to check that when the document loads in main.js. |
@kennethrapp wouldn't it make more sense to use localStorage? |
Probably. Since I clearly can't decide on anything I just removed storage entirely pending further discussion, since I don't know what the best solution in node would be for that. I don't want to contribute to bloat too much. It just shows the time of the latest comment. |
@sriehl editing the same array in mongodb at the same time (which would be the case any time two users viewed a story at the same time) can be tricky. Only the @chall8908 I actually think localStorage is not the right answer for this since it wouldn't translate across devices. I know that's fairly small potatoes, but I'd rather design for a multi-device world at the outset. |
update to show last comment time (for #200)
I think this was addressed, at least for the time being, by using a query string in the url to the comments page (#246). That way your browser shows the comments link as a new one if there have been new comments since your last visit. It certainly isn't a comprehensive solution, but it's simple and gets the job done. |
Maybe this is a bad idea because we have to know what everyone's seen before, but it would sure be nice.
The text was updated successfully, but these errors were encountered: