diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 2687f88..ee2b11a 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -104,23 +104,23 @@ class SkinVector extends SkinTemplate { return [ // Data objects: - 'data-indicators' => $indicators, + 'array-indicators' => $indicators, // HTML strings: 'html-printtail' => WrappedString::join( "\n", [ + MWDebug::getHTMLDebugLog(), MWDebug::getDebugHTML( $this->getContext() ), $this->bottomScripts(), wfReportTime( $out->getCSP()->getNonce() ) ] ) . '', - 'html-sitenotice' => $this->getSiteNotice(), + 'html-site-notice' => $this->getSiteNotice(), 'html-userlangattributes' => $this->prepareUserLanguageAttributes(), 'html-subtitle' => $this->prepareSubtitle(), // Always returns string, cast to null if empty. - 'html-undelete' => $this->prepareUndeleteLink() ?: null, + 'html-undelete-link' => $this->prepareUndeleteLink() ?: null, // Result of OutputPage::addHTML calls - 'html-bodycontent' => $this->wrapHTML( $title, $out->mBodytext ), - 'html-dataAfterContent' => $this->afterContentHook(), - // When $wgShowDebug is enabled - 'html-debuglog' => MWDebug::getHTMLDebugLog(), + 'html-body-content' => $this->wrapHTML( $title, $out->mBodytext ) + . $this->printSource(), + 'html-after-content' => $this->afterContentHook(), ]; } diff --git a/includes/VectorTemplate.php b/includes/VectorTemplate.php index eb35613..aff7a36 100644 --- a/includes/VectorTemplate.php +++ b/includes/VectorTemplate.php @@ -153,7 +153,7 @@ class VectorTemplate extends BaseTemplate { 'msg-vector-jumptosearch' => $skin->msg( 'vector-jumptosearch' )->text(), 'html-printfooter' => $skin->printSource(), - 'html-catlinks' => $skin->getCategories(), + 'html-categories' => $skin->getCategories(), 'data-footer' => $this->getFooterData(), 'html-navigation-heading' => $skin->msg( 'navigation-heading' ), 'data-search-box' => $this->buildSearchProps(), diff --git a/includes/templates/Indicators.mustache b/includes/templates/Indicators.mustache index 8f1925e..6e1cc7b 100644 --- a/includes/templates/Indicators.mustache +++ b/includes/templates/Indicators.mustache @@ -1,6 +1,6 @@ {{! @typedef Indicator[]}}
-{{#data-indicators}} +{{#array-indicators}}
{{{html}}}
-{{/data-indicators}} +{{/array-indicators}}
diff --git a/includes/templates/skin-legacy.mustache b/includes/templates/skin-legacy.mustache index b2401b7..dd38046 100644 --- a/includes/templates/skin-legacy.mustache +++ b/includes/templates/skin-legacy.mustache @@ -1,24 +1,22 @@ {{! string html-headelement a string of attribute HTML that begins with `` and ends with `` and contains `meta` tags and ResourceLoader internals. - string|null html-sitenotice the contents of a banner defined in MediaWiki:Sitenotice. + string|null html-site-notice the contents of a banner defined in MediaWiki:Sitenotice. Also used by CentralNotice to inject banners into Vector. - Indicator[] data-indicators wiki-defined badges such as "good article", + Indicator[] array-indicators wiki-defined badges such as "good article", "featured article". An empty array if none are defined. string page-langcode the content language of the article. Assumed to be escaped HTML. string html-title bool page-isarticle string msg-tagline string html-subtitle - string html-undelete + string html-undelete-link string html-newtalk string msg-vector-jumptonavigation string msg-vector-jumptosearch - string html-bodycontent - string html-printfooter - string html-catlinks - string html-debuglog - string html-dataAfterContent + string html-body-content + string html-categories + string html-after-content string html-navigation-heading heading for entire navigation that is usually hidden to screen readers MenuDefinition data-personal-menu @@ -38,13 +36,13 @@
-
{{{html-sitenotice}}}
+
{{{html-site-notice}}}
{{>Indicators}}

{{{html-title}}}

{{#page-isarticle}}
{{msg-tagline}}
{{/page-isarticle}}
{{{html-subtitle}}}
-
{{{html-undelete}}}
+
{{{html-undelete-link}}}
{{{html-newtalk}}} {{! Keep this empty `div` for compatibility with gadgets and user scripts @@ -53,13 +51,11 @@
{{msg-vector-jumptonavigation}} {{msg-vector-jumptosearch}} - {{{html-bodycontent}}} -
{{{html-printfooter}}}
- {{{html-catlinks}}} - {{{html-debuglog}}} + {{{html-body-content}}} + {{{html-categories}}}
-{{{html-dataAfterContent}}} +{{{html-after-content}}}

{{{html-navigation-heading}}}

diff --git a/includes/templates/skin.mustache b/includes/templates/skin.mustache index 64e1a34..01bd11c 100644 --- a/includes/templates/skin.mustache +++ b/includes/templates/skin.mustache @@ -1,24 +1,22 @@ {{! string html-headelement a string of attribute HTML that begins with `` and ends with `` and contains `meta` tags and ResourceLoader internals. - string|null html-sitenotice the contents of a banner defined in MediaWiki:Sitenotice. + string|null html-site-notice the contents of a banner defined in MediaWiki:Sitenotice. Also used by CentralNotice to inject banners into Vector. - Indicator[] data-indicators wiki-defined badges such as "good article", + Indicator[] array-indicators wiki-defined badges such as "good article", "featured article". An empty array if none are defined. string page-langcode the content language of the article. Assumed to be escaped HTML. string html-title bool page-isarticle string msg-tagline string html-subtitle - string html-undelete + string html-undelete-link string html-newtalk string msg-vector-jumptonavigation string msg-vector-jumptosearch - string html-bodycontent - string html-printfooter - string html-catlinks - string html-debuglog - string html-dataAfterContent + string html-body-content + string html-categories + string html-after-content string html-navigation-heading heading for entire navigation that is usually hidden to screen readers LogoOptions data-logos @@ -56,13 +54,13 @@
-
{{{html-sitenotice}}}
+
{{{html-site-notice}}}
{{>Indicators}}

{{{html-title}}}

{{#page-isarticle}}
{{msg-tagline}}
{{/page-isarticle}}
{{{html-subtitle}}}
-
{{{html-undelete}}}
+
{{{html-undelete-link}}}
{{{html-newtalk}}} {{! Keep this empty `div` for compatibility with gadgets and user scripts @@ -71,13 +69,11 @@
{{msg-vector-jumptonavigation}} {{msg-vector-jumptosearch}} - {{{html-bodycontent}}} -
{{{html-printfooter}}}
- {{{html-catlinks}}} - {{{html-debuglog}}} + {{{html-body-content}}} + {{{html-categories}}}
-{{{html-dataAfterContent}}} +{{{html-after-content}}}
{{! END mw-content-container }}
{{! END mw-workspace-container }} diff --git a/stories/skin.stories.data.js b/stories/skin.stories.data.js index 932909e..50f3266 100644 --- a/stories/skin.stories.data.js +++ b/stories/skin.stories.data.js @@ -92,17 +92,19 @@ export const LEGACY_TEMPLATE_DATA = { // site specific 'data-footer': FOOTER_TEMPLATE_DATA, - 'html-sitenotice': placeholder( 'a site notice or central notice banner may go here', 70 ), + 'html-site-notice': placeholder( 'a site notice or central notice banner may go here', 70 ), // article dependent - 'html-bodycontent': placeholder( 'Article content goes here' ), - 'html-printfooter': `Retrieved from ‘https://en.wikipedia.org/w/index.php?title=this&oldid=blah’`, - 'html-catlinks': placeholder( 'Category links component from mediawiki core', 50 ), + 'html-body-content': `${placeholder( 'Article content goes here' )} +
+ Retrieved from ‘https://en.wikipedia.org/w/index.php?title=this&oldid=blah’ +
`, + 'html-categories': placeholder( 'Category links component from mediawiki core', 50 ), // extension dependent.. 'html-hook-vector-before-footer': placeholder( 'VectorBeforeFooter hook output', 100 ), - 'html-dataAfterContent': placeholder( 'Extensions can add here e.g. Related Articles.', 100 ), - 'data-indicators': DATA_INDICATORS, + 'html-after-content': placeholder( 'Extensions can add here e.g. Related Articles.', 100 ), + 'array-indicators': DATA_INDICATORS, 'html-subtitle': placeholder( 'Extensions can configure subtitle', 20 ) }; @@ -116,11 +118,13 @@ export const MODERN_TEMPLATE_DATA = { // site specific 'data-footer': FOOTER_TEMPLATE_DATA, - 'html-sitenotice': placeholder( 'a site notice or central notice banner may go here', 70 ), + 'html-site-notice': placeholder( 'a site notice or central notice banner may go here', 70 ), // article dependent - 'data-indicators': DATA_INDICATORS, - 'html-bodycontent': placeholder( 'Article content goes here' ), - 'html-printfooter': `Retrieved from ‘https://en.wikipedia.org/w/index.php?title=this&oldid=blah’`, - 'html-catlinks': placeholder( 'Category links component from mediawiki core', 50 ) + 'array-indicators': DATA_INDICATORS, + 'html-body-content': `${placeholder( 'Article content goes here' )} +
+ Retrieved from ‘https://en.wikipedia.org/w/index.php?title=this&oldid=blah’ +
`, + 'html-categories': placeholder( 'Category links component from mediawiki core', 50 ) };