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

Moderator Tool Improvements #767

Draft
wants to merge 380 commits into
base: develop
Choose a base branch
from

Conversation

luap42
Copy link
Member

@luap42 luap42 commented Feb 5, 2022

Some improvements to the moderator tools.
(Documentation comes soon)

@luap42 luap42 force-pushed the luap42/moderator-tools-improvements branch from c561fbc to e61ba6f Compare April 11, 2022 17:46
Comment on lines 18 to 24
<div class="widget--body">
<h4>Destroy Acccount</h4>
<p>Destroy Accounts of blatant spammers and trolls.</p>

<%= link_to 'Destroy Account', destroy_user_path(@user.id), remote: true,
method: :delete, class: 'js-destroy-user button is-danger is-filled' %>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

discuss: We should review whether we actually want this here. Destroying accounts completely is a good way to break the database, and now that we have soft-deletes it's probably not needed.

Copy link
Member

Choose a reason for hiding this comment

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

I propose to remove "destroy" for the reasons Art said.

Copy link
Member

Choose a reason for hiding this comment

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

@trichoplax if the destroy option is still there, could you remove it from the UI at least? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

It appears that the destroy button is not new, just moved from a different place in the existing user interface. There are 4 similarly named buttons that appear together in the existing user interface, but have been separated in the new user interface.

Existing delete and destroy buttons

Existing delete and destroy buttons

New Delete or Destroy Account section

New Delete or Destroy Account section

New Hungry Codidactyl (Delete, Feed to STAT) section

New Hungry Codidactyl (Delete, Feed to STAT) section

Some questions:

  1. Which of the 4 buttons are to be removed and which are to remain?
    • I'm assuming we remove "Destroy Account" (currently called "Destroy user") and keep "Delete community profile", "Delete user network-wide", and "Feed to STAT (180 days)".
  2. Should the remaining buttons be relocated?
    • I'm assuming "Delete community profile" will stay in a section of its own, since the other 2 buttons are only available to global moderators (the section could be renamed from "Delete or Destroy Account" to just "Delete Account")
    • The section name "Hungry Codidactyl (Delete, Feed to STAT)" seems incompatible with non-Codidact instances. It could instead be "Delete Network Account", and just contain 1 button, "Delete user network-wide". The button "Feed to STAT (180 days)" seems more similar to a suspension than a deletion, so perhaps it could be moved to the section "Network-wide Suspension".

Copy link
Member

Choose a reason for hiding this comment

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

  1. Yes, remove the "Destroy Account" button and keep the other three.
  2. I defer to @luap42 but I think this is right.
  3. I defer to luap42 again but yeah, that sounds better for a public platform rather than our own instance. I believe "feed to STAT" is delete+ spam-block.

@trichoplax
Copy link
Contributor

Would it be practical to split this pull request into smaller changes to allow some to be deployed and get real world feedback?

I'm wondering because of the issues that mention this pull request. Do they depend on the whole change or just smaller parts of it that might not need to wait for the rest?

@cellio
Copy link
Member

cellio commented Feb 2, 2023

@ArtOfCode- re the previous comment: do you think it would be easier to subdivide this PR or finish it? (Asking because you reviewed it in the past, so you have better insights than most other people.)

@ArtOfCode-
Copy link
Member

Probably easier to finish it - would take unnecessary work to split it up. Shouldn't need much more work, though - addressing comments and requests and fixing the conflicts. @trichoplax if you find yourself looking for any more intro to Ruby, this might be doable for you.

@trichoplax
Copy link
Contributor

trichoplax commented Feb 16, 2023

@ArtOfCode- Thanks for the suggestion. I'm going to start by trying to rebase master develop onto this branch (in the safety of my own fork), unless anyone tells me that's a bad idea (this will be my first rebase).

