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

Positive-only voting score (optional) #260

Closed
umputun opened this issue Jan 25, 2019 · 14 comments
Closed

Positive-only voting score (optional) #260

umputun opened this issue Jan 25, 2019 · 14 comments
Milestone

Comments

@umputun
Copy link
Owner

umputun commented Jan 25, 2019

The idea is to limit the voting result to positive values only. It doesn't mean allowing +1 votes only, but to prevent the final score from being negative. In other words, API will not accept -1 vote if the score <= 0

The proposed change will be optional with some new parameters and, by default, it will be off. Actually, we can generalize it a little bit by defining MIN_SCORE param. Another thing we can do - allow such thing per post to overwrite the site's default MIN_SCORE.

I can see some practical use cases for this:

  • prevent negative scores on the comments which act as "proposals"
  • make users feel better on some sensitive topics
  • prevent a chain of downvotes "on red". I.e. some users see others downvoted the comment and tend to do the same.

Any opinions?

@umputun
Copy link
Owner Author

umputun commented Jan 25, 2019

the change will involve some (minor?) frontend changes as well:

  • change green to some neutral color
  • get rid of +/- prefix
  • make down arrow disabled on 0 score

All of this will be triggered by some PostInfio meta, similar to RO flag we support today

@umputun
Copy link
Owner Author

umputun commented Jan 25, 2019

cc @igoradamenko @Reeywhaar

@igoradamenko
Copy link
Collaborator

I think it's better not to show negative scores to everyone except an author. I mean, if anyone has score < 0, he can see it, but anybody else can't. They see only '0'. Just to prevent downvotes “on red”.

I think it's better because author can see the truth. And it's good when people can downvote if they want to. I'm not sure that we are allowed to decide who can vote and who can't. ¯_(ツ)_/¯

@umputun
Copy link
Owner Author

umputun commented Jan 25, 2019

well, the author is the one we may want to protect here :) Generally, I have nothing against the negative score, however, I can imagine use cases with an unpopular opinion gets -15 and discourage the person from commenting ever again.

Btw, I don't think this "stay positive" mode will be applicable for Tech sites. I had in mind different type of sites, for example, one discussing some controversial social issues and so on.

@Reeywhaar
Copy link
Collaborator

I've been thinking about it recently: #234 (comment)

Basically what is needed from backend is to add min-score/max-score field to /api/v1/config?site= response

@igoradamenko what will be if I downvote someone and then refresh page? There will be 0 and downvote arrow active, then what will be if I then remove downvote: there will be +1 which will be 0 again after refresh? I think main point of preventing downvote is to not alienate commenters on proposal topics, so author must not see real score.

@umputun
Copy link
Owner Author

umputun commented Jan 25, 2019

Basically what is needed from backend is to add min-score/max-score field to /api/v1/config?site= response

This may not be enough as it will be all-or-nothing only. If we want to allow switching some particular posts to such "positive" mode min should be part of PostInfo

@Reeywhaar
Copy link
Collaborator

Reeywhaar commented Jan 25, 2019

@umputun or like that, but this makes things complicated. How to mark post as upvote-only? It's easy, just add button to admin section, next to "disable comments". But how to mark some posts category automatically? It can be via, idk, regex in env. There should be some settings hierarchy global->per-category->per-post then.

@umputun
Copy link
Owner Author

umputun commented Jan 25, 2019

I think the part if how to assign upvote to a group is outside of the scope for now. We can start with a simple implementation like we do for RO.

@Reeywhaar
Copy link
Collaborator

so ping then, when backend is ready

@umputun
Copy link
Owner Author

umputun commented Jan 26, 2019

added backend support, site-level for now. /config returns a new flag positive_score if this mode active.

@Reeywhaar
Copy link
Collaborator

While I'm at it, thought came through that it's also may be useful to add "like" system, where you have no downvote, only upvote.

And, with this comes another thought, since there is no downvote, there is no way to alert admin that comment abusing some policy, so would be nice to have a "report" button.

Think, is not a matter of current issue, but I'm doubt if this is not just featurism and it's worth to be own tickets?

@umputun
Copy link
Owner Author

umputun commented Jan 26, 2019

I don't like the idea of likes only, i.e. without dislikes and I think the current ticket addresses concerns I have listed above.

For the "report" button - this is something useful but certainly outside of the ticket. Currently, we don't have a way to send direct notifications in any form or shape, and the closest method for this is to generate some admin-notifications RSS and/or telegram notifications. I'm planning to implement email notifications too, but as of now, there is nothing like this in the code,

@Reeywhaar
Copy link
Collaborator

Reeywhaar commented Jan 26, 2019

With POSITIVE_SCORE=true any attempt to upvote PUT /api/v1/vote/facb6542-899a-4d2c-aa4c-1db3bccd302c?url=https://remark42.com/demo/&vote=1&site=remark HTTP/1.1 resolves in

HTTP/1.1 400 Bad Request

{"details":"can't vote for comment","error":"minimal score reached for comment facb6542-899a-4d2c-aa4c-1db3bccd302c"}

I don't see this error without POSITIVE_SCORE=true

Edit: if initial score equals 0.

Take a look when have a free time.

PS: Btw, I thought you were gonna make it on "per-post" basis, so there will be like PUT /api/v1/admin/positive_score?site=site-id&url=post-url&positive_score=1 endpoint, what changed your mind?

@umputun
Copy link
Owner Author

umputun commented Jan 26, 2019

the bug was fixed.

you were gonna make it on "per-post" basis ... what changed your mind?

Laziness, mostly ;) Eventually I'll make it post-based

umputun added a commit that referenced this issue Jan 30, 2019
Support positive score only mode
@umputun umputun closed this as completed Feb 12, 2019
@umputun umputun added this to the v1.3 milestone Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants