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

Comments review improvements #2809

Merged
merged 16 commits into from
Apr 11, 2019
Merged

Conversation

dharizza
Copy link
Contributor

@dharizza dharizza commented Jan 25, 2019

User story

As a DKAN site manager or editor, I'd like the ability to moderate comments in effective and user-friendly ways (including previewing the comment, and being able to quickly bulk-delete spam, or bulk-label feedback), so that I can prevent being overwhelmed by spam comments.

As part of this work we:

  • Added new module dkan_comments as part of DKAN and added views_data_export as a new dependency.
  • Removed feedback content type from list of workbench dkan content types.
  • Add 'archived' option to publishing option of node comments.
  • Fixed 'Published comments' tab to only display published comments.
  • Created new comments UI that includes a tab for published comments (admin/content/comment), unpublished comments (admin/content/comment/approval) and archived comments (admin/content/comment/archive), the default comment view was disabled in favour of this new one.
  • The comment body is now displayed in the comment UI so admin does not have to open the comment to view the contents.
  • Added views_data_export module to allow exporting of comments (according to its publishing status).

QA Steps

  • Run dktl make to get all the new dependencies. Then install your site and enable the new dkan_comments module.
  • Go to an already published feedback node (check at the Merge process notes) and as an authenticated user (no need to have any special permissions) post a comment to it.
    • The post should be published inmmediately.
    • You shouldn't be able to access admin/content/comment
  • Go to an already published feedback node (check at the Merge process notes) and as an anonymous user post a comment to it.
    • The post shouldn't be published, instead you should get a message saying it will be reviewed by an administrator.
    • You shouldn't be able to access admin/content/comment
  • As user with permission to administer comments, go to the node page and see all the comments there:
    • those which are unpublished should have a red background and a link to approve (click here will publish the comment) and archive (they will still be unpublished but will not show up in the unapproved comments UI).
    • those which are archived will still be shown in the page but just for users with permissions to see unpublished content, they should be shown with a red background and a link to unarchive in case the archiving action was a mistake.
    • those which are published will be shown as they have always been shown.
  • As a user with permission to administer comments, go to Content -> Comments (admin/content/comment)
    • you should get a list of approved comments
    • in the bulk operations list you should get now a new option for bulk-archive comments (this will unpublish those comments and set them as archived which will make them appear in their own tab on comments UI),
    • at the bottom of the comments list, you should get a button to download a CSV file with the list of approved comments filtered as you wanted.
  • As a user with permission to administer comments, go to Content -> Comments -> Unapproved comments (admin/content/comment/approval):
    • you should get a list of unpublished comments that are not archived (that means, comments that haven't been moderated)
    • the tab title should include the amount of unpublished and unarchived comments,
    • in the bulk operations list you should get now a new option for bulk-archive comments (this will set those comments as archived which will make them appear in their own tab on comments UI and disappear from the Unapproved comments tab),
    • at the bottom of the comments list, you should get a button to download a CSV file with the list of unapproved comments filtered as you wanted.
  • As a user with permission to administer comments, go to Content -> Comments -> Archived comments (admin/content/comment/archived),
    • you should get a list of archived comments,
    • the tab title should include the amount of archived comments,
    • in the bulk operations list you should get now a new option for bulk-unarchive comments (this will turn off the archived field, which will make them appear in the Unapproved comments tab again, ready to be moderated), also there should be a "Delete" option, to delete comments as needed,
    • at the bottom of the comments list, you should get a button to download a CSV file with the list of archived comments filtered as you wanted.

Merge process

dkan_feedback:
    download:
      type: git 
      url: https://github.com/NuCivic/dkan_feedback.git
      branch: feedback-improvements
    type: module

Then run dktl make, accept to download the dkan dependencies and to build docroot again, after that run dktl drush en dkan_feedback dkan_comments -y.

connects NuCivic/healthdata#1105

@janette
Copy link
Member

janette commented Jan 31, 2019

  • Let's restrict the text areas on comments and feedback to plain text only, no markdown options
  • Can we just drop user avatars all together, if not lets get a default image for these dumb things
  • Not sure we need the 'Change value' VBO option for comments
  • I think comments are only supposed to be enabled on feedback...

@janette janette assigned dafeder and unassigned janette Jan 31, 2019
@dharizza
Copy link
Contributor Author

dharizza commented Feb 6, 2019

This is ready to be tested.

@janette
Copy link
Member

janette commented Apr 11, 2019

Moving dkan_comments to the dkan_feedback repo for now to avoid having to wait for the 1.17 release.

@janette janette force-pushed the 1105-feedback-review-improvements branch from 587de55 to 5fb3308 Compare April 11, 2019 19:02
@janette janette merged commit 7e0e0b3 into 7.x-1.x Apr 11, 2019
@janette janette deleted the 1105-feedback-review-improvements branch April 11, 2019 19:22
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.

None yet

4 participants