Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #3744 Prevent views using Quickstart Exposed Filters from scrolling when checkboxes are checked #3745

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

bberndt-uaz
Copy link
Contributor

@bberndt-uaz bberndt-uaz commented Sep 27, 2024

Description

Adds an Event Subscriber to the AZ Finder module to prevent views using the Quickstart Exposed Form from automatically scrolling to the top of the view content each time a checkbox filter is checked or unchecked.

Questions

  1. Should we provide an option for this behavior in the AZ Finder settings?
    • We will not provide an option at this time. There is a drupal.org issue for this that currently "needs work": Make Views AJAX scroll to top optional. For now, we will implement the fix in this PR without adding a configurable option, since we may want to replace our fix with the Drupal core functionality in the future.

Related issues

#3744

How to test

Probo review site: https://7b5e2985-cedf-4a13-ab91-3a35916c835d--pr-3745.probo.build

  1. Compare the scrolling behavior when using filters on pages using the Finder. For example:
  2. Set up another view with Quickstart Exposed Filters and confirm that the automatic scrolling does not occur.

Types of changes

Arizona Quickstart (install profile, custom modules, custom theme)

  • Patch release changes
    • Bug fix
    • Accessibility, performance, or security improvement
    • Critical institutional link or brand change
    • Adding experimental module
    • Update experimental module
  • Minor release changes
    • New feature
    • Breaking or visual change to existing behavior
    • Upgrade experimental module to stable
    • Enable existing module by default or database update
    • Non-critical brand change
    • New internal API or API improvement with backwards compatibility
    • Risky or disruptive cleanup to comply with coding standards
    • High-risk or disruptive change (requires upgrade path, risks regression, etc.)
  • Other or unknown
    • Other or unknown

Drupal core

  • Patch release changes
    • Security update
    • Patch level release (non-security bug-fix release)
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major or minor level update
  • Other or unknown
    • Other or unknown

Drupal contrib projects

  • Patch release changes
    • Security update
    • Patch or minor level update
    • Add new module
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major level update
  • Other or unknown
    • Other or unknown

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My change requires release notes.

@bberndt-uaz bberndt-uaz added the enhancement New feature or request label Sep 27, 2024
@bberndt-uaz bberndt-uaz self-assigned this Sep 27, 2024
@bberndt-uaz bberndt-uaz marked this pull request as ready for review September 27, 2024 23:20
@bberndt-uaz bberndt-uaz requested a review from a team as a code owner September 27, 2024 23:20
@joeparsons
Copy link
Member

  1. Should we provide an option for this behavior in the AZ Finder settings?

This seems like a good idea to me, I think.

@danahertzberg
Copy link
Contributor

  1. Should we provide an option for this behavior in the AZ Finder settings?

This seems like a good idea to me, I think.

Default enabled, with the option to turn off?

@bberndt-uaz
Copy link
Contributor Author

Per discussion in the AZ Digital PR review today:

  • There is an issue for this on drupal.org that currently "needs work": Make Views AJAX scroll to top optional. For now, we will implement the fix in this PR without adding a configurable option, since we may want to replace our fix with the Drupal core functionality in the future.
  • Remaining work to do: Add an extra check in the event subscriber regarding the view having an exposed form.

@joeparsons joeparsons added bug Something isn't working patch release Issues to be included in the next patch release labels Oct 4, 2024
@joeparsons joeparsons merged commit f1f878b into main Oct 4, 2024
16 checks passed
@joeparsons joeparsons deleted the issue/3744 branch October 4, 2024 18:11
joeparsons pushed a commit that referenced this pull request Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request patch release Issues to be included in the next patch release
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Prevent views using Quickstart Exposed Filters from scrolling when checkboxes are checked
5 participants