Problem/Motivation

Module Filter no longer sorts alphabetically on the All tab. Sorting on the All tab appears to be by Tab group first, then alphabetical.

Steps to reproduce

Install Module Filter 6 on a Drupal 11.4+ site

Proposed resolution

Correct the sorting code to ignore Tab groups on the All tab.

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

naidim created an issue. See original summary.

andres alvarez made their first commit to this issue’s fork.

andres alvarez’s picture

Version: 6.0.0 » 6.0.x-dev

andres alvarez’s picture

Confirmed the root cause. Since the server-side rendering rewrite, ModuleFilterThemeHooks::preprocessModuleFilterModulesTabs() appends modules package by package into one table and never sorts it; the previous JS implementation sorted that table by module name.

The fix sorts the rows by name (natural, case-insensitive comparison) once in preprocess. Package tabs only filter those same rows, so they keep the order. Added a Kernel test that fails without the change and passes with it.

Also checked in the browser on a site with 847 modules: without the change the All tab has 43 rows out of alphabetical order (grouped by package); with the change there are none, and the package tabs stay sorted. Before/after screenshots attached. MR opened.

andres alvarez’s picture

Status: Active » Needs review
smustgrave’s picture

This is reading like AI

andres alvarez’s picture

I've noticed that more and more modules and tools across the ecosystem are leveraging AI to streamline workflows, so it might be worth exploring how we could benefit from it here as well. Of course, I don't mean replacing human judgment or auto-generating merge requests without oversight—in my day-to-day work, I use it as an assistant and always make sure to carefully review and validate everything. What are your thoughts or current stance on incorporating AI tools into this process?

smustgrave’s picture

Based on the abuse I've been seeing on some modules and especially core I'm against it. I'm not against AI as a tool but people are using it to do the work and then claim they reviewed it (not saying you didn't here but I spend my day reviewing dozens of issues on core and it's what I see). Until people can take more responsibility I'm not for incorporating it into any process.

Lost track of the number of users I've had to refer to https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett... only a few I've had to report to the DA for spam luckily.

smustgrave’s picture

Status: Needs review » Needs work

This break most likely came from the jquery removal so we should trace it there.

  • smustgrave committed b208d383 on 6.0.x
    fix: #3627660 Regression after issue #3546338
    
    By: naidim
    By: andres...
smustgrave’s picture

Status: Needs work » Fixed

Simplified and fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.