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

Kiphaas7’s picture

I 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.

klonos’s picture

Title: Add Instant filter in D8 core. » Add Instant filter functionality in D8 core.

...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?

Kiphaas7’s picture

All 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:

  • Make it work for tables only (at least initially)
  • Figure out how to handle paged results
  • make it extensible enough to provide additional filtering (groups, other attributes) methods
  • Make it performant for filtering thousands of rows at once, on mobile.
  • Make the search field use autocomplete
  • All while keeping it accessible

Which isn't exactly an easy task.

Kiphaas7’s picture

Oh yea, another requirement: sane form submit with paged tables and a global javascript search.

klonos’s picture

While 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?

Kiphaas7’s picture

That'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 :)).

klonos’s picture

Fair enough. Goodnight ;)

Bojhan’s picture

@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.

Kiphaas7’s picture

Status: Active » Postponed

Bojhan: 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.

mbrett5062’s picture

Issue summary: View changes

If 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

mgifford’s picture

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

nod_’s picture

Status: Postponed » Closed (won't fix)
Issue tags: -JavaScript +JavaScript

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.

nod_’s picture

Status: Closed (won't fix) » Closed (duplicate)

related issue has a better defined issue summary