jenkins-bot has submitted this change and it was merged.
Change subject: Promote alpha page styles to beta
......................................................................
Promote alpha page styles to beta
Additionally:
* update edit and watch icons
* promote Wikidata page description to beta
* change the Wikidata description font size to 13 pt
* resize the page action icons to 24px square
Change-Id: I00ee006ba67e8a5974799bde1f502f421048f8e1
---
M i18n/en.json
A images/icons/beta/edit.svg
A images/icons/beta/editLocked.svg
A images/icons/beta/watch.svg
A images/icons/beta/watched.svg
M includes/Resources.php
M includes/skins/MinervaTemplateAlpha.php
M includes/skins/MinervaTemplateBeta.php
M includes/skins/SkinMinervaAlpha.php
M includes/skins/SkinMinervaBeta.php
M javascripts/modules/issues/init.js
D less/content/links.alpha.less
A less/content/links.beta.less
R less/footer.beta.less
M less/modules/bannerImage.less
R less/pageactions.beta.less
16 files changed, 143 insertions(+), 89 deletions(-)
Approvals:
Bmansurov: Looks good to me, approved
jenkins-bot: Verified
diff --git a/i18n/en.json b/i18n/en.json
index 59748ec..9d8f238 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -189,7 +189,7 @@
"mobile-frontend-media-details": "Details",
"mobile-frontend-media-license-link": "License information",
"mobile-frontend-meta-data-issues": "This page has some issues",
- "mobile-frontend-meta-data-issues-alpha": "Page issues",
+ "mobile-frontend-meta-data-issues-beta": "Page issues",
"mobile-frontend-meta-data-issues-talk": "About this talk page",
"mobile-frontend-meta-data-issues-header": "Issues",
"mobile-frontend-meta-data-issues-header-talk": "About this page",
diff --git a/images/icons/beta/edit.svg b/images/icons/beta/edit.svg
new file mode 100644
index 0000000..e21a14e
--- /dev/null
+++ b/images/icons/beta/edit.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version:
6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 24 24" enable-background="new 0 0 24 24"
xml:space="preserve">
+<g id="Layer_2">
+</g>
+<g id="Layer_3">
+ <path fill="#676767"
d="M16.1,2L1.2,16.8L0,23l6.2-1.2L21,6.9C21,4.4,18.5,2,16.1,2z
M4,18.7c-0.4-0.4-0.9-0.7-1.2-1
+ c2.8-2.8,14-14.1,14-14.1c0.5,0.1,0.9,0.4,1.2,0.9L4,18.7z"/>
+</g>
+</svg>
diff --git a/images/icons/beta/editLocked.svg b/images/icons/beta/editLocked.svg
new file mode 100644
index 0000000..24032bc
--- /dev/null
+++ b/images/icons/beta/editLocked.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version:
6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 24 24" enable-background="new 0 0 24 24"
xml:space="preserve">
+<g id="Layer_2">
+</g>
+<g id="Layer_2_1_">
+ <g>
+ <path fill="#999999"
d="M20.7,4.6V3.5c0,0,0-3.5-3.5-3.5s-3.5,3.5-3.5,3.5v1.2h-1.2v6.9h9.2V4.6H20.7z
M19,4.6h-3.5V3.5
+ c0,0,0-1.7,1.7-1.7C19,1.7,19,3.5,19,3.5V4.6z"/>
+ <path fill="#999999"
d="M11.5,11.1l-7.8,8c-0.3-0.3-0.8-0.7-1.2-0.9c1.6-1.6,5.8-5.8,9-9.1V6.9L1.2,17.3L0,23l5.8-1.1l9.2-9.2
+ h-3.5V11.1z"/>
+ </g>
+</g>
+</svg>
diff --git a/images/icons/beta/watch.svg b/images/icons/beta/watch.svg
new file mode 100644
index 0000000..f088d9d
--- /dev/null
+++ b/images/icons/beta/watch.svg
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version:
6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 24 24" enable-background="new 0 0 24 24"
xml:space="preserve">
+<path fill="#666666"
d="M11.5,5.5l2.2,4.6l5.1,0.6l-3.4,3.6l0.6,5l-4.5-2.2l-4.6,2.2l0.8-5l-3.5-3.5l5-0.6L11.5,5.5
M11.5,1.2
+
L7.9,8.3L0,9.5l5.7,5.6l-1.4,7.8l7.1-3.8l7,3.8l-1.3-7.9l5.7-5.6l-8-1.2L11.5,1.2L11.5,1.2z"/>
+</svg>
diff --git a/images/icons/beta/watched.svg b/images/icons/beta/watched.svg
new file mode 100644
index 0000000..f088d9d
--- /dev/null
+++ b/images/icons/beta/watched.svg
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version:
6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 24 24" enable-background="new 0 0 24 24"
xml:space="preserve">
+<path fill="#666666"
d="M11.5,5.5l2.2,4.6l5.1,0.6l-3.4,3.6l0.6,5l-4.5-2.2l-4.6,2.2l0.8-5l-3.5-3.5l5-0.6L11.5,5.5
M11.5,1.2
+
L7.9,8.3L0,9.5l5.7,5.6l-1.4,7.8l7.1-3.8l7,3.8l-1.3-7.9l5.7-5.6l-8-1.2L11.5,1.2L11.5,1.2z"/>
+</svg>
diff --git a/includes/Resources.php b/includes/Resources.php
index c7ebcee..999dfd5 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -123,11 +123,24 @@
),
),
),
- 'skins.minerva.alpha.styles' => $wgMFResourceFileModuleBoilerplate +
array(
+ 'skins.minerva.beta.styles' => $wgMFResourceFileModuleBoilerplate +
array(
'styles' => array(
- 'less/content/links.alpha.less',
- 'less/pageactions.alpha.less',
- 'less/footer.alpha.less',
+ 'less/content/links.beta.less',
+ 'less/pageactions.beta.less',
+ 'less/footer.beta.less',
+ ),
+ ),
+ 'skins.minerva.beta.images' => $wgMFResourceFileModuleBoilerplate +
array(
+ 'class' => 'ResourceLoaderImageModule',
+ 'prefix' => 'mw-ui',
+ 'images' => array(
+ 'icon' => array(
+ // page actions
+ 'watch:before' => 'images/icons/beta/watch.svg',
+ 'watched:before' =>
'images/icons/beta/watched.svg',
+ 'edit:before' =>
'images/icons/beta/editLocked.svg',
+ 'edit-enabled:before' =>
'images/icons/beta/edit.svg',
+ ),
),
),
);
@@ -1047,7 +1060,7 @@
'messages' => array(
// issues.js
'mobile-frontend-meta-data-issues',
- 'mobile-frontend-meta-data-issues-alpha',
+ 'mobile-frontend-meta-data-issues-beta',
'mobile-frontend-meta-data-issues-talk',
'mobile-frontend-meta-data-issues-header',
'mobile-frontend-meta-data-issues-header-talk',
diff --git a/includes/skins/MinervaTemplateAlpha.php
b/includes/skins/MinervaTemplateAlpha.php
index 4ca342c..957980a 100644
--- a/includes/skins/MinervaTemplateAlpha.php
+++ b/includes/skins/MinervaTemplateAlpha.php
@@ -8,8 +8,6 @@
* experimental (alpha) mode via Special:MobileOptions
*/
class MinervaTemplateAlpha extends MinervaTemplateBeta {
- /** {@inheritdoc} */
- protected $renderHistoryLinkBeforeContent = false;
/**
* @var string $searchPlaceHolderMsg Message used as placeholder in
search input
*/
@@ -99,35 +97,5 @@
$result += $this->getCategoryButton();
return $result;
- }
-
- /**
- * Renders the list of page actions and then the title of the page in
its
- * container to keep LESS changes to a minimum.
- *
- * @param array $data
- */
- protected function renderPreContent( $data ) {
- $internalBanner = $data[ 'internalBanner' ];
- $preBodyText = isset( $data['prebodytext'] ) ?
$data['prebodytext'] : '';
-
- if ( $internalBanner || $preBodyText ) {
-
- ?>
- <div class="pre-content">
- <?php
- if ( !$this->isSpecialPage ) {
- $this->renderPageActions( $data );
- }
- echo $preBodyText;
- // FIXME: Temporary solution until we have
design
- if ( isset( $data['_old_revision_warning'] ) ) {
- echo $data['_old_revision_warning'];
- }
- echo $internalBanner;
- ?>
- </div>
- <?php
- }
}
}
diff --git a/includes/skins/MinervaTemplateBeta.php
b/includes/skins/MinervaTemplateBeta.php
index b764453..972bda0 100644
--- a/includes/skins/MinervaTemplateBeta.php
+++ b/includes/skins/MinervaTemplateBeta.php
@@ -8,6 +8,8 @@
* beta mode via Special:MobileOptions
*/
class MinervaTemplateBeta extends MinervaTemplate {
+ /** {@inheritdoc} */
+ protected $renderHistoryLinkBeforeContent = false;
/**
* @var string $searchPlaceHolderMsg Message used as placeholder in
search input
*/
@@ -41,4 +43,34 @@
}
return $result;
}
+
+ /**
+ * Renders the list of page actions and then the title of the page in
its
+ * container to keep LESS changes to a minimum.
+ *
+ * @param array $data
+ */
+ protected function renderPreContent( $data ) {
+ $internalBanner = $data[ 'internalBanner' ];
+ $preBodyText = isset( $data['prebodytext'] ) ?
$data['prebodytext'] : '';
+
+ if ( $internalBanner || $preBodyText ) {
+
+ ?>
+ <div class="pre-content">
+ <?php
+ if ( !$this->isSpecialPage ) {
+ $this->renderPageActions( $data );
+ }
+ echo $preBodyText;
+ // FIXME: Temporary solution until we have
design
+ if ( isset( $data['_old_revision_warning'] ) ) {
+ echo $data['_old_revision_warning'];
+ }
+ echo $internalBanner;
+ ?>
+ </div>
+ <?php
+ }
+ }
}
diff --git a/includes/skins/SkinMinervaAlpha.php
b/includes/skins/SkinMinervaAlpha.php
index 55cc0b1..f9cadcd 100644
--- a/includes/skins/SkinMinervaAlpha.php
+++ b/includes/skins/SkinMinervaAlpha.php
@@ -12,30 +12,6 @@
/** @var string Describes 'stability' of the skin - alpha, beta, stable
*/
protected $mode = 'alpha';
- /** @inheritdoc **/
- protected function getHeaderHtml() {
- $html = parent::getHeaderHtml();
- $vars = $this->getSkinConfigVariables();
- $description = $vars['wgMFDescription'];
- if ( $description && !$this->getTitle()->isSpecialPage() ) {
- $html .= Html::element( 'div',
- array(
- 'class' => 'tagline',
- ), $description );
- }
- return $html;
- }
-
- /**
- * Get the needed styles for this skin
- * @return array
- */
- protected function getSkinStyles() {
- $styles = parent::getSkinStyles();
- $styles[] = 'skins.minerva.alpha.styles';
- return $styles;
- }
-
/**
* Returns the javascript modules to load.
* @return array
@@ -79,7 +55,6 @@
$vars = parent::getSkinConfigVariables();
$vars['wgMFEditorOptions']['anonymousEditing'] = true;
- $vars['wgMFDescription'] = $this->getOutput()->getProperty(
'wgMFDescription' );
$vars['wgWikiBasePropertyConfig'] = $config->get(
'WikiBasePropertyConfig' );
$vars['wgMFInfoboxConfig'] = $config->get( 'MFInfoboxConfig' );
$vars['wgMFShowRedLinks'] = true;
diff --git a/includes/skins/SkinMinervaBeta.php
b/includes/skins/SkinMinervaBeta.php
index b204455..8d3b484 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -12,6 +12,27 @@
/** @var string $mode Describes 'stability' of the skin - alpha, beta,
stable */
protected $mode = 'beta';
+ /** @inheritdoc **/
+ protected function getHeaderHtml() {
+ $html = parent::getHeaderHtml();
+ $vars = $this->getSkinConfigVariables();
+ $description = $vars['wgMFDescription'];
+ if ( $description && !$this->getTitle()->isSpecialPage() ) {
+ $html .= Html::element( 'div',
+ array(
+ 'class' => 'tagline',
+ ), $description );
+ }
+ return $html;
+ }
+
+ public function getSkinConfigVariables() {
+ $vars = parent::getSkinConfigVariables();
+ $vars['wgMFDescription'] = $this->getOutput()->getProperty(
'wgMFDescription' );
+
+ return $vars;
+ }
+
/**
* initialize various variables and generate the template
* @param OutputPage $out optional parameter: The OutputPage Obj.
@@ -109,6 +130,9 @@
$styles[] = 'mediawiki.ui.icon';
$styles[] = 'skins.minerva.icons.styles';
$styles[] = 'skins.minerva.icons.images';
+ $styles[] = 'skins.minerva.beta.styles';
+ $styles[] = 'skins.minerva.beta.images';
+
return $styles;
}
diff --git a/javascripts/modules/issues/init.js
b/javascripts/modules/issues/init.js
index 13e8b41..c61732b 100644
--- a/javascripts/modules/issues/init.js
+++ b/javascripts/modules/issues/init.js
@@ -5,8 +5,7 @@
Icon = M.require( 'Icon' ),
overlayManager = M.require( 'overlayManager' ),
inBeta = context.isBetaGroupMember(),
- CleanupOverlay = M.require(
'modules/issues/CleanupOverlay' ),
- inAlpha = context.isAlphaGroupMember();
+ CleanupOverlay = M.require(
'modules/issues/CleanupOverlay' );
/**
* Extract a summary message from a cleanup template generated
element that is
@@ -42,7 +41,7 @@
* @return {jQuery}
*/
function createLinkElement( labelText ) {
- if ( inAlpha ) {
+ if ( inBeta ) {
return $( '<a class="cleanup
mw-mf-cleanup"></a>' )
.text( labelText );
}
@@ -101,7 +100,7 @@
} );
} );
- if ( inAlpha && $metadata.length ) {
+ if ( inBeta && $metadata.length ) {
$( '.pre-content' ).append( $link );
} else {
$link.insertBefore( $metadata.eq( 0 ) );
@@ -120,8 +119,8 @@
$container = ns === 14 ? $( '#content' ) :
M.getCurrentPage().getLeadSectionElement(),
labelMsgKey =
'mobile-frontend-meta-data-issues';
- if ( inAlpha ) {
- labelMsgKey += '-alpha';
+ if ( inBeta ) {
+ labelMsgKey += '-beta';
}
if ( ns === 0 ) {
diff --git a/less/content/links.alpha.less b/less/content/links.alpha.less
deleted file mode 100644
index d983409..0000000
--- a/less/content/links.alpha.less
+++ /dev/null
@@ -1,13 +0,0 @@
-.alpha {
- // the last modified bar is at the bottom of the page
- .last-modified-bar {
- margin-top: 2em;
- }
- &.page-Main_Page {
- .last-modified-bar {
- // same as in .content (links.less)
- margin-top: 1.5em;
- }
- }
-}
-
diff --git a/less/content/links.beta.less b/less/content/links.beta.less
new file mode 100644
index 0000000..ae1f86b
--- /dev/null
+++ b/less/content/links.beta.less
@@ -0,0 +1,8 @@
+.beta {
+ &.page-Main_Page {
+ .last-modified-bar {
+ // same as in .content (links.less)
+ margin-top: 1.5em;
+ }
+ }
+}
diff --git a/less/footer.alpha.less b/less/footer.beta.less
similarity index 94%
rename from less/footer.alpha.less
rename to less/footer.beta.less
index 6b08603..f3ede6c 100644
--- a/less/footer.alpha.less
+++ b/less/footer.beta.less
@@ -1,6 +1,7 @@
@import "minerva.variables";
-.alpha {
+.alpha,
+.beta {
#footer {
margin-top: 0;
border-top: none;
diff --git a/less/modules/bannerImage.less b/less/modules/bannerImage.less
index 3484fa5..c9d69d7 100644
--- a/less/modules/bannerImage.less
+++ b/less/modules/bannerImage.less
@@ -7,7 +7,7 @@
height: 360px;
max-height: 360px;
display: none;
- background-position: 50% 50%;
+ background-position-x: center;
background-repeat: no-repeat;
.background-size( e(''), cover);
position: relative;
diff --git a/less/pageactions.alpha.less b/less/pageactions.beta.less
similarity index 88%
rename from less/pageactions.alpha.less
rename to less/pageactions.beta.less
index 04dc5d8..567dbe9 100644
--- a/less/pageactions.alpha.less
+++ b/less/pageactions.beta.less
@@ -4,13 +4,14 @@
@titleSectionSpacingTop: 20px;
@titleSectionSpacingBottom: 25px;
-.alpha {
+.alpha,
+.beta {
.pre-content {
padding: @titleSectionSpacingTop @contentMargin
@titleSectionSpacingBottom;
.tagline {
color: @colorGray5;
- font-size: 1.1em;
+ font-size: 1.05em;
margin: 10px 0;
&:first-letter {
@@ -27,7 +28,7 @@
#page-actions {
// FIXME: Make default when mw-ui-icon in stable
- font-size: 1.2em;
+ font-size: 1.1em; // Icons are 24px square.
float: right;
width: 3.4em;
border-bottom: none;
@@ -44,7 +45,8 @@
}
@media all and (max-width: @wgMFDeviceWidthTablet) {
- .alpha {
+ .alpha,
+ .beta {
#page-actions {
padding-top: 0;
}
@@ -52,7 +54,8 @@
}
@media all and (min-width: @wgMFDeviceWidthTablet) {
- .alpha {
+ .alpha,
+ .beta {
#page-actions {
width: auto;
padding-right: 0;
--
To view, visit https://gerrit.wikimedia.org/r/188813
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I00ee006ba67e8a5974799bde1f502f421048f8e1
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: KHammerstein <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits