Various new features and improvements (Drupal 11, a11y and others)

Created on 7 August 2024, 4 months ago
Updated 19 September 2024, 3 months ago

Problem/Motivation

views_auto_refresh currently misses quite a few features that we needed for some of our websites.

Here is what we implemented in this issue MR:

- Allow displaying a button to enable/disable auto-refresh.
- If above button is displayed, allow auto-refresh to be disabled by default for a manual start.
- Allow displaying a button for an immediate refresh of the view.
- Allow custom labels for auto-refresh and immediate refresh buttons
- Allow disabling auto-refresh if not on the first page of a paginated view.
- Allow restoring focus on last selected element after a view refresh.
- Allow stopping auto-refresh when focus is set in view content using keyboard (Accessibility).
- Allow disabling Ajax "scroll to top" on view refresh.
- Allow also displaying the auto-refresh and instant refresh buttons in the footer of the view.
- Drupal 11 compatibility.

Proposed resolution

Check MR.

Here is the new configuration screen:

Remaining tasks

Review and validate MR.

User interface changes

New configuration options and two new buttons allowing to disable auto-refresh and force an instant refresh.

If these new features and improvements cannot be merged for whatever reason, we will create a friendly fork of this module to keep things going, hoping to be able to merge everything back in the future.

Testing on Drupal 11

To test on Drupal 11, add to composer.json repositories section the following:

  "repositories": [
    {
      "type": "vcs",
      "url": "https://git.drupalcode.org/issue/views_auto_refresh-3466586.git"
    },

and then run:

composer require drupal/views_auto_refresh:dev-3466586-various-new-features

You might need to have to exclude views_auto_refresh from Drupal repository:

        {
            "type": "composer",
            "url": "https://packages.drupal.org/8",
            "exclude": ["drupal/views_auto_refresh"]
        },
✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France mably

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

Comments & Activities

Production build 0.71.5 2024