One of the issues in Module Filter's issue queue is #1023252: UI should utilize Drupal 7 core more - new 7.x-2.x branch? and in that issue there was some discussion that it we should consider standardizing the filtering used in the modules page by implementing a re-usable mechanism across various admin pages. This way we'd have less duplication of code and more UI consistency.
I know that we have #1475204: [META] Provide a generic search/filter UI interface pattern for listing pages and all, but it doesn't seem to be moving on for months now. #538904: D8UX: Redesign Modules Page needs to happen though and we seem to have a perfect fit for one of its tasks...
There's the Instant Filter project. As it already states in the project's page it was born to address #396478: Searchable modules page since that one didn't make it in D7. How about we move Instant Filter in D8 core or at least re-write & implement its functionality for D8?
Let's do this now so we can move on with making #538904: D8UX: Redesign Modules Page actually happen and perhaps latter on we can improve things by implementing whatever comes out of #1475204: [META] Provide a generic search/filter UI interface pattern for listing pages.
Comments
Comment #1
Kiphaas7 CreditAttribution: Kiphaas7 commentedI worked on the project, and for now it's not viable for mobile with > 100 table rows (not uncommon for module page). Initial filtering takes more than a second on mobile where it just completely freezes. Furthermore, the API is a mess. MOstly because I tried to make it work for non-table content, which became quite a closet monster.
Performance can be heavily increased by using virtual scrolling, but that has its own set of problems (accessibility, page height because table rows can have various heights - which changes on resize).
Module filter, last time I checked it (which is a while ago so correct me if necessary!), uses ajax calls to get search listings. That's not ideal IMHO, because a) you're making potentially a lot of ajax calls, b) each ajax call is the same as calling the modules page, which basically means a total refresh of your modules cache.
A fix that might be interesting for instant Filter would be using a documentFragment to make all the changes and swap the entire table content on each filter action. This is basically the same what module filter does as soon as it gets it ajax content.
Comment #2
klonos...fair enough. How about that then? Or are you suggesting that the whole way things are done in the module is a wrong approach to the issue and that it's not worth fixing things?
Comment #3
Kiphaas7 CreditAttribution: Kiphaas7 commentedAll I'm saying is that I don't think either approaches, module filter or instant filter, are something worthy of including in core, at this point.
Furthermore, pagers are a whole new can of worms. If a table has a pager, and I fill in something in a search field, surely I expect it to be a global search (meaning I should also get results from page 2,3 etc). But javascript can't find that out from the DOM tree, because it's paginated... Meaning it needs some sort of ajax call, or a huge variable at page load which contains all the info about all the results.
Lastly, the filter loop (figuring out which results to show, and actually showing them) needs to be heavily optimized to make it work for mobile.
Personally I'd favor a javascript based solution, with the following requirements:
Which isn't exactly an easy task.
Comment #4
Kiphaas7 CreditAttribution: Kiphaas7 commentedOh yea, another requirement: sane form submit with paged tables and a global javascript search.
Comment #5
klonosWhile I honestly understand the technical implications and that what you describe are features of the perfect solution, you'll have to admit that what we currently have is a total mess when it comes to consistency and is far from extensible, accessible and mobile-oriented. We failed to improve it for D7 and I'm afraid that going for the "Holly Grail" solution will lead us to no improvement for D8 either. So, why not go with something that works acceptably now and improve on it as we go?
Comment #6
Kiphaas7 CreditAttribution: Kiphaas7 commentedThat's part of the figuring out process. However, deciding what is and what isn't acceptable first should lead to a much more painless patch acceptance.
In other words, get some replies from regular core contributors who have an affinity with javascript. Sun for example, because he posted in a previous topic, nod_ and seutje because they are the javascript maintainers (if I'm not mistaken), and a whole bunch of other people who are js ninjas but whose names I temporarily forgot (it's late, and I want to go to bed :)).
Comment #7
klonosFair enough. Goodnight ;)
Comment #8
Bojhan CreditAttribution: Bojhan commented@klonos, Kiphaas7 No offense, but you guys are so unproductive on this. I've mentioned we are open to doing this, in the past but instant filter never came to fruition. I suggest you either get in contact with nod_, seutje about this, and open up a patch or just close this issue. There is no reason to have side-issue nr. 213 on the module page redesign, because it isn't moving.
Comment #9
Kiphaas7 CreditAttribution: Kiphaas7 commentedBojhan: thats basically what I said in #6. It never came to fruition because of technical issues and no clear path forward, as mentioned in #1 and #3. Having a clear path forward is extremely important for having an acceptable technical implementation of a javascript based filtering tool (again, #1, #3).
Agreed this is unproductive. Postponing because of #8.
Comment #10
mbrett5062 CreditAttribution: mbrett5062 commentedIf this is still a valid feature request I believe the boat has sailed for 8.0.x and this should be bumped to either 8.1.x or even 9.0.x
Comment #11
mgiffordComment #20
nod_I don't see a compelling use-case for core to provide this outside of core interfaces (which are all a little different and require all slightly different code). as far as core interfaces are concerned I haven't seen this pop up in a long time, closing preventively. Ping me if you think it should be reopened.
Comment #21
nod_related issue has a better defined issue summary