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

Implement downvote modes #1022

Merged
merged 11 commits into from
Sep 9, 2024
Merged

Implement downvote modes #1022

merged 11 commits into from
Sep 9, 2024

Conversation

BentiGorlich
Copy link
Member

This PR introduces downvote modes:

  • Enabled (default)
  • Hidden: you can downvote and it is used to determine the score of threads and comments, but you cannot see the amount of downvotes anymore
  • Disabled: downvotes are disabeld and don't change the score. Incoming downvotes from remote instances are ignored
Enabled Hidden Disabled
grafik grafik grafik

Thanks for @thepaperpilot for doing the majority of the work. This effectively replaces #723

Closes #482

@BentiGorlich BentiGorlich added enhancement New feature or request backend Backend related issues and pull requests labels Aug 12, 2024
@BentiGorlich BentiGorlich added this to the v1.8.0 milestone Aug 12, 2024
@BentiGorlich BentiGorlich self-assigned this Aug 12, 2024
thepaperpilot and others added 5 commits August 13, 2024 00:49
- convert the string constants to using an enum
- fix the default value
- make the settings dropdown mark the correct value as selected
- ignore incoming dislike messages when the downvotes are disabled
- hide the reduce activity when downvotes are not enabled
- throw exception in the VoteController instead of adjusting the backend -> should be catched at the top most entry point
- API controllers throw exceptions depending on the downvote mode
- Add the downvote mode to the `InstanceDetailsApi` so apps can check the downvote mode
- completely disable the downvoting of posts and post comments, as we do not support that
@BentiGorlich
Copy link
Member Author

What I did not implement is an AP representation of the downvote mode. I could add that, but I am not so sure that it would add any value. It surely wouldn't hurt either though

@melroy89
Copy link
Member

Ow this is server wide.. uhm ok.

@BentiGorlich
Copy link
Member Author

Yes this is an instance setting

@BentiGorlich
Copy link
Member Author

I'd want hold this until after the 1.7.1 release

@melroy89
Copy link
Member

melroy89 commented Aug 19, 2024

I'd want hold this until after the 1.7.1 release

owh? Are you afraid of breaking changes or?

@BentiGorlich
Copy link
Member Author

I mean we are at rc3 for 1.7.1 there shouldn't be new features anymore, just bugfixes. But if you disagree, then we can include this as well :)

@melroy89
Copy link
Member

I mean we are at rc3 for 1.7.1 there shouldn't be new features anymore, just bugfixes. But if you disagree, then we can include this as well :)

Nah I'm fine. Let's wait for this in 1.8.0 or something.

@melroy89
Copy link
Member

Don't forget to update the .env template files with the new option.

@BentiGorlich BentiGorlich enabled auto-merge (squash) September 9, 2024 20:38
@BentiGorlich BentiGorlich merged commit 511971b into main Sep 9, 2024
7 checks passed
@BentiGorlich BentiGorlich deleted the new/downvote-modes branch September 9, 2024 20:40
@melroy89
Copy link
Member

Don't forget to update the .env template files with the new option.

I believe you still forgot to add mbin_downvotes_mode to the .env template files...?

@melroy89

This comment was marked as outdated.

@melroy89
Copy link
Member

This is only when I press the down vote button on a comment (upvoting still works).

Nevermind, I don't know what is happening. It also happened before your commit. I suspect some kind of Redis cache issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make downvotes optional
3 participants