-
Notifications
You must be signed in to change notification settings - Fork 405
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 configuring a default pattern in config.json #270
Conversation
Oooo, interesting. I definitely like the idea and remember it coming up before. The one thing to take note of is that by altering files like I've done it before and will probably do it again. I think that's okay for now, FWIW, with two or three options down the road:
Either way, I don't see denying this PR. Will take a look later this weekend. |
An addendum to the readme would be a good shortterm fix - as patternlab.io matures, this may belong there too. |
Kind of makes the case for consolidating our UIs ASAP. How close are we right now to UI compatibility? I saw that 1.1.3 closes some PHP gaps. |
I haven't dug in to check for certain, but as I see it (for some reason please convince me otherwise I am agreeable 😄) I want to tackle the two items on https://github.com/pattern-lab/patternlab-node/wiki/Roadmap#v1xx-early-2016 first, especially finishing the file restructure. The first one is a legit gap that I want to close for feature parity too. |
No, no -- you're right. It's probably best for the file/repo structure to be amenable to a truly pluggable UI before we do that. Also, Pattern Engines are looking pretty good these days. We've had that branch (with a couple others mixed in, now including this one) in production for a week now, and the only hiccups we've had are with BrowserSync. Still working on that, I found a bug I need to fix and upstream. We can talk more about that later, though. |
@@ -473,7 +473,11 @@ var patternlab_engine = function (config) { | |||
var viewAllPathsPartialHtml = pattern_assembler.renderPattern(viewAllPathsTemplate, {'viewallpaths': JSON.stringify(patternlab.viewAllPaths)}); | |||
|
|||
//render the patternlab template, with all partials | |||
var patternlabSiteHtml = pattern_assembler.renderPattern(patternlabSiteTemplate, {}, { | |||
debugger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed, yes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes. 👍 EDIT: fixed
@geoffp did you know this browsersync option existed? Me neither!
Works like a dream. Does this adequately satisfy the aim of this PR? |
Good find! I wish it did -- we need this mainly in static deployments that don't include BrowserSync. |
Ah I understand - thanks for the clarification. |
@geoffp poke about #270 (comment) |
Errant debugger statement has been banished. |
@geoffp this is in dev now. We will have to see how it shakes out with eventual reconciliation with styleguide-assets-default. |
Cool. I'll volunteer to port it to "upstream" (we can call it that, right?) if and when the time comes. |
Summary of changes:
This adds basic support for setting the default pattern to be displayed when PL is first launched. We have a need for this because we want to have a nice landing page that explains things and doesn't melt mobile devices when they try to display every pattern we have all at once.
@bmuenzenmeyer, please review and let me know if there's anything glaringly wrong here.