Skip to content

feat: Allow users to report comments#3016

Merged
arkirchner merged 14 commits into
mainfrom
ak/report_comments
Sep 30, 2025
Merged

feat: Allow users to report comments#3016
arkirchner merged 14 commits into
mainfrom
ak/report_comments

Conversation

@arkirchner

Copy link
Copy Markdown
Contributor

Comments can be used to potentially harass users who request comments. A button was added to report a message as spam.

Resolves #2715

@arkirchner arkirchner self-assigned this Jul 14, 2025
Comment thread app/controllers/request_for_comments_controller.rb
@codecov

codecov Bot commented Jul 14, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.39%. Comparing base (d248f40) to head (992301e).
⚠️ Report is 59 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3016      +/-   ##
==========================================
+ Coverage   70.24%   70.39%   +0.14%     
==========================================
  Files         215      216       +1     
  Lines        6850     6870      +20     
==========================================
+ Hits         4812     4836      +24     
+ Misses       2038     2034       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread app/models/spam_report.rb Outdated
Comment thread app/assets/javascripts/request_for_comments.js Outdated
@arkirchner arkirchner changed the base branch from main to ak/test_comment_policy July 14, 2025 14:59
@arkirchner arkirchner force-pushed the ak/report_comments branch from 0836383 to 1136443 Compare July 14, 2025 15:00
Comment thread app/views/comments/index.json.jbuilder
@arkirchner arkirchner marked this pull request as ready for review July 14, 2025 15:04
@arkirchner arkirchner requested review from MrSerth and kkoehn July 15, 2025 07:52

@kkoehn kkoehn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments and suggestions.

What do you think about moving the button to the right? It looks kind of lost down there..

Image

Comment thread config/locales/de/comment.yml Outdated
Comment thread config/locales/en/comment.yml Outdated
Comment thread app/models/spam_report.rb Outdated
@arkirchner

Copy link
Copy Markdown
Contributor Author

I have only looked at this feature from the users views. I am not sure if a teacher/admin should be able to report content? 🤔

For now I will try to adjust the view.

@arkirchner

Copy link
Copy Markdown
Contributor Author

View as a learner who commented on the RfC.
1752753535

View as a teacher/admin.
1752756116

Base automatically changed from ak/test_comment_policy to main July 17, 2025 13:35
@arkirchner arkirchner force-pushed the ak/report_comments branch from 3f74f8f to def5481 Compare July 17, 2025 14:51
@kkoehn kkoehn closed this Jul 22, 2025
@kkoehn kkoehn deleted the ak/report_comments branch July 22, 2025 20:01
@kkoehn kkoehn restored the ak/report_comments branch July 22, 2025 20:02
@kkoehn kkoehn reopened this Jul 22, 2025

@kkoehn kkoehn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just another small suggestion

Comment thread app/models/user_content_report.rb Outdated
Comment thread config/locales/de/user_content_report.yml Outdated
Comment thread config/locales/en/user_content_report.yml Outdated
Comment thread app/models/user_content_report.rb
@MrSerth MrSerth requested a review from nenock July 23, 2025 10:37
Comment thread app/models/user_content_report.rb Outdated

@kkoehn kkoehn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@arkirchner

Copy link
Copy Markdown
Contributor Author

Rebased and squashed to fix conflicts with the main branch.

Comment thread app/views/comments/index.json.jbuilder
Comment thread lib/user_content_report.rb Outdated
Comment thread lib/user_content_report.rb Outdated
Comment thread spec/lib/user_content_report_spec.rb Outdated
Comment thread spec/lib/user_content_report_spec.rb Outdated
Comment thread spec/lib/user_content_report_spec.rb
Comment thread spec/policies/comment_policy_spec.rb Outdated
Comment thread spec/system/report_request_for_comment_comments_system_spec.rb
Comment thread app/controllers/comments_controller.rb
Comment thread spec/system/report_request_for_comment_comments_system_spec.rb Outdated
Comments can be used to potentially harass users who request comments.
A button was added to report a message as inappropriate.

Resolves #2715
arkirchner and others added 8 commits September 4, 2025 09:43
Co-authored-by: Nele Sina Noack <nele.noack@hpi.de>
Co-authored-by: Nele Sina Noack <nele.noack@hpi.de>
Co-authored-by: Nele Sina Noack <nele.noack@hpi.de>
Co-authored-by: Nele Sina Noack <nele.noack@hpi.de>
Co-authored-by: Nele Sina Noack <nele.noack@hpi.de>
@arkirchner

Copy link
Copy Markdown
Contributor Author

Rebased to resolve conflict.

Comment thread spec/lib/user_content_report_spec.rb
@arkirchner arkirchner enabled auto-merge (squash) September 16, 2025 14:27
@MrSerth MrSerth disabled auto-merge September 20, 2025 09:58
@arkirchner arkirchner merged commit 8f5d0f3 into main Sep 30, 2025
15 checks passed
@arkirchner arkirchner deleted the ak/report_comments branch September 30, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RfCs: Add possibility to report abuse

5 participants