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

Support for adding and removing panels #42

Open
kara-todd opened this issue Aug 18, 2016 · 8 comments
Open

Support for adding and removing panels #42

kara-todd opened this issue Aug 18, 2016 · 8 comments

Comments

@kara-todd
Copy link

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.

@bradfrost
Copy link
Member

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!

@bmuenzenmeyer
Copy link
Member

Note - you may add panels in PL Node with https://github.com/pattern-lab/plugin-node-tab

@yadimon
Copy link

yadimon commented May 8, 2017

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.

@bmuenzenmeyer
Copy link
Member

Removing panels is not supported by the plugin yet, but it's been noted as an improvement opportunity.

@yadimon
Copy link

yadimon commented May 9, 2017

pr for remove ability:
#59

@bradfrost
Copy link
Member

@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

@bmuenzenmeyer
Copy link
Member

@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 !

@bradfrost
Copy link
Member

@bmuenzenmeyer Awesome sounds good! I saw you self-assigned that PR, so I'll leave you to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants