jonaswinkler / paperless-ng

A supercharged version of paperless: scan, index and archive all your physical documents
https://paperless-ng.readthedocs.io/en/latest/
GNU General Public License v3.0
5.37k stars 355 forks source link

[Feature Request] Pop-out modal to preview documents from search / view #487

Closed jovandeginste closed 3 years ago

jovandeginste commented 3 years ago

I am often checking a number of similar documents (from the thumbnail view) to find the correct one in a search query. This means clicking on the "edit" or "open in browser" button, then on the back button if it's not the one I was searching.

This causes a number of first-world-issues (that may or may not need fixing too), such as:

I solve this by middle-clicking the preview button to open in new tabs. It also somewhat breaks immersion (for what that's worth) by opening the PDF in full view (in the browser).

I would like a way to open previews (the full PDF is okay) in a modal-style popup, which pops (partially, but mostly) over the current view / search results. Perhaps it can have "next" / "previous" links to show the next / previous document in the list.

A quick search brought this (using Bootstrap): http://dotnetqueries.com/Article/162/how-to-display-pdf-in-bootstrap-modal-popup

jonaswinkler commented 3 years ago

Very good idea!

jonaswinkler commented 3 years ago

Well, if at all, it should be a modal that spans the entire screen vertically and also darkens the background like the other modals.

I could see this working. Not sure yet.

shamoon commented 3 years ago

Well yes, popover is an alternative. Feels less proscriptive IMHO. using hover still makes it easy & useful. But yea, whatever folks think

shamoon commented 3 years ago

I know you think modal but Im actually really liking the popover implementation. Modals are just so invasive I feel like if you want to explore the document that closely just open it. You know, IMHO =)

In case you want to try this out I published a branch. Theres a delay on hover so its not always popping up unintentionally, e.g. if youre planning to click the preview button but its also very easy to access the preview as it requires 0 clicks. I also use that hover delay to 'pre-load' the content which often makes it popup seamlessly (both native viewer and pdf-viewer).

Again, GitHub has similar popover previews and I really enjoy them for similar reasons.

https://github.com/shamoon/paperless-ng/tree/feature/popover-previews (That branch isnt done but not far off I think)

https://user-images.githubusercontent.com/4887959/107131396-b9634b80-688a-11eb-9bc6-152f4f936c62.mov

jovandeginste commented 3 years ago

In case you were waiting for my opinion: I have no strong opinion here... So I'm willing to go with whatever you come up with, and iterate over that solution.

Maybe, just maybe, an option to pick the "size" of that preview pop-out (eg. small, medium, large) might help people with different workflows achieve their own goals?

shamoon commented 3 years ago

After playing with the preview in my dev version I've found myself missing it on the official one, Im sold on its usefulness.

Having a toggle for the popover size does sound useful, maybe just small vs large

jovandeginste commented 3 years ago

After playing with the preview in my dev version I've found myself missing it on the official one, Im sold on its usefulness.

Having a toggle for the popover size does sound useful, maybe just small vs large

Sure, we can probably add more later (aka iterate) if the need is really there: the hard work will be done already. And, since it's open source, I could add/change my own size-preset in my copy of the code base easily. I just have a strong preference for built-in solutions: less chance of breaking in the long run.

d8sychain commented 3 years ago

I can definitely see this being useful in my workflow. I'm using Paperless to help manage business receipts (and it's been great I might add). Some receipts are on small slips of paper, others are printed on 8.5x11 paper. Occasionally I need to go back and see the cost of a specific item real quick. IMHO the preview pop-out would help speed up this workflow.

jovandeginste commented 3 years ago

So happy to see this land! It's really nice!! Thanks!