Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 2cbcfb3

Browse files
committed
Merge branch 'release-0.7.7'
2 parents 7cc9a50 + 3aa5954 commit 2cbcfb3

File tree

10 files changed

+22
-13
lines changed

10 files changed

+22
-13
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.
22

3+
PL-v0.7.7
4+
- ADD: can hide all of the patterns for a given pattern type from being shown on the styleguide. good for nested pages/templates
5+
- FIX: the MQ menu is hidden on smaller viewports
6+
37
PL-v0.7.6
48
- FIX: pattern search now searches the entire name of a pattern
59
- FIX: the MQ menu lines up with the navigation item

core/config/config.ini.default

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* If config.ini doesn't exist Pattern Lab will try to create a new version
44
*/
55

6-
v = "0.7.6"
6+
v = "0.7.7"
77

88
// file extensions to ignore when building or watching the source dir, separate with a comma
99
ie = "scss,DS_Store,less"
@@ -26,3 +26,6 @@ ishControlsHide = ""
2626

2727
// the order of pattern states
2828
patternStates = "inprogress,inreview,complete"
29+
30+
// the pattern types that shouldn't be included in the style guide
31+
styleGuideExcludes = ""

core/lib/PatternLab/Builder.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*!
4-
* Pattern Lab Builder Class - v0.7.6
4+
* Pattern Lab Builder Class - v0.7.7
55
*
66
* Copyright (c) 2013-2014 Dave Olsen, http://dmolsen.com
77
* Licensed under the MIT license
@@ -50,6 +50,7 @@ class Builder {
5050
protected $mainPageFoot; // the footer to be included on main pages
5151
protected $addPatternHF; // should the pattern header and footer be added
5252
protected $cleanPublic; // whether the public directory should be cleaned out or not on generate
53+
protected $styleGuideExcludes;// which pattern types to exclude from the style guide
5354

5455
/**
5556
* When initializing the Builder class or the sub-classes make sure the base properties are configured
@@ -67,7 +68,8 @@ public function __construct($config = array()) {
6768
foreach ($config as $key => $value) {
6869

6970
// if the variables are array-like make sure the properties are validated/trimmed/lowercased before saving
70-
if (($key == "ie") || ($key == "id") || ($key == "patternStates")) {
71+
$arrayKeys = array("ie","id","patternStates","styleGuideExcludes");
72+
if (in_array($key,$arrayKeys)) {
7173
$values = explode(",",$value);
7274
array_walk($values,'PatternLab\Builder::trim');
7375
$this->$key = $values;
@@ -886,7 +888,7 @@ protected function gatherPatternInfo() {
886888
$patternTypeDash = $patternTypeValues["patternTypeDash"];
887889

888890
// if this has a second level of patterns check them out (means we don't process pages & templates)
889-
if (isset($patternTypeValues["patternTypeItems"])) {
891+
if (isset($patternTypeValues["patternTypeItems"]) && (!in_array($patternType,$this->styleGuideExcludes))) {
890892

891893
$arrayReset = false;
892894

core/lib/PatternLab/Configurer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*!
4-
* Pattern Lab Configurer Class - v0.7.6
4+
* Pattern Lab Configurer Class - v0.7.7
55
*
66
* Copyright (c) 2014 Dave Olsen, http://dmolsen.com
77
* Licensed under the MIT license

core/lib/PatternLab/Generator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*!
4-
* Pattern Lab Generator Class - v0.7.6
4+
* Pattern Lab Generator Class - v0.7.7
55
*
66
* Copyright (c) 2013-2014 Dave Olsen, http://dmolsen.com
77
* Licensed under the MIT license

core/lib/PatternLab/Migrator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*!
4-
* Pattern Lab Migrator Class - v0.7.6
4+
* Pattern Lab Migrator Class - v0.7.7
55
*
66
* Copyright (c) 2014 Dave Olsen, http://dmolsen.com
77
* Licensed under the MIT license

core/lib/PatternLab/Watcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*!
4-
* Pattern Lab Watcher Class - v0.7.6
4+
* Pattern Lab Watcher Class - v0.7.7
55
*
66
* Copyright (c) 2013-2014 Dave Olsen, http://dmolsen.com
77
* Licensed under the MIT license

core/styleguide/css/styleguide.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,12 @@
284284
border: 0;
285285
border-left: 1px solid rgba(255, 255, 255, 0.05); } }
286286

287-
.sg-find {
287+
.sg-find, .sg-mqs {
288288
display: none;
289289
}
290290

291291
@media all and (min-width: 48em) {
292-
.sg-find {
292+
.sg-find, .sg-mqs {
293293
display: block;
294294
}
295295
}

core/templates/partials/ishControls.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</ul>
2121
</li>
2222
{{^ ishControlsHide.mqs }}
23-
<li class="sg-half">
23+
<li class="sg-mqs">
2424
<a href="#" class="mode-link sg-acc-handle" id="sg-size-mq" title="Media query values found in stylesheet">MQ</a>
2525
<ul class="sg-acc-panel sg-left" id="sg-mq">
2626
{{# mqs }}

public/styleguide/css/styleguide.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,12 @@
284284
border: 0;
285285
border-left: 1px solid rgba(255, 255, 255, 0.05); } }
286286

287-
.sg-find {
287+
.sg-find, .sg-mqs {
288288
display: none;
289289
}
290290

291291
@media all and (min-width: 48em) {
292-
.sg-find {
292+
.sg-find, .sg-mqs {
293293
display: block;
294294
}
295295
}

0 commit comments

Comments
 (0)