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

EPIC: Implement Improved Pattern Metadata Parsing #376

Closed
6 of 11 tasks
bmuenzenmeyer opened this issue Jun 30, 2016 · 9 comments
Closed
6 of 11 tasks

EPIC: Implement Improved Pattern Metadata Parsing #376

bmuenzenmeyer opened this issue Jun 30, 2016 · 9 comments
Labels
enhancement ✨ EPIC! ⚔️ pinned 📌 Don't let stalebot clean this up
Milestone

Comments

@bmuenzenmeyer
Copy link
Member

bmuenzenmeyer commented Jun 30, 2016

Implement the following per pattern-lab/the-spec#16

  • parse state out of a pattern's .md Front Matter and map to a pattern's patternState proprerty
  • remove setPatternState() from pattern_assembler
  • parse order out of a pattern's .md Front Matter and use to override any file order prior to rendering
  • parse title out of a pattern's .md Front Matter and use to override the filename
  • parse additional keys ouf of a pattern's .md Front Matter
  • display additional keys inside {{patternDescAdditions}} -- moved to ExtraOutput in data
  • parse hidden out of a pattern's .md Front Matter and use to hide pattern from all direct individual or subtype rendering similar to _underscoredPattern.mustache today. These patterns should still be include-able as partials
  • parse excludeFromStyleguide noviewall (or a better name) out of a pattern's .md Front Matter and use to omit pattern from all rendering
  • parse tags out of a pattern's .md Front Matter and ... ??? (available in a future search enhancement?)
  • parse links out of a pattern's .md Front Matter and display in a future are of the front-end
  • unit test coverage
@bmuenzenmeyer bmuenzenmeyer added this to the 2.X milestone Jun 30, 2016
@bmuenzenmeyer bmuenzenmeyer self-assigned this Jun 30, 2016
@bmuenzenmeyer bmuenzenmeyer modified the milestones: 2.X.X, 2.1.X Jun 30, 2016
bmuenzenmeyer added a commit that referenced this issue Jul 1, 2016
 - all existing tests pass
 - patternState and many other keys are now parsed out of pattern.md
- supports pseudopatterns too

#376
@bmuenzenmeyer bmuenzenmeyer modified the milestones: 2.4.0, 2.X.X Jul 29, 2016
@bmuenzenmeyer bmuenzenmeyer removed their assignment Aug 27, 2016
bmuenzenmeyer added a commit that referenced this issue Nov 25, 2016
unit tests to coverage scenario
support is only for patterns at this time, not type / subtype documentation / directories

part of #376
@tburny
Copy link

tburny commented Jan 30, 2017

What is the state of this?

@bmuenzenmeyer
Copy link
Member Author

The above list is still accurate, with my taking potshots at different items every so often. As you can see, there is some diminishing returns as you get down the list, as we haven't fully realized a usage of some metadata - but things like order and state were no-brainers because they removed metadata from the filename itself. You can say the same about hidden, whih is the next we should tackle.

@jdagerot
Copy link
Contributor

According to the discussion on gitter we could have a discussion about if the code should store all frontmatter keys no matter of the keynames and values, or really just parse a few.

I believe it would be much more flexible to just store the whole parsed markdown object into the pattern, so everyone easily can implement their own keys.

I made a pull request about this #676

@EvanLovely
Copy link
Member

I've implemented several of these over in the PHP version here: pattern-lab/patternlab-php-core#137

For the -button.mustache behavior which removes it from View All, but not menu, it was called noviewall in the code so that's the name I went with instead of excludeFromStyleguide, so I'll suggest that for here. I'm totally happy to add that as an extra one (i.e. could do excludeFromStyleguide: true or noviewall: true) if you'd like.

@EvanLovely
Copy link
Member

PS I've set it so order gets passed in from MD files, but it doesn't reorder patterns on the PHP side until this is done: pattern-lab/patternlab-php-core#138

@EvanLovely
Copy link
Member

PPS I'm passing through tags and links just as you are so we're ready to implement those whenever.

@bmuenzenmeyer
Copy link
Member Author

@EvanLovely

For the -button.mustache behavior which removes it from View All, but not menu, it was called noviewall in the code so that's the name I went with instead of excludeFromStyleguide, so I'll suggest that for here. I'm totally happy to add that as an extra one (i.e. could do excludeFromStyleguide: true or noviewall: true) if you'd like.

updated my issue, thanks. You can see it's a bit WIP.

PPS I'm passing through tags and links just as you are so we're ready to implement those whenever.

we could consider making these first class citizens, not hanging them off of extraOutput like https://gist.github.com/bmuenzenmeyer/fb51a07a5089422ee0b1aa036714b996 illustrates, since we are pretty certain we will be doing something with them.

@stale
Copy link

stale bot commented Dec 16, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the needs response label Dec 16, 2017
@bmuenzenmeyer bmuenzenmeyer added the pinned 📌 Don't let stalebot clean this up label Dec 18, 2017
@stale stale bot removed the needs response label Dec 18, 2017
@stale
Copy link

stale bot commented Mar 9, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the needs response label Mar 9, 2018
@stale stale bot closed this as completed Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ EPIC! ⚔️ pinned 📌 Don't let stalebot clean this up
Projects
None yet
Development

No branches or pull requests

4 participants