pattern-lab / website

Pattern Lab's website: patternlab.io
http://patternlab.io
57 stars 33 forks source link

Pseudo-pattern ordering #110

Open heitoralthmann opened 5 years ago

heitoralthmann commented 5 years ago

Had a hard time trying to adjust the order the variations get displayed on the screen.

My first attempt was to do something like:

- pattern.twig
- pattern.yml
- 01-pattern~variation2.yml
- 02-pattern~variation3.yml
- 03-pattern~variation1.yml

Even though it reordered the variations on the screen I'd lose all the pattern data set on the variation.

Only after spending some good time on researching was that I ran across https://github.com/pattern-lab/patternlab-php/issues/103 to find out that the correct way of doing this is this:

- pattern.twig
- pattern.yml
- pattern~01-variation2.yml
- pattern~02-variation3.yml
- pattern~03-variation1.yml

The thing here is that I couldn't find anywhere in the documentation something like "how to reorder pseudo-partterns".

The pages that felt most like having an answer was Reorganizing Patterns and Using Pseudo-Patterns, but none of those show how to do this.

Before going and editing the docs, I'd like to ask for advice as to where would be the best page to add such instructions?

If this piece of information is available somewhere else I couldn't find, please pardon me and close this issue.

Thank you.

bradfrost commented 5 years ago

Hey @heitoralthmann, Thanks for your comment. I'd say this content would go best on the Reorganizing Patterns page with a cross-link to the Pseudo-Patterns page.

Thanks!