Add a shortcut to unapprove a comment for consistency and usability

Created on 1 September 2011, almost 13 years ago
Updated 18 June 2023, 12 months ago

Problem/Motivation

Comments currently include a shortcut link which allows privileged users to quickly publish them. This is especially useful if comments are configured to default to unpublished, awaiting the approval of an administrator or site moderator. However, there's no equivalent shortcut to unpublish a comment which would be useful in the opposite case (comments are published by default and spam/inappropriate comments are unpublished by moderators).

This is also an inconsistency which would be a DX improvements: having a path to unpublish comments in tests, adding a views field which provides an unpublish link, etc.

Finally, much of the current administration wording refers to "approving" comments which, in reality, is simply changing the comment's publish status. This wording should be updated on the back end to "publish" which is consistent throughout core and pairs better with "unpublish" vs. "unapprove".

Proposed resolution

Add unpublish equivalents to the current publish functionality.

Remaining tasks

Needs review and change notice.

User interface changes

All administration text referring to "approving" a comment has been changed to "publishing", user-facing text has been left alone as it is still accurate (they are waiting for their comment to be approved). The Comment Approval Queue is now titled the Comment Unpublished Queue and has moved from '/admin/content/comment/approval' to '/admin/content/comment/unpublished'. The path for publishing a comment has moved from '/comment/{comment}/approve' to '/comment/{comment}/publish' and a new path for unpublishing a comment has been added at '/comment/{comment}/unpublish'.

API changes

A new route has been added for unpublishing a comment has been added at '/comment/{comment}/unpublish'. Additionally, the existing route for publishing a comment has had its path changed from '/comment/{comment}/approve' to '/comment/{comment}/publish' for consistency. The entity access operation has changed from 'approve' to 'publish' and the comment administration overview form $type argument now accepts either 'unpublished' or 'new' vs. 'approval' or 'new'.

Original report by droplet

On the frontend it has a way to approve a comment but no way to undo it.

Suggest add AJAX-action to approve & unapproved them

Feature request
Status

Needs work

Version

11.0 🔥

Component
Comment 

Last updated 3 days ago

Created by

🇭🇰Hong Kong droplet

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs screenshots

    The change alters the user interface, so before and after screenshots should be added to document the UI change. Make sure to capture the relevant region only. Use a tool such as Aviary on Windows or Skitch on Mac OS X.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024