Skip to content

Commit 4c3d144

Browse files
Merge branch 'dev' into feature/exclude-tags
2 parents beb2115 + e010c04 commit 4c3d144

File tree

5 files changed

+29
-24
lines changed

5 files changed

+29
-24
lines changed

packages/docs/src/_includes/components/logo.njk

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

22
<h3 class="c-logo">
33
<a href="/" class="c-logo__link" rel="home">
4-
<img class="c-logo__img" src="https://patternlab.io/assets/icon-atom.svg" alt="Pattern Lab">
4+
<img class="c-logo__img" src="https://patternlab.io/images/icon-atom.svg" alt="Pattern Lab">
55

66
<div class="c-logo__body">
77
<span class="c-logo__text">Pattern Lab</span>

packages/plugin-tab/dist/js/@pattern-lab-plugin-tab.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ window.PluginTab = {
66
init: function() {
77
//placeholder that will be replaced during configuation
88
//most plugins could probably just implement logic here instead.
9-
/*SNIPPETS*/
9+
function addPanels() {
10+
/*SNIPPETS*/
11+
}
12+
13+
// workaround to try recovering from load order race conditions
14+
if (window.patternlab && window.patternlab.panels) {
15+
addPanels();
16+
} else {
17+
document.addEventListener('patternLab.pageLoad', addPanels);
18+
}
1019
},
1120
};

packages/plugin-tab/src/snippet.js

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
1-
function addPanels() {
2-
window.patternlab.panels.add({
3-
id: 'sg-panel-scss',
4-
name: 'SCSS',
5-
default: false,
6-
templateID: 'pl-panel-template-code',
7-
httpRequest: true,
8-
httpRequestReplace: '.scss',
9-
httpRequestCompleted: false,
10-
prismHighlight: true,
11-
language: 'scss',
12-
keyCombo: 'ctrl+shift+z',
13-
});
14-
}
15-
16-
// workaround to try recovering from load order race conditions
17-
if (window.patternlab && window.patternlab.panels) {
18-
addPanels();
19-
} else {
20-
document.addEventListener('patternLab.pageLoad', addPanels);
21-
}
1+
window.patternlab.panels.add({
2+
id: 'sg-panel-<<type>>',
3+
name: '<<typeUC>>',
4+
default: window.config.defaultPatternInfoPanelCode && window.config.defaultPatternInfoPanelCode === "<<type>>",
5+
templateID: 'pl-panel-template-code',
6+
httpRequest: true,
7+
httpRequestReplace: '.<<type>>',
8+
httpRequestCompleted: false,
9+
prismHighlight: true,
10+
language: '<<type>>'//,
11+
/* TODO: We would need to find a way to enable keyCombo for multiple panels
12+
keyCombo: 'ctrl+shift+z',*/
13+
});

packages/uikit-workshop/src/scripts/components/panels.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ function init(event) {
6868
Panels.add({
6969
id: 'pl-panel-pattern',
7070
name: window.config.patternExtension.toUpperCase(),
71-
default: true,
71+
default: !window.config.defaultPatternInfoPanelCode ||
72+
window.config.defaultPatternInfoPanelCode ===
73+
window.config.patternExtension,
7274
templateID: 'pl-panel-template-code',
7375
httpRequest: true,
7476
httpRequestReplace: fileSuffixPattern,

packages/uikit-workshop/src/scripts/components/prism-languages.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import 'prismjs/components/prism-markup';
44
import 'prismjs/components/prism-twig';
55
import 'prismjs/components/prism-clike';
66
import 'prismjs/components/prism-javascript';
7+
import 'prismjs/components/prism-typescript';
8+
import 'prismjs/components/prism-json';
79
import 'prismjs/components/prism-css';
810
import 'prismjs/components/prism-css-extras';
911
import 'prismjs/components/prism-scss';

0 commit comments

Comments
 (0)