'Show more' stepped/incremental option

Created on 10 June 2021, over 3 years ago
Updated 4 May 2023, over 1 year ago

I have a facet I use for years for a publication, going from 1902 to present year 2021. I show the years with a soft-limit of 5 from most recent descending with a show more link.

2021
2020
2019
2018
2017
show more

When show more is used, it suddenly shows all 100+ years, which is a bit unwieldy.

Is it possible to add an option to allow the 'show more' link to add another 5 years, then another 5, then another 5 - in a stepped, incremental way?

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States w01f

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.

  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    We're in the need of this also and will work on this.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update over 1 year ago
    406 pass, 3 fail
  • πŸ‡§πŸ‡ͺBelgium steven.d

    Created a patch for this that allows you to select 'Step' amount (using the same values of the soft limit) in a facet's settings.
    Every interaction with the show more link will reveal additional items equal to the step setting.
    When all items are revealed, interacting with the show less link will hide all items over the soft limit (going back to the initial state).

  • Status changed to Needs work over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    Thank you for finishing our patch @steven.d, it seems I forgot to update the tests. This still needs works.

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

    This would be a great feature. I found this issue because I have a very similar use case. Did you solve it?

  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    @potassiumchloride the patch includes the functionality but tests needs updates to allow this to be committed.

Production build 0.71.5 2024