Problem/Motivation
The module listing filter only surfaces name matches from open category buckets.

When a category bucket is closed, modules that match the name filter are not surfaced.

The end user is left with the impression that no modules matched their filter query.
The visibility of a module in the list should not be a criteria for it to be included in a filtered search. The reason a user employes filtering is so that they don't have to scan the list of available modules. If they must first scan the list and make sure that the category that contains the module they want to find is open, then the point of filter is undermined.
Proposed resolution
Surface any module that matches the filter query, regardless of the open state of it's containing category.
Open any closed category buckets that contain a matching module while a filter query is active. Close the category buckets that had been closed before a filter was applied after a filter is removed.
Remaining tasks
Propose a patch.
User interface changes
Filtering will be more useful and match a user's mental model for how a search is supposed to work.
API changes
None.
Related Issues
#2058321: Move the 'place block' UI into the block listing
Original report by jessebeach
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | core-js-module-search-2060573-24.patch | 1.58 KB | stefank |
| #21 | core-js-module-search-2060573-21.patch | 1.57 KB | stefank |
| #19 | core-js-module-search-2060573-19.patch | 1.89 KB | nod_ |
Comments
Comment #1
tim.plunkettThere are code comments and incorrect code implying this was always intended. It's just that .show() doesn't work for details.
Comment #2
jessebeach commentedI've added some code to remember what details regions were closed before filtering started, so they can be returned to a closed state after filtering is removed.
Comment #3
tim.plunkettThat is slick. I manually tested, it works great.
Comment #4
jibran+1 RTBC
Comment #5
nod_+1 as well
Comment #6
wim leersNice :)
Comment #7
webchickI just tested the steps in the OP on simplytest.me (after testing locally and seeing the same thing) on the modules page, but didn't see the reported behaviour. If I collapse "core" and search for "actions" it still says "No results found." Did I do something wrong?
Comment #8
webchickThis is the link I clicked to test: http://simplytest.me/project/drupal/8.x?patch[]=https://drupal.org/files...
Comment #9
tim.plunkettI'm surprised that happened with simplytest, but your browser could still be caching the old JS.

If you're using Chrome, the web dev tools (console, firebug, whatever you call it) has an option to disable the JS cache
When doing this, the patch works as intended.
Comment #10
webchickOk, to clarify what I was seeing, this behaviour is broken in Firefox (using latest 23.0 release on OS X). It works fine in Safari in Chrome, though.
Comment #11
nod_problems on FF were because of the collapsible polyfill kind of thing we're using for details. It uses jQuery to set
style="display:none"or block instead of using theopenattribute like it's supposed to.patch gets rid of the animations for details and use
opento say what's visible or not when it's useful.Comment #12
nod_forgot to remove a line.
Comment #13
webchickAwesome, that fixed my problem! Can't really speak to the JS changes though, so leaving at needs review.
Comment #14
webchickHm, still a bit of weirdness. I'll try to explain.
1. Collapse "Core"
2. Mis-type "actions" as "acrions".
3. All of the stuff below the search box goes away (as expected; there's no "acrions" module).
4. Backspace to just "ac" in order to correct the typo.
Expected: Core + "Actions" should appear below the search box. Actual: nothing happens.
Interestingly, if you backspace all the way back to just "a", things start appearing in the table again. Weird.
I'm not 100% sure if this is coming from this patch though or a pre-existing behaviour, so not marking "needs work" yet.
Comment #15
nod_fixed the undocumented "feature" from #14.
Attached a quick & dirty interdiff, sue me :p
Comment #16
nod_Postponed #2056089: UI problems on the Modules/Extend page on this one.
Comment #17
wim leers#15: core-js-module-search-2060573-15.patch queued for re-testing.
Comment #18
wim leers#15: core-js-module-search-2060573-15.patch queued for re-testing.
Comment #19
nod_Comment #20
mgifford8 months.. Not surprisingly it doesn't seem to want to apply.
Comment #21
stefank commentedRe-roll of #19.
Comment #22
stefank commentedComment #23
nod_small nitpick, indent missing from .removeAttr() and .attr() other than that it's good to go, thanks!
Comment #24
stefank commentedIndent fixed. Thanks
Comment #25
nod_Made the original patchand all but we're starved for reviewers so RTBC. Still works as intended.( edit ) apologies, I didn't make the original patch, tim and jesse did.
Comment #26
alexpottCommitted 0a66db1 and pushed to 8.x. Thanks!