bpatrik / pigallery2

A fast directory-first photo gallery website, with rich UI, optimized for running on low resource servers (especially on raspberry pi)
http://bpatrik.github.io/pigallery2/
MIT License
1.75k stars 202 forks source link

buttons in picture mode on iOS iPadOS not working #493

Open Byggerat opened 2 years ago

Byggerat commented 2 years ago

Describe the bug

I really like this application! I noticed, however, that when opening a picture from a gallery through Safari or Firefox on iOS or iPadOS, the buttons seem not to work (see attached screenshot). Therefore, e.g. I cannot go back to my gallery easily, show picture information or go fullscreen.

edit: I experience same behaviour on the pigallery2-demo-page.

Screenshots (optional)

IMG_2022-05-24T09-30-10

Environment (please complete the following information):

Used app version: 2022-05-24 09_38_54-Window

4gra commented 1 year ago

Found a semi-reliable workaround for this on iOS safari: zoom in on the image, then zoom fully out again using the usual "pinch" gestures, then quickly press the desired lightbox button.

(Edit: appreciate this is just a workaround while the fix is being worked on, but I wondered if it shed some light on the issue somehow - to me it smells a bit like an iOS or framework bug, really.)

bpatrik commented 1 year ago

probably related to #525

edit: Ahh its already linked. my bad

bpatrik commented 1 year ago

Is this still an issue with the latest nightly? You can just try it on https://pigallery2.onrender.com/. I could not reproduce it.

ps: you can just swipe up to close the photo.

edrikk commented 1 year ago

Is this still an issue with the latest nightly? You can just try it on https://pigallery2.onrender.com/. I could not reproduce it.

ps: you can just swipe up to close the photo.

Hi @bpatrik Yes I can confirm that it is still an issue in latest nightly. Running in docker hosted on Debian.

PS. Your demo gallery does work. However my dicker instance doesn’t (similar to others here)

edit: on an iPhone (ios 16.2) - swipe up does work however of course.

edrikk commented 1 year ago

@bpatrik I have found a potential clue.

I don’t have any top level images in my gallery, all pictures are at least one folder level deep.

In your demo gallery, the pictures at the top level have working buttons for me. However clicking into your second level (long name folder), the images at that level’s buttons no longer function.

bpatrik commented 1 year ago

I had a look and somehow the navigation bar (with the directory path) has the issue. When it contains a link the buttons stop working in the image view.

edrikk commented 1 year ago

Awesome! Just tried and the fix confirmed working.

Now that the menu buttons are functional, I notice that the items under the hamburger menu don’t seem to function. For example clicking on the Download does not invoke the image to be downloaded. The other items as well.

like before this appears to only be an issue one level down.

bpatrik commented 1 year ago

https://github.com/bpatrik/pigallery2/commit/48a1900fc668ea3d7a6c513cc1e100e4059014d5 should fix this issue.

Can someone double check it?

edrikk commented 1 year ago

Confirmed working here on iOS 16.2 Thank you!

4gra commented 1 year ago

Assuming the fix will be in the nightly image tomorrow, I'll report back then.

bpatrik commented 1 year ago

It's already in nightly. (The name is misleading it builds within 30-50 mins)

-- Sorry for being brief, sent from my phone.

On Sun, 18 Dec 2022, 21:16 Graham, @.***> wrote:

Assuming the fix will be in the nightly image tomorrow, I'll report back then.

— Reply to this email directly, view it on GitHub https://github.com/bpatrik/pigallery2/issues/493#issuecomment-1356867576, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZKA5R2BXQ4TI7M3JNEZCLWN5WKRANCNFSM5WYR75DA . You are receiving this because you were mentioned.Message ID: @.***>

4gra commented 1 year ago

Yes, it works! Thanks for your perseverance.

