File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -165,10 +165,14 @@ protected function getStyleguideObjects($sitePackageKey): array
165165
166166 $ hiddenPrototypeNamePatterns = $ this ->configurationService ->getSiteConfiguration ($ sitePackageKey , 'hiddenPrototypeNamePatterns ' );
167167 if (is_array ($ hiddenPrototypeNamePatterns )) {
168+ $ alwaysShowPrototypes = $ this ->configurationService ->getSiteConfiguration ($ sitePackageKey , 'alwaysShowPrototypes ' );
168169 foreach ($ hiddenPrototypeNamePatterns as $ pattern ) {
169170 $ styleguideObjects = array_filter (
170171 $ styleguideObjects ,
171- function ($ prototypeName ) use ($ pattern ) {
172+ function ($ prototypeName ) use ($ pattern , $ alwaysShowPrototypes ) {
173+ if (in_array ($ prototypeName , $ alwaysShowPrototypes , true )) {
174+ return true ;
175+ }
172176 return fnmatch ($ pattern , $ prototypeName ) === false ;
173177 },
174178 ARRAY_FILTER_USE_KEY
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ Sitegeist:
7070 color : ' #FFF'
7171
7272 hiddenPrototypeNamePatterns : { }
73+ alwaysShowPrototypes : { }
7374
7475 preview :
7576 fusionRootPath : ' /<Sitegeist.Monocle:Preview.Page>'
Original file line number Diff line number Diff line change @@ -249,6 +249,18 @@ Sitegeist:
249249 - 'Another.Vendor.Site:Prototype'
250250` ` `
251251
252+ Specific components can be "unhidden" even if they match one of the `hiddenPrototypeNamePatterns` patterns :
253+
254+ ` ` ` YAML
255+ Sitegeist:
256+ Monocle:
257+ alwaysShowPrototypes:
258+ - 'Vendor.Site:Some.Component.ThatShouldBeShown'
259+ - 'Another.Vendor.Site:Prototype.ThatShouldBeShown'
260+ ` ` `
261+
262+ This allows for including prototypes of packages selectively.
263+
252264# ## Site-specific configuration
253265
254266All configurations can be overwritten for each selected site package.
You can’t perform that action at this time.
0 commit comments