remark42 icon indicating copy to clipboard operation
remark42 copied to clipboard

Blocking hides entire thread

Open paskal opened this issue 5 years ago • 14 comments

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 avatar Feb 08 '20 20:02 paskal

//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.

paskal avatar May 07 '20 10:05 paskal

Could you please clarify what exactly needs to be done

webkonstantin avatar May 14 '20 19:05 webkonstantin

@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.

paskal avatar May 14 '20 19:05 paskal

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.

umputun avatar May 14 '20 19:05 umputun

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

paskal avatar May 14 '20 19:05 paskal

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?

umputun avatar May 16 '20 17:05 umputun

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.

paskal avatar May 16 '20 18:05 paskal

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

umputun avatar May 16 '20 18:05 umputun

@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?

paskal avatar May 24 '20 13:05 paskal

  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

akellbl4 avatar May 24 '20 13:05 akellbl4

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.

paskal avatar May 24 '20 13:05 paskal

  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.

Mavrin avatar May 25 '20 05:05 Mavrin

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:

  • this was the simplest and cheapest solution
  • hiding on the server-side is not trivial and needs some new property of "hidden users" stored per user. This is somewhat similar to email property we currently store for each user picking email notification.
  • the hiding functionality is not that essential

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.

umputun avatar May 25 '20 16:05 umputun

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.

paskal avatar Jun 14 '20 10:06 paskal