Problem/Motivation

"Search for modules" on the Browse toggles between displaying the selected filters and not displaying the selected filters each time you hit "enter" to view the results of the search. The filters selected should always be displayed.

Steps to reproduce

Spin up a site with the Project Browser module enabled. (Try it Now link on drupal.org/project/project_browser)
Log in
Select Browse from the Extend menu item in the Admin menu
Leave the default filter selected, enter a search term and hit enter. The filters will be displayed
Hit enter again and the filters are not displayed.
Hit enter a few times to understand the behavior.

Proposed resolution

Fix the behavior on the page to always display the selected filters when hitting Enter to search.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

leslieg created an issue. See original summary.

marcoliver made their first commit to this issue’s fork.

marcoliver’s picture

Status: Needs work » Needs review

FYC, here's an MR.

"Clear/recommended filters" buttons had no type attribute set, making them submit buttons by default. So they'd implicitly be "clicked" whenever the form was submitted, toggling the default filters.

lostcarpark’s picture

Needs a rebase and Svelte rebuild to fix the merge conflict.

There are some ESLint and PHPStan errors, but they don't appear to be related to this change.

I will try to rebase today, then happy to mark RTBC.

lostcarpark’s picture

I have rebased, but I noticed the compiled Svelte before wasn't minimized. After my recompile, it's minimized. Checking if there's an update to the compile procedure I've missed.

divya.sejekan’s picture

Not able to apply the patch .. error in patch

bernardm28’s picture

Tested this with DrupalPod 10.1.x, stable theme. Seems to work as expected.
Searching and hitting enter multiple times does not remove any of the search filters.
I also tested this by removing one of the default test filters. Removing the maintained filter and searching repeatedly works as expected.

bernardm28’s picture

Status: Needs review » Reviewed & tested by the community

chrisfromredfin made their first commit to this issue’s fork.

chrisfromredfin’s picture

Status: Reviewed & tested by the community » Fixed

Good find, and good quick fix!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.