Problem/Motivation

Would be a nice feature to be able to sort the sections on the UI Kit via config.

Right now they need to be manually added to the glossary_defaults TWIG array inside of page--ui-kit.html.twig, it would be great if we could manage this array in a more intuitive way, possibly by a weighting system that would allow nesting structures with options to turn the modal off and rename the title vs. the key (which needs to match the section folder name & the template name inside of it.)

If we could save this to config and use as a variable in the page template that would clean things up nicely.

{# Create default UI Kit glossary #}
  {% set glossary_defaults = {
    'foundations': {
      'color': {
        'modal': 0,
      },
      'iconography': {},
      'typography': {
        'modal': 0,
      },
    },
    'components': {
      'accordions': {},
      'alerts': {},
      'buttons_links': {
        'title': 'Buttons & Links',
      },
      'card': {
        'title': 'Cards',
      },
      'carousel': {},
      'modal': {},
      'navigation': {},
    },
  } %}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

AaronChristian created an issue. See original summary.

eric.vvf’s picture

Assigned: Unassigned » eric.vvf

aaronchristian’s picture

Status: Needs work » Fixed

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

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

Maintainers, please credit people who helped resolve this issue.

aaronchristian’s picture

aaronchristian’s picture

Status: Fixed » Closed (fixed)