Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Currently the filter box in module list page(admin/modules) supports module name, not the machine name. For example, locale.module's name is 'Interface Translation' and no way to know this name without checking .info.yml
Proposed resolution
Allow to search by module machine name.
Remaining tasks
- Discuss
- Issue patch
- Test
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Reroll the patch if it no longer applies. | Instructions | ||
Update the issue summary noting if allowed during the beta | Instructions |
User interface changes
N/A
API changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#11 | 2149053-filter-module-machine_name-11.patch | 955 bytes | vijaycs85 |
#11 | Screen Shot 2013-12-12 at 19.56.34.png | 41.51 KB | vijaycs85 |
#11 | 2149053-diff-3-11.txt | 757 bytes | vijaycs85 |
#9 | Screen Shot 2013-12-12 at 19.35.13.png | 25.51 KB | swentel |
#3 | 2149053-diff-1-3.txt | 928 bytes | vijaycs85 |
Comments
Comment #1
vijaycs85Initial patch...
Comment #2
swentel CreditAttribution: swentel commentedYou can just use $key instead of having todo the array_pop.
Comment #3
vijaycs85Thanks for the review @swentel. here is the update...
Comment #4
swentel CreditAttribution: swentel commentedI love it.
Comment #5
vijaycs85Comment #6
vijaycs85Comment #7
catchSorry this could do with a screenshot for reviewers, also tagging usability.
Comment #8
LewisNymanWhy can't the filter just parse the machine name as well as the module name? This feels like the kind of functionality that should 'just work'.
Comment #9
swentel CreditAttribution: swentel commented@Lewis - I don't get your question. The filter works by searching for 'table-filter-text-source' class and the patch adds it to the machine name column.
Added screenshot with the 'locale' example which you can't find currently, but with the patch you can. Still good to go imo.
Comment #10
LewisNymanAh I see, the way it was described in the summary made it sound like it was a UI option.
You know the visually hidden class means the machine is read to screen readers? Is that the intent?
Comment #11
vijaycs85Thanks for the update @LewisNyman, No, I didn't know the existence of '.hidden'. Updating the patch. Checked locally and confirmed that the result is still the same on browser.
Comment #12
swentel CreditAttribution: swentel commentedOoh, good to know that too, RTBC now for real :)
Comment #13
xjm11: 2149053-filter-module-machine_name-11.patch queued for re-testing.
Comment #14
webchickNice, so there is no UI impact, but if you happen to know the machine name you can search by it. This sounds really useful.
However, I'm not sure about the implementation, since it essentially shoves a hidden label of information in to the checkbox field like that, because it conflicts with the heading on that column (hidden from the UI but visible to screenreaders): (source core/modules/system/lib/Drupal/system/Form/ModulesListForm.php:)
So what about just making it an actual column, but hiding it from the table like you've already done here? Then a module like e.g. devel could always toggle the CSS hidden class off and expose this info.
Comment #15
swentel CreditAttribution: swentel commentedHmm, that would mean we'd get a 'Show row weights' automatically if we use the technique of hiding a table column. That would clutter the interface IMO, so I think this is really the best technique to use.
This patch used the same technique as on the simpletest overview page, so I think we're good no ?
Comment #16
YesCT CreditAttribution: YesCT commentedI was going to open a separate issue to make both the testing search and the module search have an actual column that devel could choose to show, but I couldn't find the similar code for the testing search.
I looked for something
hidden
and
table-filter-text-source
in
core/modules/simpletest/simpletest.theme.inc
Comment #17
LewisNymanWhat are the actionable points here? It seems like we were very close. Are we going to add the column here or create a follow up.
Comment #18
YesCT CreditAttribution: YesCT commentedneeds a beta evaluation. adding instructions to the summary. Maybe this is a usability task and not a feature request?
Comment #19
YesCT CreditAttribution: YesCT commentedComment #20
lokapujyaFixed by #2409579: Allow to enter the machine name in the module filter