LycheeOrg / Lychee

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.
https://lycheeorg.github.io/
MIT License
3.37k stars 299 forks source link

Paginate / infinite scroll loading #251

Open alex-phillips opened 5 years ago

alex-phillips commented 5 years ago

What do you think about implementing a lazy-loading infinite scroll? I run into issues when I have an album with thousands of pictures, the initial load takes quite awhile and on mobile this is essentially unusuable. Instead, why not have the results requested in groups as you scroll and they continue to load in?

ildyria commented 5 years ago

Actually I would be interested in having the following three options available:

alex-phillips commented 5 years ago

I'd be happy to help implement

kamil4 commented 5 years ago

I'm trying to understand how infinite scroll would be better over what we have (which already uses lazy loading, but you already knew that since you implemented it :smiley:). Is the bandwidth required to fetch the album metadata from the server the limiting factor at the moment? Or is it the laying out of the pictures on the page (even if the pictures themselves are loaded lazily)?

alex-phillips commented 5 years ago

I believe it's the second one - the amount of elements we're creating on the page that still have to be rendered even though the images haven't loaded in. On mobile, with thousands of images on a single page, it can bring my device speed to a crawl.

kamil4 commented 5 years ago

If so, that will simplify the implementation as the changes can be limited to the front end :smiley:.

alex-phillips commented 5 years ago

Correct - as far as this repo goes, it will purely be additional params the API endpoints can accept and change the return data depending on them.

ildyria commented 5 years ago

That can also be easily added to Lychee v3 as we now have the more settings options so there is nothing to work on on the back end.

scratcher28 commented 5 years ago

Highly recommend you to check this out: https://github.com/schlosser/pig.js, especially its forks. If you manage to integrate it into Lychee, it would be the most advanced open-source photo management system (in many aspects). Good luck!

danger-dan commented 3 years ago

Just want to add my thoughts to this - was just about to create a duplicate ticket.

I would love an infinite scroll page using Date/Time that is separate from album view with the option to make it a default 'home page'. Ideally it would include all photos including shared ones with perhaps a toggle to not show shared photos. Essentially it would be emulating how gallery applications work on phones and the likes of google photos landing page.

I would also love to have a month/year date picker while scrolling on the side bar to quickly jump to known dates.

p.s. Thanks for the hard work. I'm loving this light weight alternative for those that don't care about facial recognition and which of my photos has a sunset in them.