performant-software / Annotation-Studio

An online annotation platform for teaching and learning in the humanities.
http://www.annotationstudio.org
GNU General Public License v2.0
4 stars 1 forks source link

Add batch remove and select all buttons to anthology page #423

Closed camdendotlol closed 2 years ago

camdendotlol commented 2 years ago

What this PR does

This PR adds batch removal capabilities to the "All" tab on the anthology document page. This required a bit of refactoring on the view to split each page into its own form_tag.

This PR also adds Select All and Deselect All buttons to make selecting documents easier. These buttons have a click listener that runs some very basic JS.

I think the features described in #417 and #418 are now fully implemented. Closes #417, #418, #420, and #421.

https://user-images.githubusercontent.com/64725469/177616155-b7338eed-d031-44cb-b259-fa02401d4f22.mov

How to test

  1. Visit an anthology page on the staging site.
  2. Search for something that will bring up multiple pages of results (I used "dickens" in the Author field in the above video)
  3. Go to any page other than 1
  4. Select a few documents and click "Add selected"
  5. You should be correctly redirected to the same page of results
  6. Go to a different page and make sure "Select All" and "Deselect All" do what they claim to do
  7. Click "Select All" and then "Add Selected" and make sure you're correctly redirected as in step 5
  8. Click the "All" tab to see the documents in this anthology. Select some and click "Remove Selected", and they should be removed.
camdendotlol commented 2 years ago

Moved to the Accepted pipeline as it passed Steve's testing and his Zenhub isn't working.