bellroy / lesswrong

Less Wrong platform
http://lesswrong.org/
Other
49 stars 23 forks source link

Implement per-user vote multiplier. Fixes #568 #576

Closed jglamine closed 8 years ago

jglamine commented 8 years ago

Admins can assign users a vote multiplier. The default value is 1. It must be an integer >= 0.

Vote multiplier effects future votes, but not past votes. If it is not 1, a user's vote multiplier shows up on their user page. All users can see everyone else's vote multiplier.

If a user has a multiplier of 0 they can still vote, but their votes do not award any karma. (let me know if you want me to change this)

There is one known issue where if your vote multiplier is changed and you go back to view an old comment which you voted on, it will appear as if the old vote includes the multiplier even though it doesn't. Re-voting and then reloading the page solves the issue. Since this is just a minor UX issue with a non-trivial fix, I don't think we should worry about it. We can always fix it later if we want to.

jglamine commented 8 years ago

This passes the manual tests.

jglamine commented 8 years ago

sidebar A user's vote multiplier is displayed in the sidebar.

jglamine commented 8 years ago

edit-multiplier Admins can see a "Vote multiplier" link. Clicking it brings them to this page.

Submitting the form redirects you to the user overview page.

wezm commented 8 years ago

Thanks for the PR, I've done some reviewing and have a few things that need to be addressed:

screen shot 2016-08-16 at 12 13 37 pm screen shot 2016-08-16 at 12 20 00 pm

jglamine commented 8 years ago

Thanks for reviewing this, that's all really helpful feedback. I'll take a look at fixing these issues in a week or so once I'm back from vacation.

My understanding is that we want the ability to give an account a multiplier of 0 in order to make their votes not count. I agree that this is strange and it might make more sense to have a voting permission toggle instead, although that would take additional development time. I think we can leave that as a future improvement.

I'll remove the captcha and try some formatting changes.

Where do you want the error message to be?

vaniver commented 8 years ago

Yeah, a main reason to have this is giving a 0 multiplier to use on accounts we want to disenfranchise.

I also think it's better UX to store votes from new users and not count them, then increasing the weight when they hit a karma threshold. This PR doesn't do that (we currently just have voting shut off for low karma accounts) but it sets it up so that's easier to implement.

jglamine commented 8 years ago

PR updated.

form error-missing error-int negetive-error sidebar

If you still see formatting issues on the form, let me know what browser you're using so I can reproduce it.

wezm commented 8 years ago

This also looks good to go now. Will also deploy tomorrow.

jglamine commented 8 years ago

Sweet!

wezm commented 8 years ago

Deployed