(Though, now I can use it on iOS again I've got an enhancement request to restore the download button to the top level of the lightbox, sorry... :))

bpatrik commented 1 year ago

Great!

Please open a Feature request for moving the button back for debate. So I can close this one. Generally I want to keep the absolute necessary buttons on the top level and hide the others. Other big galleries also hide the download button. An option would be to make it configureable, but I won't have the time to invest in that direction now.

Byggerat commented 1 year ago

thanks for your work you put into this @bpatrik ! I really appreciate this!

any chance of having this fix pushed to the latest image or as a new version (e.g. bpatrik/pigallery2:latest resp. bpatrik/pigallery2:1.9.4)? or what tag should I use in order to be able to update my docker-image (currently 1.9.3)? I'm not well versed in docker and wouldn't know how to build a docker image myself based on cloning a repo.

mrtnbr commented 1 year ago

thanks for your work you put into this @bpatrik ! I really appreciate this!

any chance of having this fix pushed to the latest image or as a new version (e.g. bpatrik/pigallery2:latest resp. bpatrik/pigallery2:1.9.4)? or what tag should I use in order to be able to update my docker-image (currently 1.9.3)? I'm not well versed in docker and wouldn't know how to build a docker image myself based on cloning a repo.

bpatrik/pigallery2:nightly-debian-buster on dockerhub is built on the fly (I think). However, these images seem to be broken at the moment, probably due to work on the config stuff (#569)

edrikk commented 1 year ago

yes indeed... throwing error repeatedly. Given that /app/demo/* are the defaults, it's almost as if the docker paths aren't being taken into account...

Node.js v18.12.1

node:internal/fs/utils:348 throw err; ^ Error: ENOENT: no such file or directory, mkdir '/app/demo/tmp' at Object.mkdirSync (node:fs:1395:3) at ProjectPathClass.reset (/app/src/backend/ProjectPath.js:30:16) at new ProjectPathClass (/app/src/backend/ProjectPath.js:9:14) at Object. (/app/src/backend/ProjectPath.js:34:23) at Module._compile (node:internal/modules/cjs/loader:1159:14) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) at Module.load (node:internal/modules/cjs/loader:1037:32) at Module._load (node:internal/modules/cjs/loader:878:12) at Module.require (node:internal/modules/cjs/loader:1061:19) at require (node:internal/modules/cjs/helpers:103:18) {

martadinata666 commented 1 year ago

As the one that self creating docker image, Dockerfile env need some adjustment.

ENV NODE_ENV=production \
    # overrides only the default value of the settings (the actualy value can be overwritten through config.json)
    default-Server-Database-dbFolder=/app/data/db \
    default-Server-Media-folder=/app/data/images \
    default-Server-Media-tempFolder=/app/data/tmp \
    # flagging dockerized environemnt
    PI_DOCKER=true

Update the docker env to new one from last manpage commit manpage, Override via compose file environments will do.

Database-dbFolder=/app/data/db \
Media-folder=/app/data/images \
Media-tempFolder=/app/data/tmp \

This maybe prone to chage, last few commits seems overhaul configuration. But weird thing is the config.json not override the env settings, where it should be.

bpatrik commented 1 year ago

Thanks for finding this. The last commit should fix the image.

If I remember correctly config are applied the following order:

  1. default from .ts file
  2. default from ENV
  3. default from cli switches
  4. value from .ts file
  5. value from config.json
  6. value from ENV
  7. value from cli switches

So it is WAI that config.json does not override the ENV settings. The configuration library understands the difference between default value and actual value (so the UI can show if a value was changed)

I added some context about the config change in https://github.com/bpatrik/pigallery2/issues/569#issuecomment-1369544469

@Byggerat I plan to make a new release soon, but not yet sure when see #568

moneycoat commented 1 year ago

@bpatrik

Hi looks like there is still an issue with the Full Screen control with Photo files. I’m able to replicate it on the Demo page as well. Videos work fine to Full Screen. The control seems to toggle back and forth being highlighted.

I’m on 16.2.