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

Softer blocking for temporary, i.e. non-permanent block should left existing comments alone #377

Closed
umputun opened this issue Jul 20, 2019 · 17 comments
Assignees
Labels
Milestone

Comments

@umputun
Copy link
Owner

umputun commented Jul 20, 2019

Currently, the temporary block doesn't remove user's comment but hides them for a given time and prevents the user from posting more. Practically, this logic seems to be too restrictive because the reason for such a temporary ban is usually a heated discussion or some other c concrete topic/conversation triggered the ban. However, it doesn't mean we have to hide/remove all previous comment from the user as they can be fine and legit.

The proposed change will not hide such comments, but won't allow the user to post more for the duration of the ban.

@umputun umputun self-assigned this Jul 20, 2019
@umputun
Copy link
Owner Author

umputun commented Jul 20, 2019

@Reeywhaar - I think there is a bug on UI side rendering blocked users. I see the blocked status returned by REST but UI seems to ignore it in some cases. It is not always - the first time (after I set the blocking status) it shows comments faded out with "blocked" badge, however page refresh shows them as a regular user/comment.It also looks like Show/Hide settings "restores" it till the next refresh.

in order to reproduce it log in as admin (dev_user) block some other user temporary and refresh the page.

@umputun umputun changed the title Softer blocking for temporary, i.e. not permanent Softer blocking for temporary, i.e. non-permanent block should left exiting comments alone Jul 21, 2019
@umputun umputun added this to the v1.4 milestone Jul 21, 2019
@umputun umputun changed the title Softer blocking for temporary, i.e. non-permanent block should left exiting comments alone Softer blocking for temporary, i.e. non-permanent block should left existing comments alone Jul 21, 2019
umputun added a commit that referenced this issue Jul 21, 2019
@Reeywhaar
Copy link
Collaborator

Reeywhaar commented Jul 22, 2019

Hm, can't reproduce it. What I see:
If I block someone comments get marked as "blocked"

image

After refresh badge changes to "deleted". which is a bug, block should take precedence over delete

If I enter as non-admin comment looks like this:
image

I don't see any bug with users been disappearing from preferences, despite I tried to block for a month/week/day. Also checked in Safari.

Upon opening preferences, there is request being made to /api/v1/admin/blocked?site=remark what does it look like when issue present?

Am I understand right that there is checkers behavior: blocking someone (looks good) -> refresh (looks bad) -> refresh (looks good)?

I see the blocked

you mean that comment has .user.block === true? Or .delete === true? Or both?

@umputun
Copy link
Owner Author

umputun commented Jul 22, 2019

blocking someone (looks good) -> refresh (looks bad) -> refresh (looks good)?

not exactly. blocking someone (looks good) -> refresh (looks bad) -> refresh (looks bad) -> more refreshes (still bad).

you mean that comment has .user.block === true? Or .delete === true? Or both?

.user.block === true only. The current master doesn't set .delete anymore (a600725) for any temporarry bans, but for permanent only.

@umputun
Copy link
Owner Author

umputun commented Jul 22, 2019

this is a small video demoing what I've seen

http://4dropz.com/qJR8maCoqARc

@umputun
Copy link
Owner Author

umputun commented Jul 22, 2019

As you see on the video - refresh breaks blocking rendering but going back to settings restores it till the next refresh

@Reeywhaar
Copy link
Collaborator

Found the problem, solution is on the way. But found another issue: last comments endpoint doesn't trim blocked users. I think it should?

@umputun
Copy link
Owner Author

umputun commented Jul 22, 2019

Do you mean temporary or permanent block? Temporary shouldn't trim anymore, only permanent should do it.

@Reeywhaar
Copy link
Collaborator

Temporary, I think it's confusing that last comments have blocked user rendered fine.

@Reeywhaar
Copy link
Collaborator

Screenshot 2019-07-23 at 01 30 02

@umputun
Copy link
Owner Author

umputun commented Jul 22, 2019

I see what you mean - we don't do faded thingy for last comment widget. Probably you right, I'll make the change to filter them out from the last comments widget.

Regrading the picture - is it you or me doing "this user was blocked"? Somehow I have expected to see the original text here unless comment marked as deleted

upd: and the original user name

@Reeywhaar
Copy link
Collaborator

"This user was blocked" will be shown to non-admin users, as well as avatar will be ghost. Also I think to remove time on the right, and deny voting for comment

@umputun
Copy link
Owner Author

umputun commented Jul 22, 2019

just to clarify - the goal of this ticket is not to delete (and not to hide) comments for temporarily blocked user, but make blocking status visible (color and blocked badge) and not allow them to interact with the system till block expired

@Reeywhaar
Copy link
Collaborator

Oh, ok, overdone it.

@umputun
Copy link
Owner Author

umputun commented Jul 22, 2019

This is the practical use case I have witnessed multiple times - a user acts like a normal human being until some "hot topic" mentioned. From this point, he started to post offensive, inappropriate, and silly comments. Before the proposed change, my actions were limited. I don't want to remove/hide his innocent comments, but want to stop the madness and (maybe) delete a few recent comments. However, the only action I was able to do was a block (hiding all comments) or manual removal (allowing him to continue).

With this change, we will able to suspend such undesired activity without extream punishment.

I hope it makes sense.

@Reeywhaar
Copy link
Collaborator

Ok, understand, so I think there is no necessity to trim last comments too

@Reeywhaar Reeywhaar mentioned this issue Jul 22, 2019
@umputun
Copy link
Owner Author

umputun commented Jul 23, 2019

it works, thank you. One minor issue/inconsistency - blocking action refreshes whatever part of the screen it needs to update, and admin may see the effect immediately. Attempt to unblock right away refreshes appropriately as well, however, if between the block and unblock actions admin does any refresh, unblocking works "quietly", i.e. without updating/refreshing the screen. Pls, note - I meant unblock by clicking a link under the user name, not on settings view.

Obviously, this is not a big deal, but it will be helpful to make it right. Let me know if you want a video demonstrating it.

@umputun
Copy link
Owner Author

umputun commented Jul 23, 2019

LGTM

@umputun umputun closed this as completed Jul 23, 2019
@umputun umputun mentioned this issue Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants