Skip to content

Resolve "Delete/archive forum post"

Anton Ballmaier requested to merge 1646-delete-archive-forum-post into master

What does this MR do?

This MR adds a region option that allows forum moderators to hide and restore posts. A detailed description can be found in #1646.

How confident are you it won't break things if deployed?

This does only affect regions for which this setting is enabled. Therefor, this can be tested in certain regions. In case there are any issues I didn't catch, they can be found before causing issues in sensitive regions.

How to test

Relevant users can be userbot (bot without moderation privilege), userorga, user2 (regular user) and usermoderation1 (GOALS moderator).

  • Try Enabling and disabing the option for "Göttingen" in the regions admin page
  • Try hiding and restoring posts with different roles
  • Try toggling the display of hidden posts

Screenshots (if applicable)

Click to expand image

image

image

image

image

image

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • set a "for:" label to indicate who will be affected by this change
  • set the "API change" label if changes in the API are not backward compatible
  • added to the next milestone (see https://gitlab.com/foodsharing-dev/foodsharing/-/milestones, unless it has a "for:Dev" label)
  • added an entry to CHANGELOG.md
  • added a short text in the release notes to /release-notes/YYYY-MM.md
  • Once your MR has been merged, you are responsible to create a testing issue in the Beta Testing forum: https://foodsharing.de/region?bid=734&sub=forum. Please change the MRs label to "state:Beta testing".
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...) how this change can be tested.
    • Be aware, that also non technical people should understand.

TODOs:

  • Add <Info> explaining the feature
  • Make region option editable using region admin page
  • Add may hide flag sent with threads
  • Add hide / archive / delete button if allowed to archive (using eye-slash as icon)
  • Figure out, how to save archived posts
  • Figure out, how to save archived threads
  • Add tables to save post archivations
  • Make sure archived posts dont show up anywhere
  • Display hidden posts properly
  • Add the option to restore them
  • Add a toggle so that you don't have to see hidden posts
  • Handle last_post properly
  • Handle deletion in thread containing (then) only hidden posts
  • Handle hiding in threads containing (then) only archived posts
  • Adjust text that explains the GOALS moderation teams privileges (based on region settings?)
  • Move all texts to translations
  • Remove bells for hidden posts

Follow-up TODOs

  • Allow hiding entire threads
  • Automatically hiding a thread if no more non-hidden posts are included
  • Discuss criteria for regions whose moderators are allowed to hide posts. Automize instead of more work for AG AG anlegen
  • Actually deleting hidden posts from the db at some point
  • Add display of current setting in region / group options (After !2833 (merged) to avoid conflicts)
Edited by Anton Ballmaier

Merge request reports