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

Documenting Pseudo Patterns #921

Closed
bradfrost opened this issue Aug 13, 2018 · 6 comments
Closed

Documenting Pseudo Patterns #921

bradfrost opened this issue Aug 13, 2018 · 6 comments
Labels
bug 🐛 pinned 📌 Don't let stalebot clean this up

Comments

@bradfrost
Copy link
Member

I am using Pattern Lab Node 2.12.0 on Mac, with Node v7.9.0, using a Gulp Edition.

Expected Behavior

Creating a Markdown file that accompanies a pseudo pattern (i.e. creating alert~negative.md adjacent to alert~negative.json) should create accompanying documentation (such as title and description) for the negative alert pseudo-pattern.

Actual Behavior

Creating a file alert~negative.md that looks like this:

---
title: This is a negative alert 
---

Here is a negative description

Results in this output in Pattern Lab:

screenshot 2018-08-13 11 42 00

Steps to Reproduce
  1. Create a new pseudo pattern, such as button~secondary.json
  2. Create a markdown file adjacent to the pseudo pattern, such as button~secondary.md
  3. In the markdown file, create frontmatter updating the title title: This is a secondary button and description (raw markdown below the frontmatter)
  4. Rebuild Pattern Lab and view pseudo pattern.
@bmuenzenmeyer bmuenzenmeyer added bug 🐛 pinned 📌 Don't let stalebot clean this up labels Aug 13, 2018
@heitoralthmann
Copy link

I find this behaviour to be missing from patternlab-php as well. Is it okay to go and recreate the issue on that project?

@bradfrost
Copy link
Member Author

@heitoralthmann hey there! Thanks for the offer to recreate the issue. The trajectory of Pattern Lab involves bringing PL Node and PHP together, with PL Node serving as the main shell for most tasks (such as rendering the UI shell), but still kicking it over to the PHP engine to actually stitch together components. Issues like this are a good reason why we're moving down that path, lest we continue duplicating issues.

@heitoralthmann
Copy link

Hi @bradfrost! Thank for the kind explanation. I hope I may bring some good news to the table (for you or someone else landing on this topic):

Posting this issue on the Drupal Twig/#pattern-lab slack channel I got the following answers from @aleksip:

Try pattern-variation.md

And @ModulesUnraveled:

I think @aleksip is right. For some reason, the markdown files don’t support the ~. Just replace it with a regular - and you should be in business.

I hope it helps!

@bradfrost
Copy link
Member Author

Awesome thanks @heitoralthmann! I think we should create an issue on the website to document this properly.

@heitoralthmann
Copy link

@bradfrost pattern-lab/website#111 done! Do you have a suggestion as to which page this would fit best?

@bradfrost
Copy link
Member Author

Going to close this out and comment on pattern-lab/website#111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 pinned 📌 Don't let stalebot clean this up
Projects
None yet
Development

No branches or pull requests

3 participants