Problem/Motivation
When you visit /admin/modules/uninstall
and search for a module machine_name, you will not find a result. The problem gets really visible, when you use modules where the module's machine_name differs from the human-readable name.
Examples in Core and Contrib:
- Database Logging (dblog)
- Chaos tools (ctools)
Especially in contrib we see more such examples, where also the module project page presents another name, as the human-readable name (see Chaos tool suite, Configuration Update Manager).
Those inconsistencies let developers (when not using drush) to filter the module list by the module's machine_name. That is working fine at the module list, because the machine_name is part of the description, but not on the uninstall page).
Steps to reproduce the problem
Different behavior between the module list and uninstall module page.
Module list
- Go to
/admin/modules
- Filter for
dblog
- You'll see the "Database Logging" module
Uninstall module
- Go to
/admin/modules/uninstall
- Filter for "dblog"
- You'll see no results
Proposed resolution
Make the filter by module machine_name working in the table at /admin/modules/uninstall
.
Tasks
- Decide, if it is a bug/feature request and/or should be fixed
- DONE. Going to add machine name into a new details element.
Decide, if we should- NO.
Show the module machine_name in the description column, or in it's own column.. Rejected because it takes up too much page space. - NO.
or include it visibility-hidden (if it would be allowed UX-wise) to only make it searchable. Presenting content to screen reader users but not to sighted users isn't inclusive design, rejected on accessibility grounds. - YES. Convert the description into a openable details element and add the machine name into it.
- Update the
system-modules-uninstall.html.twig
template.
- DONE. Add module machine name to template variables via preprocess hook.
- DONE. Document the machine name variable in template docblock.
- DONE. Convert description to a details element.
- DONE. Add details machine name column to the new details element.
- DONE. Add the show-all-columns feature.
{{ attach_library('core/drupal.tableresponsive') }}
in the form. - DONE. Make the description column responsive, by adding priority-low to match the install page.
- DONE. Copy the template to Claro and adjust css classes to align with Claro install template.
- DONE. Expand the javascript test to use the Claro theme in addition to the default, to test filtering on the new template.
User interface changes
Introduces a new machine name table column on the modules uninstall page. The machine name becomes searchable in the filter.
Make the uninstall table responsive, because the install page is already responsive.
Before
![before]()
After - original solution
![after - original]()
After - final solution
![after - new]()
API changes
None
Data model changes
None