umputun / remark42

comment engine
https://remark42.com
MIT License
4.84k stars 376 forks source link

Add new comments highlighting #489

Open zedxxx opened 4 years ago

zedxxx commented 4 years ago

It is a common feature when comments that was added since last visit are highlighted. It would be great if remark could do it too.

umputun commented 4 years ago

I like the idea and I think this can be done on the frontend side only. @Reeywhaar - do you see any problem with this?

StaroKep commented 4 years ago

@umputun It looks like a good idea! I can do it. How I can get info about the last user visit?

akellbl4 commented 4 years ago

@StaroKep I think you can save it local storage and check it later. @Reeywhaar what do you think?

StaroKep commented 4 years ago

@akellbl4 It's not a good idea. I can use many devices. We can get information from backend. I think it's more correct for this case.

umputun commented 4 years ago

I agree with @akellbl4 - to me, it sounds like UI-only thing. @StaroKep - sure, it won't work across multiple devices, but this is not the goal. The goal (at least for now) is to realize what's new since the user visited from the particular device.

Technically implementing "last viewed" on the server-side is not an easy task and I see no way doing it for read-only (i.e. not logged in) users at all. Even for authenticated users, it won't be easy as we don't record/track user activity and remark42 is trying to know as little as possible about users. In fact, we have no clue what the user did before and there is no place we record user's history, except the obvious parts we have to know, i.e. the actual commenting and voting.

Recently @paskal added the ability for email subscription and this functionally requires authorized users to enter and confirm email explicitly and also provides a way to clear this data. Theoretically, smth similar can be done to save the last-visited timestamp on each post, but this won't address the problem for anonymous readers and I don't think the convenience of continuity justifies relaxed privacy requirements in this case.

StaroKep commented 4 years ago

@umputun I understand. OK.