Change sort order of configuration options on config single export form

Created on 3 November 2023, 8 months ago
Updated 25 January 2024, 5 months ago

Problem/Motivation

On the Single config export form at /admin/config/development/configuration/single/export, when looking at the Block list of Configuration options, it's sorted alphabetically by label, with the machine name in parenthesis after. For example: Help (claro_help)

Normally when you're exporting config, you know what the machine name is, but not necessarily the label. This makes it extremely difficult to find the config you need, when the list is hundreds or thousands of options long.

However, if you simply switch the order to be machine name, then label, eg. claro_help (Help) then it's easy to find the config you want.

I added a patch to core/modules/config/src/Form/ConfigSingleExportForm.php that swaps the order in the dropdown.

Steps to reproduce

  1. Log in and go to /admin/config/development/configuration/single/export
  2. Under Configuration type select Block.
  3. Open the Configuration name dropdown
  4. See the order is based on label, not machine name.

Proposed resolution

Switch the order so the machine name comes first in the label. Then it will be sorted alphabetically before display.

Remaining tasks

None.

User interface changes

Changes the order of the options in the Configuration name dropdown.

Before:

After:

API changes

None.

Data model changes

None.

Release notes snippet

None.

Feature request
Status

Fixed

Version

11.0 🔥

Component
Configuration 

Last updated about 8 hours ago

Created by

🇺🇸United States SamLerner

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024