Skip to content

Commit c3fa917

Browse files
mfranzkeMaximilian FranzkeMaximilian FranzkebmuenzenmeyerJosefBredereck
authored
improvement: ability to configure default pattern info code panel #1155 (#1156)
* improvement: ability to configure default pattern info code panel #1155 * docs(config): added the default config values #1155 Co-authored-by: Maximilian Franzke <maximilian.franzke@deutschebahn.com> Co-authored-by: Maximilian Franzke <contact-mfr@nzke.net> Co-authored-by: Maximilian Franzke <mfr@nzke.net> Co-authored-by: Brian Muenzenmeyer <brian.muenzenmeyer@gmail.com> Co-authored-by: Josef Bredreck <slime.games@outlook.de>
1 parent 125f1fd commit c3fa917

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/docs/src/docs/advanced-config-options.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ Sets whether or not you want the styleguide to load with the pattern info open o
4545

4646
**default**: `false`
4747

48+
### defaultPatternInfoPanelCode (optional)
49+
50+
Sets default active pattern info code panel by file extension - if unset, uses the value out of _patternExtension_ config value, or instead use value `html` to display the html code initially, or the value defined for the _patternExtension_.
51+
52+
**default**: _patternExtension_ value (`"hbs"` | `"mustache"` | `"twig"` | `"html"`)
53+
4854
### ishControlsHide
4955

5056
Sets whether or not to hide navigation options within the styleguide.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function init(event) {
8484
Panels.add({
8585
id: 'pl-panel-html',
8686
name: 'HTML',
87-
default: false,
87+
default: window.config.defaultPatternInfoPanelCode && window.config.defaultPatternInfoPanelCode === 'html',
8888
templateID: 'pl-panel-template-code',
8989
httpRequest: true,
9090
httpRequestReplace: fileSuffixMarkup + '.html',

0 commit comments

Comments
 (0)