pigallery2 icon indicating copy to clipboard operation
pigallery2 copied to clipboard

buttons in picture mode on iOS iPadOS not working

Open Byggerat opened this issue 2 years ago • 19 comments

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):

  • OS: server runs in docker on openmediavault resp. Portainer.
  • Browser Safari and Firefox on iOS and iPadOS

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

Byggerat avatar May 24 '22 07:05 Byggerat

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.)

4gra avatar Nov 24 '22 12:11 4gra

probably related to #525

edit: Ahh its already linked. my bad

bpatrik avatar Nov 24 '22 19:11 bpatrik

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.

bpatrik avatar Dec 15 '22 23:12 bpatrik

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 avatar Dec 16 '22 23:12 edrikk

@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.

edrikk avatar Dec 17 '22 03:12 edrikk

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.

bpatrik avatar Dec 17 '22 10:12 bpatrik

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.

edrikk avatar Dec 17 '22 13:12 edrikk

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

Can someone double check it?

bpatrik avatar Dec 18 '22 09:12 bpatrik

Confirmed working here on iOS 16.2 Thank you!

edrikk avatar Dec 18 '22 13:12 edrikk

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

4gra avatar Dec 18 '22 20:12 4gra

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: @.***>

bpatrik avatar Dec 18 '22 21:12 bpatrik

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... :))

4gra avatar Dec 18 '22 23:12 4gra

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.

bpatrik avatar Dec 19 '22 07:12 bpatrik

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.

Byggerat avatar Jan 02 '23 15:01 Byggerat

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)

mrtnbr avatar Jan 02 '23 22:01 mrtnbr

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) {

edrikk avatar Jan 03 '23 05:01 edrikk

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.

martadinata666 avatar Jan 03 '23 05:01 martadinata666

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

bpatrik avatar Jan 03 '23 09:01 bpatrik

@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.

moneycoat avatar Jan 20 '23 00:01 moneycoat