Implement dynamic pager ID instead of a fixed setting

Created on 30 July 2021, about 3 years ago
Updated 8 July 2024, 3 months ago

Problem/Motivation

Currently the only way to display multiple paged views on a single page is to specify pager IDs in views UI. However, some blocks containing the same view can be displayed on different pages, where each of those pages can have a different count of pagers (some of non-Views origin as well).
With layout builder chances of such an event occurring are even bigger.

Steps to reproduce

It's not a bug really but an old design that has limitations.

Proposed resolution

Get rid of the pager ID setting completely and implement a dynamic value based on the number of pagers on the current page.

Remaining tasks

  1. Implementation
  2. Test coverage
  3. Cleanup (old tests expected to fail)
  4. Update hook that'll cleanup pager ID setting from all views

User interface changes

Pager ID field in Views pager settings gone.

API changes

None expected

Data model changes

Views config schema: pager ID will no longer be needed.

Release notes snippet

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡΅πŸ‡±Poland Graber

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    Change from merge request as a patch.

  • last update over 1 year ago
    30,306 pass, 9 fail
  • First commit to issue fork.
  • Status changed to Needs work about 1 year ago
  • πŸ‡©πŸ‡ͺGermany pminf Nuremburg (Germany), formerly Dresden

    I've added an extra option to address #15 but I guess we still need to update existing views, although I've used a default option which should not break them. Not sure how to do this update.

    Setting version to next minor one for this new feature.

  • πŸ‡©πŸ‡ͺGermany ammaletu Bonn, Germany

    I'm interested in getting this finished and merged. Currently, I have a class-based block which uses the pager manager to get unique pagination IDs. This works, even if the same block is used more than once on the same page. But as soon as a views-based block is used on the same page (via Layout Builder), this breaks and they both share the same pagination.

    What is needed for this ticket to move along? An update hook initializing the new flag for all existing views?

  • πŸ‡―πŸ‡΄Jordan mohammedOdeh

    Reroll the patch to version 9.5.11

Production build 0.71.5 2024