-
-
Notifications
You must be signed in to change notification settings - Fork 803
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
Lightbox pan, zoom and display mode options #1708
Lightbox pan, zoom and display mode options #1708
Conversation
This is now ready for testing. The lightbox code has been extensively refactored. Includes the following changes:
|
First, love the work that's been done on this feature request, thank you! 🙏🏾
|
- Fullscreen testing Minor UX thing, but we should probably hide the gear icon when in full screen as clicking the button does not do anything (nor are any of the options applicable when in full screen) |
If I understand this correctly, you're expecting images smaller than the resolution of the viewport to expand to fit the viewport? That would be the opposite to what I would expect. The two fit options imo should be used to constrain the maximum size of the image; it shouldn't zoom in smaller images. I'd want to hear a few more opinions before I commit to changing this behaviour. If I'm assuming incorrectly, then let me know what image size/viewport resolution you see the problem behaviour with.
Added an option for scroll mode - either zoom (default) or pan Y - with the option to temporarily switch modes while holding shift.
Fixed so that position and zoom are reset when navigating between images, and images are now shown from the top of the image for the "original" and "fit horizontally" display modes.
Fixed so that gear icon is not shown in fullscreen mode. |
I tend to agree. "Fit" should make the image fit in the viewport, but shouldn't stretch smaller images to "fill" the viewport. Also presuming you can still zoom in which will make the image bigger / cover a bigger area of the screen space. Such that if you do have a smaller image you can still zoom in after which it will fill the entire viewport.
That sounds great. Also because of the option to temporarily switch by holding shift.
Previously did a quick test (so didn't retest now). But at least on mobile when I opened the settings / gear and then went fullscreen the settings "popup" / "dropdown" was still being shown. Did you happen to fix that as well? As it was a bit weird that the settings popup was shown, while the toolbar (with the gear, play button, ..) was hidden. |
Fantastic improvements! The auto scroll to top feature works great, love the pan feature, and very clever with the shift shortcut. I can imagine that for standard photos of people, resetting the zoom makes tons of sense and is far less jarring.
Totally logical question! I am indeed asking for exactly as you described. :)
The third option (Fit to Screen - All Images) would just be a version of "Fit to Screen - Large Images Only" but one where smaller images are expanded to the viewport, maintaining aspect ratio. For some additional examples, the Adobe suite of products (Lightroom, Photoshop, etc) all share the same UX as well. |
I do not know if it has been noted yet, but there seems to be a bug where going back to the previous page in the wall mode fails to return to the last image from the previous page. It goes directly to index 0 on the previous page. It happens for both Chrome and Firefox. |
I've made the behaviour that resets the zoom during navigation an option, enabled by default. When disabled, it maintains the current zoom level and resets the position to the top of the image. |
hmm, strange.
I get the same behaviour across all devices and browsers. What confuses me, is that I have an existing instance of stash on my raspberry pi 4 (v0.9.0-20-g565064b4, hash: 565064b) where it behaves as expected. |
@WithoutPants The new toggle works great with no issues, thank you! As for the bug, @SuperEllipsis scratch what I said earlier, I wasn't going through the steps properly, that video helped and is exactly what I'm seeing as well. I can replicate as well on Windows 10 + Google Chrome, Firefox and Microsoft Edge. EDIT: I think I narrowed it down a bit. This only occurs when clicking on the image itself to navigate rather than when using the navigation arrows on the sides, a feature added in this PR. This bug also doesn't seem to present itself in the current 0.9 build of Stash. |
For me it (index becomes 0) happens both when clicking the image, but also when using the arrow keys. Also though it might work sometimes with the navigation arrows, my experience is that it differs from gallery to gallery (It seems to go to the index on the previous page corresponding to the number of images on the next page, if that makes sense). Example:
To reproduce:
Can I ask you @ALonelyJuicebox to try the steps above (just to verify) |
Thanks for the reports. I've hopefully fixed the issues traversing pages. |
I have done a bunch of tests and it seems like the backwards navigation now works as expected, thank you. I did however stumble upon another bug, also regarding navigation, but not introduces in this RP (As it appers in atleast 0.7, 0.8, and 0.9 - In my testing). This bug is about page overflow on gallery pages. How to reproduce
Note it seems to work as expected (most of the time) if you start on (open) any image on the first page and then navigate all the way to the end (with the lightbox viewer open). |
I think the intent of the original code was to only wrap around when the slideshow was running. I've changed it so that it always wraps around and in both directions (ie previous on first image/page goes to last image/page), and I've fixed the page display as reported. |
I really like the idea that it wraps around from both ends of the Wall mode 👍 and it works well for all but one case, as far as I can tell. If there is only a single page, then it simply shows a loading animation, but it wont wrap to the last image of the same page or the first image (depending on the direction). This scenario can be tested by opening any gallery and setting the number of images to be equal to or more than the total number of images (Such that there is only one page). Then trying to wrap around either ends of the page. Aside from that I really like the improvements in this PR. |
Good catch. I also noticed an issue where if the last page only has a single image, then the nav buttons would not be shown. Should be fixed now. |
Navigation between pages and images works perfectly. I decided to do a bit of testing with the pan/zoom and display modes. |
|
Moves the slideshow delay options into a popover overlay always. Adds a display mode dropdown to allow fit to screen (default), fit horizontally, and original size.
I'm looking to add scroll to zoom and drag to scroll functionality.
Resolves #1492
Resolves #1151