Taeir added 19 commits February 16, 2023 02:35
New dependencies require ruby 2.7 and rails 6.0 as minimum versions.
It seems that the update to rubocop/rails means we get some new rules.
The new rules seem to have changed their minds on how some things should
look or be done. This applies the new rules.
Also swap arguments around such that the error message upon failure
lists the right value as expected.
Also add a note in the INSTALLATION about the ruby versions that are
supported/not supported.
The only setting left in new_framework_defaults_6.0 is about updating
the cookies. If the system runs stable on rails 6, the file can be
removed and the upgrade is completed.
Rails 6.1 is more picky about the response formats, and not having the
intended html extension can cause issues.
@cellio
Copy link
Member

cellio commented Dec 5, 2024

I was going to update this from develop but apparently there are conflicts now, so that'll require some human attention.

@cellio
Copy link
Member

cellio commented Feb 11, 2025

We're starting to add some other small improvements for mods, and I don't want to conflict with work here that's coming, but also this PR is old and I don't think @luap42 wrote that documentation mentioned in the description and I've lost track of what's here. What's the easiest way to get an overview of what's here?

Copy link

codecov bot commented Mar 1, 2025

Codecov Report

Attention: Patch coverage is 38.21656% with 97 lines in your changes missing coverage. Please review.

Project coverage is 55.23%. Comparing base (cb332b0) to head (fae0628).

Files with missing lines Patch % Lines
app/controllers/users_controller.rb 20.89% 53 Missing ⚠️
app/controllers/mod_warning_controller.rb 16.66% 30 Missing ⚠️
app/models/user.rb 0.00% 7 Missing ⚠️
app/controllers/comments_controller.rb 88.46% 3 Missing ⚠️
app/controllers/admin_controller.rb 50.00% 1 Missing ⚠️
app/controllers/moderator_controller.rb 0.00% 1 Missing ⚠️
app/models/comment_thread.rb 88.88% 1 Missing ⚠️
app/models/mod_warning.rb 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #767      +/-   ##
===========================================
- Coverage    56.10%   55.23%   -0.87%     
===========================================
  Files          161      161              
  Lines         5379     5507     +128     
===========================================
+ Hits          3018     3042      +24     
- Misses        2361     2465     +104     

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

@trichoplax
Copy link
Contributor

We're starting to add some other small improvements for mods, and I don't want to conflict with work here that's coming, but also this PR is old and I don't think @luap42 wrote that documentation mentioned in the description and I've lost track of what's here. What's the easiest way to get an overview of what's here?

Sorry for taking 2 and a half weeks to reply to this. I'm back now and have brought this branch up to date with changes to the develop branch. The only conflict that required a change was for the (n messages) addition to the Moderator Tools link on the user profile page. This link no longer exists in this branch, instead being replaced with an additional tab on the user page. I've therefore added the (n messages) to the title of that tab. The screenshots below show the difference. This avoids losing that change altogether, and it can be further improved later if there are any suggestions.

On develop branch:

Screenshot 2025-03-01 at 18-23-08 DEV QPixel - User user

On this branch:

Screenshot 2025-03-01 at 18-23-45 DEV QPixel - User user

Overview of changes in this branch

Mod tools tab

The "Moderator Tools: user" page is replaced with a "Moderator Tools" tab on the user page.

On develop branch:

Screenshot 2025-03-01 at 18-43-05 DEV QPixel - Moderator Tools user

On this branch:

Screenshot 2025-03-01 at 18-43-45 DEV QPixel - Moderator Tools user

Private messages

A moderator can now send a private message to a user using the comments system, without it needing to be a warning or suspension:

Screenshot 2025-03-01 at 18-46-57 DEV QPixel - Moderator Tools user

@cellio
Copy link
Member

cellio commented Mar 2, 2025

@trichoplax thanks very much for the screenshots and overview! And sorry for inadvertently creating that conflict on the count; I completely forgot how this was arranged on this branch. I'm really looking forward to having this on main, especially the private conversations.

@trichoplax
Copy link
Contributor

@cellio Please don't apologise for adding useful new features. It's been great to see so much improving recently. Conflicts are a natural part of that. If there's a particular potential conflict that occurs to you when working on a new feature feel free to ask, but I'd prefer that you be able to just focus on your own changes - that's the beauty of branches. Now that I'm back I'll be glancing over other pull requests and mentioning anything that might be worth discussion while this one is being finalised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants