镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.
This repository was archived by the owner on May 13, 2026. It is now read-only.

PatternData ksort combined with NavItemsExporter array indexes squashes components menu items together #173

Open

Description

@bdylanwalker

I have two components button and button-box. Buttons are what they sounds like. Button boxes are made up of a title, text, and button. I'm using the Gesso Drupal 8 theme which includes pattern lab, so these components are stored in directories named button and button-box under _patterns/03-components. When PL creates the navigation menu it puts all of the button components in the button box menu item. This is because the result of the ksort puts button and button-box before the component files stored in those directories. During the navigation export all the button components appear to be related to the button-box pattern. The result of the sort looks like this:

button
button-box
button-box/_button-box.scss
button-box/button-box.twig
button-box/button-box.yml
button/_button.scss
button/button.twig
button/button.yml

I can fix it by renaming the button directory to buttons, but I've run into a couple of other component names given by designers that are causing this problem so I'd like a better solution.

Activity

  1. sghoweri commented on May 7, 2019

    @sghoweri
    Contributor

    I’d need to look more closely into this (specifically the clue in your issue title) but from experiencing this firsthand I know EXACTLY which bug you are seeing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions