-
Notifications
You must be signed in to change notification settings - Fork 405
Description
I am using Pattern Lab Node v3.0.3 on Windows, with Node v10.15.1, using the Twig Edition.
Expected Behavior
All patterns show on the View All page and are properly nested in their parent item in the navigation.
Actual Behavior
If a filename matches that of the parent folder, the resulting menu shows the item outside the parent folder. The same pattern does NOT show up on the View All page.
Steps to Reproduce
- Start up a fresh copy of Pattern Lab Node, using the Twig engine and Twig starter kit.
- Look at the Atoms / Buttons pattern in the menu and file system as an example.
- Notice that the Buttons item does not show in a Buttons folder (despite the file being 00-atoms/06-buttons/00-buttons.twig) and that Buttons does not show in either the main View All list or the Atoms category View All list.
- As a clearer test, create the following four files to see how the menu handles similar patterns when the parent folder does and does not match one of them:
Folder name (cats) does NOT match a pattern filename in it since it is plural
/_patterns/01-molecules/cats/cat.twig
/_patterns/01-molecules/cats/cat-special.twig
Folder name (dog) does match a pattern filename in it
/_patterns/01-molecules/dog/dog.twig
/_patterns/01-molecules/dog/dog-special.twig
The two 'cat' files behave as expected, properly nested in a 'Cats' folder. The dog items do not, with the 'dog' folder being created without a toggle to open it and 'dog special' not showing at all -- the other pattern shows outside the dog folder but does not show in the View All list (similar to the buttons example above).

