Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bdylanwalker opened this issue May 6, 2019 · 1 comment

Comments

@bdylanwalker
Copy link

bdylanwalker commented May 6, 2019

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.

@sghoweri
Copy link
Contributor

sghoweri commented May 7, 2019

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants