Enhance report overview
This PR enhances the admin/moderators report overview by
- adding a view that shows recent reports and the action done (Item Deleted or not)
- adding a statistics view (Who reports and who is the originator of a reported item)
- a once 'reviewed report can be deleted retrospectively
- let podsmins show the originator even /after/ a reported item was deleted
- links to the originator profile directly (and not to the Search view)
Heads up! It needs a migration! Two fields are added: a 'action' textfield that is used to describe what happened to the report. Its free text, but filled based on the action. The second fields holds the diaspora_handel for the originator. This is needed because after deleting a report this information is gone.
What is the outcome? A Podmin now has more insights in old reports and in most reporter and most originators. A valuable base for more decisions what to do.
Future List of reports grows without limits - a paginated view would be nice, but that was currently above my skill level.
Screenshots
(Added date time)

( deleted or reviewed reports)

(statistics with links to the authors / originators)

Comments, Ideas, critics... welcome!
This Feature was requested in this discussion: https://discourse.diasporafoundation.org/t/better-abilities-for-podmins-for-spam-analytics-and-controls/3896/6 and on this Issue: #8222
It is also IMHO a pre-work and touches issue #7847 "handling fake accounts / forward to pod".
Hey! This is very needed, thank you for working on this. I'm going to try it and do a review, but two quick remarks:
- I guess the reports only appear in the "Reviewed" tab if they have been reviewed, meaning they have been either "marked as reviewed" or "deleted". That means a boolean "deleted" or if you prefer an enum ["ignored", "deleted"] should be enough to be stored in the database, instead of a free text field. Strings displayed in the interface shouldn't be stored in the DB, it makes them untranslatable, and is bad practice anyway
- Originator isn't clear to me. Why not using "Author" as everywhere else?
The Images in the first comment are not matching the text.
- Originator isn't clear to me. Why not using "Author" as everywhere else?
"Reporter" and "Author" then - I missed this.
Do you mean to use the Database' ENUM type? Like the Idea.
Do you mean to use the Database' ENUM type? Like the Idea.
I mean your mockup gave the impression that "No action" was the text stored in the database. This must be avoided, the state (deleted or ignored) has to be stored in the DB, then the UI will display a label depending of the state.
@Flaburgan Can you make a re-Review? I have abstracted the action - text from database to UI.
Wouldn't it be more convenient to open the github "Reviewers" - section?
@Flaburgan Can you make a re-Review? I have abstracted the action - text from database to UI.
I was actually doing it right now :smile:
@Flaburgan I rebased this on Enhance Report Form
@Flaburgan , @SuperTux88 Besides the (old and already existing) issues in Linter and Rubocop, is there anything which blocks a review?
https://github.com/diaspora/diaspora/pull/8035 is adding tests on that part of the code so we said we should merge it first, but it's blocked by some weird Jasmine flickering tests. If you want to help there you're welcome!
@Flaburgan I rebased this to your #8035 and fixed most of my issues here.
So because the report modal got merged, I rebased this MR, squashed the commits and fixed the front-end pronto problems. There are still a lot of them but I'd like help to resolve those. I did not even run the code yet, I will obviously try this and polish the UI as we said in the other PR.
@SuperTux88 about the remark you made about the design now that multi lines reports are possible.
It looks fine (the design isn't broken) but we are losing the line break:
Is there anything else you want me to check on the front-end side?