WordPress.org

Making WordPress.org

Opened 3 years ago

Last modified 4 weeks ago

#1965 new enhancement

Improve spam/unspam/approve/unapprove

Reported by: Ipstenu Owned by:
Milestone: Q1 Priority: high
Component: Support Forums Keywords: has-patch
Cc:

Description

Currently if you spam or unspam (or approve/unapprove) a post, you go to a new page in the same window that handles the process.

  1. We need that to be ajax if possible. If not (which is understandable) can it default open in a new window?
  2. We need some message that says what you just did. Right now you can't tell until you check the mod options

Attachments (1)

1965.patch (4.7 KB) - added by Clorith 4 weeks ago.

Download all attachments as: .zip

Change History (9)

#1 @Ipstenu
3 years ago

FYI, this is generally only an issue on the spam/pending views. Since there, we click 'approve' and end up losing our place in line. So the workaround is this:

  • See pending. Right-click Approve (or spam) and open in new window
  • Close new window
  • Refresh

It's not terrible but it's not great. Lower priority IMO.

(Also I'm not worried about two people pending/unpending the same posts. That was always an issue)

#2 @Ipstenu
3 years ago

Related. We need more distinct flagging of moderated posts/topics

  • Unapproved and spammed topics should say so when previewing
  • "this post/reply is hidden from view' - like we do with plugin!!
  • Flagged users have a flag or make the 'unflag' thing red - more obvious. Name in red?

Also spamed replies and archived are both red, while pending are light yellow. The following colors might be more helpful, based on the color cues we use for plugins:

  • Keep spam red -- red == closed
  • Make archive purple (or yellow) -- yellow is for 2 years sans updates, so 'old'
  • Make pending blue -- blue is for 'needs approval' :)

#3 follow-up: @Clorith
3 years ago

Also, these are all toggles, which means if two people are looking at say the pending queue and both approve a post, it is now un-approved.

Last edited 3 years ago by Clorith (previous) (diff)

#4 in reply to: ↑ 3 @SergeyBiryukov
3 years ago

Replying to Clorith:

Also, these are all toggles, which means if two people are looking at say the pending queue and both approve a post, it is now un-approved.

Moved to a separate ticket: #2418

This ticket was mentioned in Slack in #forums by clorith. View the logs.


21 months ago

#6 @Clorith
21 months ago

  • Priority changed from normal to high

Few things are as frustrating as forgetting to open in a new tab when going through these lists, let's get this sorted out sooner rather than later.

Low hanging, but great QOL improvement for our mods.

#7 @tellyworth
11 months ago

  • Milestone set to Q1

@Clorith
4 weeks ago

#8 @Clorith
4 weeks ago

  • Keywords has-patch added

1965.patch Tries to tackle the various aspects considered in the original ticket description.

It makes use of the bbpress body class filter to add singular bbPress view class for targeting the spam and pending views only (as this makes little sense to use in a regular thread elsewhere). I also opened a ticket to have this done in bbPress at some point in the future, at which point the filter adding will gracefully degrade, and not add duplicates.

I made some conscious decisions on some of the displays and how it was implemented, which have some drawbacks, but for the most part are beneficial.

The JavaScript to fire the request is just doing a GET request to the regular link address, this saves us having to build a lot of ajax-ready nonces for the page all the time.
If the request fails, the post blinks and a notice saying the request could not be completed is prepended to the message body.

If the actions is completed, the post also blinks, and then shows a message stating the action (spam, pending or archival) was changed for the post. It does keep the "header" that shows what post/topic it was, in case you hit the wrong button it's then much easier to open the thread in a new tab (this was done since there's no direct ajax action, and thus we can't dynamically update the admin links).

Removing the post content is made so that it's easier to work you way through the view and have things, for the most part, go away once it's handled.

As for why it states the status was changed, this is because the approve/unapprove spam/unspam etc all have the same class reference, nothing distinguishes the two states for our targeting, so this was the better approach.

Note: See TracTickets for help on using tickets.