Skip to content

Change admin moderations manager#4717

Merged
mrcasals merged 3 commits intomasterfrom
Change-admin-moderations-manager
Jan 4, 2019
Merged

Change admin moderations manager#4717
mrcasals merged 3 commits intomasterfrom
Change-admin-moderations-manager

Conversation

@aitorlb
Copy link
Copy Markdown
Contributor

@aitorlb aitorlb commented Dec 26, 2018

🎩 What? Why?

The Moderations dashboard, where the admin manages items that have been reported (i.e. spam), has a rather cryptic behaviour:

  • There are two actions possible: unreport and hide. When something is hidden, it goes to the Hidden tab and once it's there, the only action possible is unreport, which moves the moderation back to the Not Hidden tab. But because the unreport command deletes the report_count to zero, the moderation cannot be hidden again, because reports are what store the hidden_at value, nor it can be eliminated, because there's no option for it.
  • I've refactored the code so that a hidden moderation can be unhidden with a new unhide action. Reversing the hidden state is interesting not only to give the admin the freedom to do so, but because a moderation that has many reports (3 by default) is automatically hidden, which could be undesired. Also, the unhide command doesn't update the report_count to zero (as unreport did) because it really makes no sense to lose that information; it maybe made sense before that the unreport action was being used in practice to allow admins to unhide moderations in the Hidden tab. Finally, as now admin can hide/unhide moderations at will and report_count doesn't reset, it made more sense that the unreport action would allow the admin to get rid of a moderation altogether.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • Add tests

📷 Screenshots (optional)

Moderations Not Hidden Tab

unreport_mod
hide_mod

Moderations Hidden Tab (before)

unreport_hidden

Moderations Hidden Tab (after)

unhide_hid

@ghost ghost assigned aitorlb Dec 26, 2018
@ghost ghost added the status: WIP label Dec 26, 2018
@aitorlb aitorlb changed the title Refactor admin moderations and add test Refactor admin moderations manager Dec 26, 2018
@aitorlb aitorlb changed the title Refactor admin moderations manager Change admin moderations manager Dec 26, 2018
@mrcasals mrcasals merged commit 22c617a into master Jan 4, 2019
@mrcasals mrcasals deleted the Change-admin-moderations-manager branch January 4, 2019 11:16
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.

2 participants