jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/373504 )
Change subject: Make plus icon of New translation button thicker
......................................................................
Make plus icon of New translation button thicker
Make New translation button into OO.ui.ButtonWidget,
using OO-UI icon '+' with thicker stroke width, instead of SVG.
Bug: T173443
Change-Id: I09d534d1e7d1cdca6029a3e6f0b6a95b9da6a547
---
M modules/dashboard/ext.cx.dashboard.js
D modules/dashboard/images/plus_white.png
D modules/dashboard/images/plus_white.svg
M modules/dashboard/styles/ext.cx.dashboard.less
4 files changed, 13 insertions(+), 36 deletions(-)
Approvals:
jenkins-bot: Verified
Nikerabbit: Looks good to me, approved
diff --git a/modules/dashboard/ext.cx.dashboard.js
b/modules/dashboard/ext.cx.dashboard.js
index 817319b..6fdfbfe 100644
--- a/modules/dashboard/ext.cx.dashboard.js
+++ b/modules/dashboard/ext.cx.dashboard.js
@@ -25,7 +25,6 @@
this.$newTranslationButton = null;
this.$filter = null;
this.$listHeader = null;
- this.$cta = null;
this.$sourceSelector = null;
}
@@ -222,7 +221,8 @@
};
CXDashboard.prototype.buildTranslationList = function () {
- var $filterTabs = [];
+ var $filterTabs = [],
+ newTranslationButton;
if ( mw.config.get( 'wgContentTranslationEnableSuggestions' ) )
{
$filterTabs.push( $( '<span>' )
@@ -239,19 +239,23 @@
.text( mw.msg(
'cx-translation-filter-published-translations' ) ) );
this.$listHeader = $( '<div>' ).addClass( 'translation-filter'
);
- this.$newTranslationButton = $( '<button>' )
- .addClass( 'cx-cta__new-translation mw-ui-button
mw-ui-progressive' )
- .text( mw.msg( 'cx-create-new-translation' ) );
- this.$cta = $( '<div>' )
- .addClass( 'cx-cta' )
- .append( this.$newTranslationButton );
+
+ newTranslationButton = new OO.ui.ButtonWidget( {
+ label: mw.msg( 'cx-create-new-translation' ),
+ icon: 'add',
+ flags: [
+ 'primary',
+ 'progressive'
+ ]
+ } );
+ this.$newTranslationButton = newTranslationButton.$element;
this.$filter = $( '<span>' )
.addClass( 'cx-filters' )
.append( $filterTabs );
this.$listHeader.append(
- this.$cta,
+ this.$newTranslationButton,
this.$filter
);
diff --git a/modules/dashboard/images/plus_white.png
b/modules/dashboard/images/plus_white.png
deleted file mode 100644
index d75c3a8..0000000
--- a/modules/dashboard/images/plus_white.png
+++ /dev/null
Binary files differ
diff --git a/modules/dashboard/images/plus_white.svg
b/modules/dashboard/images/plus_white.svg
deleted file mode 100644
index c07194d..0000000
--- a/modules/dashboard/images/plus_white.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 612 792"
enable-background="new 0 0 612 792">
- <path fill="#fff" d="M330.3 218.9c0-28.8-21.6-50.5-50.5-50.5l1.8
232.6H79.7v50.5h201.9v180.3c0 28.8 21.6 50.5 50.5
50.5V451.5H534V401H332.1l-1.8-182.1z"/>
-</svg>
diff --git a/modules/dashboard/styles/ext.cx.dashboard.less
b/modules/dashboard/styles/ext.cx.dashboard.less
index 0207add..7706a46 100644
--- a/modules/dashboard/styles/ext.cx.dashboard.less
+++ b/modules/dashboard/styles/ext.cx.dashboard.less
@@ -5,29 +5,6 @@
background-color: @colorGray14;
}
-.cx-cta {
- .mw-ui-item;
-
- float: none;
- width: auto;
- padding-left: 0;
- font-size: 16px;
- background-color: @colorGray14;
- z-index: 100;
-
- &__new-translation:before {
- content: ' ';
- display: inline-block;
- vertical-align: baseline;
- height: 16px;
- width: 16px;
- margin-right: 5px;
- .background-image-svg('../images/plus_white.svg',
'../images/plus_white.png');
- background-size: 16px 16px;
- background-repeat: no-repeat;
- }
-}
-
.cx-sidebar {
background-color: #fff;
padding: 20px;
--
To view, visit https://gerrit.wikimedia.org/r/373504
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I09d534d1e7d1cdca6029a3e6f0b6a95b9da6a547
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Petar.petkovic <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: VolkerE <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits