umputun / remark42

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

Blocking hides entire thread #593

Open paskal opened 4 years ago

paskal commented 4 years ago

Link for test.

Current view for logged in user:

image

If you hide the answer of the first reply author:

image

As you can see, complete thread is hidden. I wouldn't know about this but I see both comments from user and replies in the hidden thread in the comments section to the right on radio-t.com (example with a random comment to show the panel I've mentioned):

image
paskal commented 4 years ago

//cc @webkonstantin in a case side panel is something custom to radio-t.com and not standard functionality of remark42: it shows blocked users comment for me.

webkonstantin commented 4 years ago

Could you please clarify what exactly needs to be done

paskal commented 4 years ago

@webkonstantin I see blocked users' comments in the side panel. I think it would be better to retrieve them respecting the user's settings, e.g. without showing comments from users who are blocked for him or her.

umputun commented 4 years ago

Not sure I get it either. This is not smth UI should handle anyway as it supposed to display whatever /last call returned.

From the backed point of view blocked user doesn't necessary means comments removed. As you can see even if user blocked with some TTL we still show comments. Complete removal happens on permanent blocking only.

paskal commented 4 years ago

My bad on terminology: I wouldn’t expect to see users which I personally hidden.

umputun commented 4 years ago

ok, so to rephrase - are you saying last comments (widget?) shows a hidden user? or this is some sort of issue in the custom widget on the particular site?

paskal commented 4 years ago

Yes, side comments widget on radio-t.com shows users who I personally hid from my interface.

Seems like the reason is /last endpoint handler which doesn't check if a user is logged and doesn't check user's hide settings. If we are willing to fix that, we might want to create a separate issue to prevent scope creep I believe.

umputun commented 4 years ago

I think we don't handle hidden users on the backend at all. According to #291 this was done as UI side only thing

paskal commented 4 years ago

@Mavrin @akellbl4 could you please provide your input on that?

  1. Hiding user hides all replies to their message as well. Should we instead hide the message, but leave the answers?
  2. Hiding user still shows them in /last endpoint, which is used in radio-t.com sidebar. Should we prevent this and how?
akellbl4 commented 4 years ago
  1. Yep, I think we should keep visible replies.
  2. On radio-t.com we don’t able to do it, only if support it by client side of the site. Because it use only api, not the widget. Or if it supports on backend It will work for any client-side client
paskal commented 4 years ago

My vote for 2. is to support it on the backend, as otherwise, you can't rely on /last returning the proper amount of comments to requester. If the backend knows about users particular user hid, I could do it.

Mavrin commented 4 years ago
  1. It little confuse, when I click on hide button, it hides all user comments. I expected, that will be hidden only one comment. BTW I think we shouldn't drop all tread, Instead show comment placeholder was blocked.
  2. We can add filters or add meta info in each comment about visibility.
umputun commented 4 years ago

It little confuse, when I click on hide button, it hides all user comments. I expected, that will be hidden only one commen

The idea was to hide all comments, i.e. hide the user.

The reasons why we do it on the frontend side only and don't have any API:

My vote is for keeping it on the frontend side but not hiding replies. Regarding the widget of last comments - if we can't share the info about the hidden users across widgets I don't see it as a big issue or even an issue we really care about. Yeah, last comment widget will show hidden users, not a big deal. The goal was not to prevent anything about hidden users everywhere but reduce noise/unwanted comments. I don't think the last comment widget is what as significant source of the noise anyway.

paskal commented 4 years ago

To clarify what should be done here to whoever will pick it up:

After pushing the "Hide" button under comment now remark hides it and all other comments by that user and all replies to that user comments. Desired state: comment in question and all other comments by that user are hidden or greyed out, but replies to them are visible as usual.