styleguidekit-assets-default
styleguidekit-assets-default copied to clipboard
Support for adding and removing panels
It would be nice to have the ability to define or modify what panels appear for the code view. In my case, I'd like to have JS/CSS/HTML (but not mustache.) This is because we will be using pattern-lab to share the front-end code base with an external vendor. The vendor needs to be able understand what is required for units to render & function, but will be generating HTML server-side rather than using mustache.
My initial thought was to somehow try and hook into the panels registration through the gulp build process.
Hey @kara-todd, Yep the architecture for Pattern Lab 2 allows to extend these panels. @dmolsen would have to explain the logistics of extending these panels. I just want to let you know that your request is something that's being addressed. Thanks!
Note - you may add panels in PL Node with https://github.com/pattern-lab/plugin-node-tab
but how to remove them? Change? For example i want to add new tab: 'scss' (done over plugin) and remove it if the content is empty (no file, or empty file). Or i want to remove 'mustache' panel.
Removing panels is not supported by the plugin yet, but it's been noted as an improvement opportunity.
pr for remove ability: https://github.com/pattern-lab/styleguidekit-assets-default/pull/59
@bmuenzenmeyer should this PR go as part of this repository or the plugin? It doesn't seem like it would be bad to include it as part of styleguidekit-assets-default
@bradfrost this PR should be merged to enable future plugin enhancements (such as the one I linked above), and / or allow core Pattern Lab implementations to hide panels by default.
It's important to note that ADDING panels is something more difficult to make happen by default, because it requires pre-processing of source (hence the plugin), whereas removal is an after-the-fact hiding.
tldr; we should merge #59 !
@bmuenzenmeyer Awesome sounds good! I saw you self-assigned that PR, so I'll leave you to it.