Infinite scroll in core

Created on 3 April 2024, 3 months ago
Updated 4 April 2024, 3 months ago

What is the problem to solve?

I've used https://www.drupal.org/project/views_infinite_scroll β†’ on a handful of projects, it's a good module that implements a common pattern. It also works especially well with the responsive grid we added in Drupal 10.0.0, and performance is significantly improved now that views AJAX requests use GET.

This is a very small module - if we moved it directly into views, it would just be the pager plugin, a dozen or so lines of JavaScript, a template, and some AJAX response and preprocess code to remove around/refactor.

Currently has over 70,000 Drupal 8+ users in contrib, putting it on the third page of https://www.drupal.org/project/project_module?page=2 β†’

If there was a way to sort by code weight as well as usage, it would probably be top 5.

Who is this for?

Site builders.

Result: what will be the outcome?

Infinite pager becomes an option when you choose a pager in Views, without needing to install an additional module. This will let people set up common user interaction patterns easier.

While project browser will help people find modules easier, I'm not sure it helps that much for views plugins like this, feels like a single lego piece to me.

How can we know the desired result is achieved

This could be used on the recipes and articles pages in Umami - we can page 6 at a time. Obviously it would be more effective if there were more recipes.

✨ Feature request
Status

Active

Component

Idea

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @catch
  • πŸ‡¬πŸ‡§United Kingdom catch
  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    Great suggestion. And interesting metric concept "sort by code weight and usage", it could serve as inspiration and evaluation in future Drupal core inclusions?

  • πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

    Sounds good. The code weight is indeed low, it has some test coverage and the number of open issues seems manageable. Plus, it's a very useful feature to have!

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    Although infinite scroll can be detrimental to mental health it is at this stage a fundamental content presentation. So πŸ‘.

Production build 0.69.0 2024