Closed fdw closed 3 years ago
I want this and I'm drafting the UI right now. I'm thinking about a Bulk-Edit dropdown button with all the operations listed, and popups for additional information / delete confirmations.
Bulk operations I can think of right now.
I'll also need API support for this.
I want this and I'm drafting the UI right now. I'm thinking about a Bulk-Edit dropdown button with all the operations listed, and popups for additional information / delete confirmations.
Bulk operations I can think of right now.
* Add/Remove Tags, Correspondents, Types
What I did use a lot (had that patched into paperless) was a bulk action "Remove INBOX tag" .
I'm thinking about a Bulk-Edit dropdown button with all the operations listed, and popups for additional information / delete confirmations.
That sounds very good to me. Only thing that might be obvious to you, but not to me, is that I'd add some way to select the affected documents (for example, checkboxes).
Bulk operations I can think of right now.
- Add/Remove Tags, Correspondents, Types
- Delete
- Re-assign metadata by matching rules
- Redo OCR (this will come in handy later, when OCRmyPDF is in the dev branch). This will allow users to embed OCR'ed text into existing documents directly from the front end instead of executing some management command.
That should at the least cover the basics. I can't think of anything else yet, anyway ;)
I'll also need API support for this.
That's the thing I'm curious about as well. The trivial way would be to have one PATCH
call per document, but I think bulk might be nicer. Would be a non-standard use of PATCH
though, if it contains not just the changes, but also the targets. Do you have an idea already?
I'm thinking about a Bulk-Edit dropdown button with all the operations listed, and popups for additional information / delete confirmations.
That sounds very good to me. Only thing that might be obvious to you, but not to me, is that I'd add some way to select the affected documents (for example, checkboxes).
Something like this.
Checkboxes, of course. I'd show them in the top left corner of the preview image and have them visible only on hover / when checked to keep the list clean.
Edit: I think slightly altering the color of selected items would be super nice.
Bulk operations I can think of right now.
- Add/Remove Tags, Correspondents, Types
- Delete
- Re-assign metadata by matching rules
- Redo OCR (this will come in handy later, when OCRmyPDF is in the dev branch). This will allow users to embed OCR'ed text into existing documents directly from the front end instead of executing some management command.
That should at the least cover the basics. I can't think of anything else yet, anyway ;)
I'll also need API support for this.
That's the thing I'm curious about as well. The trivial way would be to have one
PATCH
call per document, but I think bulk might be nicer. Would be a non-standard use ofPATCH
though, if it contains not just the changes, but also the targets. Do you have an idea already?
Some operations aren't simple PATCH calls, since they'd fire some process in the back end instead of assigning new model properties, so I'm thinking about a new end point /api/documents/bulkedit/
that accepts POST requests. Each request would specify a set of document id's, a task, and optional parameters. The easy tasks will block, longer tasks will use the task queue.
This is now mostly working as pictured above. The only thing left to figure out is how to display check boxes on the small and large cards.
Oh, and I need to write some test cases.
Howβs this going UI-wise? Can I help? π
Check out the feature-bulk-edit branch.
Pretty much the only thing left to do is the check boxes on the cards. No check boxes on the search results though (also uses large cards).
I've done that on the small cards already, but I'm not entirely happy.
I'd be happy for some help.
With that second thing in mind, here's what I was thinking (see gif attached). This UI slides out once an item(s) is selected and allows for more quickly doing things than the dropdown. In playing with it works pretty goodβlet me know what you think!
Here are my thoughts:
Of course, youre the boss! I will say:
Anyway, again of course your call
Hey, I am really excited what you guys are performing here I have to say!
Reading this discussion, I'd just like to add my view in case it's of interest: I actually see your points, Jonas. But I am on Michael's side when it comes to the frequency of use, as especially new users will need them a lot to structure their documents. And also once that has been done, in the second you add another category or so, the bulk mode heavily helps again! This means, I like the instant availability
keep up this great effort, thanks a lot!
Yea I know people have their own workflows. Attached is a screenshot of a smaller version (that's still pretty usable IMHO) if that makes any difference.
Is this working? Can I try that somewhere?
Yes thereβs a branch on my fork: https://github.com/shamoon/paperless-ng/tree/feature-bulk-editor (I donβt have a backend setup with the API version that includes bulk editing but the new UI component uses the same logic as your menu did so should be fine)
Alright, I see where this is useful now. Much of the editing work is just setting types tags and correspondents and that's where all the use of this feature will come from. I can see how having quick access to that will be useful.
I'm just not entirely sold on the layout yet. It's somewhat annoying on the list view when you try to select multiple items, the check boxes always move after selecting the first. Just had a look at how github does it. They replace much of the filter options with mass manipulation menus. Could we do the same?
What do you think?
Thats an interesting approach, I think it could work. In an effort to coordinate π how about I take a crack at it and let you know how it goes?
Sure thing!
The idea behind that is that filtering does not work all that well together with mass editing anyway. Filtering removes the selection from filtered items. Don't want to modify invisible items. Therefore, I don't see any immediate concerns with disabling the filters when the user starts to select things.
If that works out usability wise, I'd probably move the bulk edit functions into the filter editor as well, hook that up with the document list service to get the current selection, and maybe rename that component to something that describes the combined functionality better.
I've also considered disabling the confirmation dialogs when only very few items are selected (< 5, or something, except for delete, of course). It would be ideal if we could use the same drop downs for selecting correspondents / types / tags that we also use for filtering. That way, we need to (select) -> (click the drop down) -> (click the thing) -> (optionally confirm for large selections) and that's it.
These are just some ideas that just came to mind.
I'll have a think. I will keep it DRY by reusing the smaller components (and making them common) but I was thinking to just use a separate component, a BulkEditor
vs FitlerEditor
, I think it will end up cleaner.
Actually, yes.
You might want to pull dev
before making too many changes, some changes to the large cards.
FitlerEditor
, again. :)
Phew, yea I did 1h ago but Im moving things around so hopefully no more big changes until I have something to show you...
Seems I forgot to merge that into the feature-bulk-edit
branch, which would have been important. Anyway, I'll leave it as it is.
My branch is based off that one so should be OK.
So Im pretty happy with how this is working, needs more testing but should be close. A couple things wanted to discuss:
Let me know about tags and hopefully will have something to look at soon!
I can't quite follow.
- I implemented a mechanism where once documents are selected the menu items either get a β if every item in the list or β if only some do.
Which menu?
Do you mean:
Or
Or did you take that into consideration?
Regarding multiple tags: I can add that to the backend.
Sorry my bad, its hard to explain without a photo or something. The β/β just refers to the selected documents. Please see the short video below to illustrate (essentially works the same for correspondents / doc types just not multiple).
Inbox
since they both have it but a β next to Auto
and Test1
. Closing the menu (which "applies" the changes i.e. triggers the modal confirmation) will only apply items with a β (Test2
).Looks pretty good! I have two concerns.
Cool π
Regarding the paging issue I think the most obvious solution is to make it that when there are items selected on a different page we just hide all β / β and it becomes "β something to apply". Only other way I can think of would be to build something additional into DocumentListViewService
(probably would need to come from the API) that when given a set of selected documents returns the used tags and a count of documents within the set with that tag i.e. [{tag: "Inbox", count: 275}, {tag: "Auto", count: 121}]
, that would be enough to do β / β. But not sure if that would work performance-wise?
Im on the fence about the action on closing. At first I thought was weird but I actually think it works, especially because of the confirm dialog. It wouldn't make sense to do on clicking each item because for tags you want to wait until the user is done checking / un-checking things. Alternatives I can see would be:
Ok! I'm pretty happy with this. In practice I think just 'turning off' the β / β when "All" is chosen is a good solution. I added:
Only remaining question is about the UI for applying changes, let me know your thoughts. Or I can just create a PR and you can test it out and see how you feel?
Please make a PR.
I haven't found a way to edit several documents at once (f.e. adding a document type or a tag to all of them). This would be very helpful, especially after importing or migrating a large number of documents.