Radiokot / photoprism-android-client

📸 A convenient Android gallery for your PhotoPrism library with plenty of useful features
https://radiokot.com.ua/p/photoprism-android-gallery
GNU General Public License v3.0
422 stars 31 forks source link

Scrollbar Behaviour #90

Closed dfoxg closed 1 year ago

dfoxg commented 1 year ago

What is wrong? The scroll bar has currently a weird behaviour, which shows in two use cases:

Screenshots If applicable, add screenshots to help explain your problem.

Device (please complete the following information):

dfoxg commented 1 year ago

https://github.com/Radiokot/photoprism-android-client/assets/28670365/a553feeb-7740-46bc-8559-53a4278228d3

ippocratis commented 1 year ago

when using the scroll bar to scrolling into a date, all images in the future relative to the scrolled date aren't visible. You have to do a new scroll to get to those images.

https://github.com/Radiokot/photoprism-android-client/issues/53

https://github.com/Radiokot/photoprism-android-client/discussions/54

Radiokot commented 1 year ago

Thanks, @ippocratis , I have nothing to add here 😌

dfoxg commented 1 year ago

Sorry, i don't get why this got closed. I got it, that my third point is already answered as won't fix (thanks for linking that one @ippocratis ) but the other two points are still open, aren't they?

ippocratis commented 1 year ago

@dfoxg

  • the bar isn't visible always, at least on my phone it's really tricky to access it

True the bar is not always visible it only appears after you start sliding it , but it doesn't need to be visible to start sliding it, just touch the side of your screen and start gliding your finger down.

  • I got one picture from 2004 in my library, the other images are from 2015+. The scroll bar takes the half of my screen to navigate through my library, even there are no images

In my case I have pics all the way down to 2002 in my library some years have significantly more photos than others. As far as I understant the app takes the more old photo and the more recent photo and seperates the side of the screen evenly not taking accound the number of pics each year contains. I guess it has to do with how the kotlin module used for this function handles the timeline , idk Oleg can obviously explain how it works better and if it's doable to change it's behavior.

Radiokot commented 1 year ago

@dfoxg The main thing to understand about the scrollbar on the gallery screen is that it is not really a scroll bar, but rather a control to quickly jump to a specific month. The gallery has no idea how many photos you have and how they are distributed in time. Only the newest and the oldest dates for the search query are loaded, and the scroll steps (month bubbles) are created for each month no matter how many photos there are or if there are any at all. This is why the scroll handle can't follow you as you scroll, and so it looks really wrong when always kept visible. This is also the reason why in your case it has steps for all the months from 2004 to 2015. It is also not possible to scroll up from a specific month, by design. It looks doable, but tricky. Michael, the PhotoPrism main developer, said they are going to add the proper timeline implementation, so I'd rather wait for them to do it than tweak the current gallery implementation.

dfoxg commented 1 year ago

Now it makes sence, thanks for the deep dive!