-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature Request: Allow Display of other files in pattern docs #144
Comments
Hey @davejtoews! The ability to add tabs is available as a plugin. I don't know the status of it in the PHP version or if it's just a Node plugin. @bmuenzenmeyer, any guidance here? That said, we're in the process of revisiting how we wrangle pattern meta data, and this (or something like this) seems sensible from a syntax standpoint. @EvanLovely @bmuenzenmeyer, you would know more than me on where we're at with code tabs; any insights here? |
My plugin is node only, yes.
…On Thu, Oct 26, 2017, 10:01 PM Brad Frost ***@***.***> wrote:
Hey @davejtoews <https://github.com/davejtoews>! The ability to add tabs
is available as a plugin <https://github.com/pattern-lab/plugin-node-tab>.
I don't know the status of it in the PHP version or if it's just a Node
plugin. @bmuenzenmeyer <https://github.com/bmuenzenmeyer>, any guidance
here?
That said, we're in the process of revisiting how we wrangle pattern meta
data, and this (or something like this) seems sensible from a syntax
standpoint. @EvanLovely <https://github.com/evanlovely> @bmuenzenmeyer
<https://github.com/bmuenzenmeyer>, you would know more than me on where
we're at with code tabs; any insights here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#144 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASNw_3dSO1alISPzO3QXLr9ptr0vJU3ks5swUdugaJpZM4QDnTM>
.
|
Thanks for the info @bradfrost. I'm happy to see all the attention the PHP version is getting recently, and I'm looking forward to see what's next. |
@davejtoews does #95 match up with what you were hoping for here? Perhaps we could combine the two and look into bumping this up the list of priorities? |
@sghoweri As I currently use PatternLab, my SCSS and JS/JSX files have their own parallel patterns (atoms, molecules, organisms, etc) directories. My webpack config looks in In issue #95, @sbuckpesch suggests throwing all files for a pattern into the appropriate
I'm sure there is a solution to the transpiling/bundling, it's just not my current setup. Ideally I just want my patterns in PatternLab to be as easy to implement as possible outside of PatternLab. I know my own setup isn't universal, but I'd think we'd want to avoid building PatternLab specific architecture that doesn't translate to outside use since no one is using PatternLab just for its own sake. |
Great conversation here, thanks! I think there's a lot of flexibility needed here to set things up the way different teams operate. Some spitball thoughts here: Perhaps a smart default would be for the code tabs to automatically display files that are bundled with a pattern. So this:
Would end up displaying tabs like so: Mustache | HTML | SCSS | JS BUT! Architecturally it may not make sense for teams to cluster things like this. In my own projects, I have separate
If a file name matches the pattern filename in those config directories, those tabs would appear alongside the pattern. So if we're looking at Lastly, if none of these are defined, or if custom paths are required, we could follow the conventions @davejtoews outlined above, so:
I like the ideas of having defaults to automagically pull in files, but still give people the option to override those. Thoughts? /cc @bmuenzenmeyer @EvanLovely |
I'd like to see the config happening for |
Just a couple thoughts I wanted to add to the mix:
This second piece probably being the most important in my opinion given a lot of the hands on observations (and brick walls) we've been discovering getting our Design System up and running.
Yes, perhaps this would be more than enough for some projects / use cases of Pattern Lab, but when trying to have PL power your entire multi-site Design System, flexibility and encapsulation in how things can get configured makes a world of difference. I do agree with @EvanLovely's comment about using the frontmatter data in a pattern to set this config however there's other instances such as the one we have where even the markdown file itself won't automatically get picked up by Pattern Lab because we're naming each component's markdown file README.md to reduce duplicate / redundant files + support publishing these packages out to NPM for mass consumption: This is precisely why I think either allowing for a secondary (alt) config via a component's package.json file could make sense... or perhaps we take a page out of Babel, Stylelint or ESLint and support a .patternlabrc config -- either globally at the top level and/or at the pattern specific level. Thoughts? |
I would like to be able to attach other files to my pattern documentation. I break my SCSS and javascript files into pattern specific files. It would be nice to be able to reference these on the front end, perhaps by specifying additional files in the markdown metadata, like so:
Hopefully resulting in something like this:
The text was updated successfully, but these errors were encountered: