boston-library / commonwealth-vlr-engine

Commonwealth-VLR-Engine is a Rails engine for creating Blacklight apps that provide access to content from Solr/Fedora, packaging a number of feature-rich enhancements and modifications.
Apache License 2.0
8 stars 2 forks source link

lazy load series thumbnails on Collection page #111

Open ebenenglish opened 10 months ago

ebenenglish commented 10 months ago

On the collections#show page, lazy load the series thumbnails / titles via AJAX after the page has loaded, so that this section doesn't slow down the initial page load.

(Getting the series image requires a separate Solr call, see #get_series_image_obj in CommonwealthVlrEngine::CollectionsControllerBehavior.)

For an example of a collection with a lot of series, see Leslie Jones Collection (commonwealth:2j62s484w) or Tichnor Brothers Postcard Collection (commonwealth:0p096w19r).

There should be a fallback if the user doesn't have JS enabled.