B-26364 Zooming, scrolling, and other issues#19
Conversation
rebase
d78bdbe to
32a72b7
Compare
There was a problem hiding this comment.
Most file types & sizes I've tested seem to be the same or improved but one core scenario is a bit worse. Vertical (but not horizontal) PDFs seem to default to one or two levels too zoomed in, at least is smaller windows.
After (after having saved a 90 degree rotated view):

I also see the same effect in reverse when I rotate a default horizontal PDF 90 degrees. It goes from appropriate zoom to one zoom level too zoomed in.
|
@ajlusk newest commit changes the nearest horizontal zoom level to 95% of the viewer space to instead be 80%. This has no effect on most of the files that already display well (worst case they'll be one step away from optimized where the zoom steps mean less), but ensures a bit of margin shows for docs that are taller/wider. The zoom won't change on rotation, so you still may see the entire horizontal space taken when rotating a portrait pdf, but that's something that hasn't been asked for yet |
| 2.25, | ||
| 2.5, | ||
| 2.75, | ||
| 3.0, |
There was a problem hiding this comment.
Any reason this is different than the PDF options? Seems you added some values, why not all of them?
There was a problem hiding this comment.
Preface by saying that previously 200% was the zoom max for photos, so really it was just my discretion based on testing, and I could be convinced to change it
I added these just because I found them to be useful when testing smaller images with text. While we could bring it in line with PDFs and allow up to 500% zoom, I don't know that it would really be an added benefit because any text on images small enough to need that kind of zoom would be pretty illegible anyways. Happy to discuss further though
This all looks good. Not expecting it to adjust zoom on rotation but it is adjusting zoom on saving a rotation so that's nice. |






B-26364
Important
This backlog is a downstream dependency on Alex's PR for version 1.4.7 HERE
These changes provide some rather significant adjustments to how we display images, as well as how pdfs appear visually. Because of this, a new minor version (1.5.0) may be appropriate. Amongst the improvements:
Testing Instructions
These changes are made based upon Alex's changes for 26359, hence the dependency. In order to best test these changes, please check out the B-26364 branch in our repository before testing.
Also, if you want to see a before and after rather than just the after, do step 3 first.
"@transcom/react-file-viewer": "git+https://github.com/transcom/react-file-viewer#B-26364-viewer-fit",in package.jsonrm -rf node_modules && yarn install && ./scripts/copy-react-file-viewer && make client_run)