[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Restyle personal header
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404683 ) Change subject: Restyle personal header .. Restyle personal header * Rearrange the code in ContentTranslationSpecialPage to unify 'userpage' tool into method other tools are using. * Show missing pages in personal menu options with red color. * Remove underline for personal menu options on hover. * Small adjustments to personal header style: - Reduce size of label next to the trademark to 20px. - Reduce the size of menu handle and options. - Increase separation between menu and notification icons. Bug: T184842 Bug: T184571 Bug: T184719 Change-Id: I5f254d9324bf3e27047429b102eb20883be00827 --- M extension.json M modules/ui/legacy/mw.cx.ui.Header.js M modules/ui/legacy/styles/mw.cx.ui.Header.less M modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less A modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.monobook.less M modules/ui/mw.cx.ui.Header.js M modules/ui/styles/mw.cx.ui.Header.less M modules/ui/styles/mw.cx.ui.Header.monobook.less M modules/ui/styles/mw.cx.ui.Header.vector.less M modules/ui/styles/widgets/mw.cx.ui.PersonalMenuWidget.less M modules/widgets/common/ext.cx.common.less M specials/ContentTranslationSpecialPage.php 12 files changed, 113 insertions(+), 93 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/83/404683/1 diff --git a/extension.json b/extension.json index 23a88c6..5d23d3b 100644 --- a/extension.json +++ b/extension.json @@ -1510,7 +1510,6 @@ "cx-save-draft-save-success", "cx-save-draft-saving", "cx-save-draft-tooltip", - "cx-personaltools-user", "cx-personaltools-anon", "login" ], @@ -1539,7 +1538,6 @@ "cx-save-draft-save-success", "cx-save-draft-saving", "cx-save-draft-tooltip", - "cx-personaltools-user", "cx-personaltools-anon", "login" ], @@ -1685,6 +1683,9 @@ "styles": [ "ui/legacy/styles/mw.cx.ui.ToolsColumn.less" ], + "skinStyles": { + "monobook": [ "ui/legacy/styles/mw.cx.ui.ToolsColumn.monobook.less" ] + }, "dependencies": [ "mw.cx.ui", "mw.cx.ui.ProgressBarWidget" diff --git a/modules/ui/legacy/mw.cx.ui.Header.js b/modules/ui/legacy/mw.cx.ui.Header.js index d65e203..0e8b156 100644 --- a/modules/ui/legacy/mw.cx.ui.Header.js +++ b/modules/ui/legacy/mw.cx.ui.Header.js @@ -116,44 +116,36 @@ * @return {array} menuItems Array of menu items */ mw.cx.ui.Header.prototype.getPersonalMenuItems = function () { - var i, length, menuItem, + var index, menuItem, menuItems = [], personalMenuList = mw.config.get( 'personalMenuList' ); if ( !this.isAnon ) { - menuItems.push( this.addUserMenuOption() ); + menuItem = personalMenuList.user; + menuItems.push( this.createUserMenuOption( menuItem ) ); + delete personalMenuList.user; } - for ( i = 0, length = personalMenuList.length; i < length; i++ ) { - menuItem = personalMenuList[ i ]; - - menuItems.push( new OO.ui.MenuOptionWidget( { - label: menuItem.text, - data: menuItem.href, - accessKey: menuItem.accesskey, - $element: $( '' ) - .attr( { - href: menuItem.href, - title: menuItem.title - } ) - } ) ); + for ( index in personalMenuList ) { + menuItem = personalMenuList[ index ]; + menuItems.push( this.createUserMenuOption( menuItem ) ); } return menuItems; }; -mw.cx.ui.Header.prototype.addUserMenuOption = function () { - var userPageData = mw.config.get( 'userPageData' ), - userLabel = mw.msg( 'cx-personaltools-user' ); +mw.cx.ui.Header.prototype.createUserMenuOption = function ( menuItem ) { + var classes = menuItem.notvisited ? [ 'cx-header__personal-menu-option--missing' ] : []; return new OO.ui.MenuOptionWidget( { - label: userLabel, - data: userPageData.link, - accessKey: userPageData.accesskey, + label: menuItem.text, +
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Display infobar on CX dashboard
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404447 ) Change subject: Display infobar on CX dashboard .. Display infobar on CX dashboard Only hide `.cx-header__bar` and show `.cx-header-infobar`, so that error messages can be visible on CX dashboard as well. Bug: T184972 Change-Id: I81d93f1617d08efab01e022e0a8d441c8b559783 --- M modules/ui/legacy/styles/mw.cx.ui.Header.less M modules/ui/styles/mw.cx.ui.Header.less 2 files changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/47/404447/1 diff --git a/modules/ui/legacy/styles/mw.cx.ui.Header.less b/modules/ui/legacy/styles/mw.cx.ui.Header.less index d2ad30c..dc55bce 100644 --- a/modules/ui/legacy/styles/mw.cx.ui.Header.less +++ b/modules/ui/legacy/styles/mw.cx.ui.Header.less @@ -124,8 +124,7 @@ margin: 0 auto; padding: 10px 40px 0; - .cx-header__bar, - .cx-header-infobar { + .cx-header__bar { display: none; } diff --git a/modules/ui/styles/mw.cx.ui.Header.less b/modules/ui/styles/mw.cx.ui.Header.less index 666d122..34f516d 100644 --- a/modules/ui/styles/mw.cx.ui.Header.less +++ b/modules/ui/styles/mw.cx.ui.Header.less @@ -119,8 +119,7 @@ margin: 0 auto; padding: 10px 40px 0; - .cx-header__bar, - .cx-header-infobar { + .cx-header__bar { display: none; } -- To view, visit https://gerrit.wikimedia.org/r/404447 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81d93f1617d08efab01e022e0a8d441c8b559783 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jquery.uls to fd41bbe5e16a
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404066 ) Change subject: Update jquery.uls to fd41bbe5e16a .. Update jquery.uls to fd41bbe5e16a Bug: T175769 Change-Id: Idf8a407523ed422658ed32ab23fa908494140e3d --- M lib/jquery.uls/css/jquery.uls.css M lib/jquery.uls/css/jquery.uls.grid.css M lib/jquery.uls/css/jquery.uls.lcd.css M lib/jquery.uls/css/jquery.uls.mobile.css M lib/jquery.uls/i18n/cop.json M lib/jquery.uls/i18n/mwl.json D lib/jquery.uls/images/icon-language.png D lib/jquery.uls/images/icon-language.svg A lib/jquery.uls/images/language-ltr.png A lib/jquery.uls/images/language-ltr.svg A lib/jquery.uls/images/language-rtl.png A lib/jquery.uls/images/language-rtl.svg M lib/jquery.uls/src/jquery.uls.core.js M lib/jquery.uls/src/jquery.uls.data.utils.js M lib/jquery.uls/src/jquery.uls.languagefilter.js M lib/jquery.uls/src/jquery.uls.lcd.js M resources/css/ext.uls.pt.less 17 files changed, 288 insertions(+), 278 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/66/404066/1 diff --git a/lib/jquery.uls/css/jquery.uls.css b/lib/jquery.uls/css/jquery.uls.css index 6af44a5..af531f2 100644 --- a/lib/jquery.uls/css/jquery.uls.css +++ b/lib/jquery.uls/css/jquery.uls.css @@ -1,8 +1,8 @@ .uls-trigger { - background: url('../images/icon-language.png') no-repeat left center; + background: url( ../images/language-ltr.png ) no-repeat left center; /* @embed */ - background-image: linear-gradient(transparent, transparent), url('../images/icon-language.svg'); - padding-left: 30px; + background-image: linear-gradient( transparent, transparent ), url( ../images/language-ltr.svg ); + padding-left: 25px; } .uls-menu { @@ -12,10 +12,10 @@ margin-top: 1px; background-color: #fff; border: 1px solid #ccc; - border-color: rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + border-color: rgba( 0, 0, 0, 0.2 ); + -webkit-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); + -moz-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); + box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; @@ -65,9 +65,9 @@ } .uls-search-label { - background: url('../images/search.png') no-repeat center center; + background: url( ../images/search.png ) no-repeat center center; /* @embed */ - background-image: linear-gradient(transparent, transparent), url('../images/search.svg'); + background-image: linear-gradient( transparent, transparent ), url( ../images/search.svg ); background-size: 20px; height: 32px; width: 44px; @@ -88,7 +88,7 @@ width: 100%; /* For the custom clear (X) icon */ padding: 6px 25px 6px 0; - outline: none; + outline: 0; border: 0; display: block; position: absolute; @@ -110,9 +110,9 @@ } .uls-languagefilter-clear { - background: url('../images/clear.png') no-repeat left center; + background: url( ../images/clear.png ) no-repeat left center; /* @embed */ - background-image: linear-gradient(transparent, transparent), url('../images/clear.svg'); + background-image: linear-gradient( transparent, transparent ), url( ../images/clear.svg ); background-size: 15px; cursor: pointer; height: 15px; diff --git a/lib/jquery.uls/css/jquery.uls.grid.css b/lib/jquery.uls/css/jquery.uls.grid.css index 9caf088..f068a86 100644 --- a/lib/jquery.uls/css/jquery.uls.grid.css +++ b/lib/jquery.uls/css/jquery.uls.grid.css @@ -32,15 +32,18 @@ } .grid .highlight { - background: #99; + background: #ff9; } /* The Grid -- */ + .grid .row { width: 100%; max-width: none; min-width: 600px; margin: 0 auto; + /* Nicolas Gallagher's micro clearfix */ + *zoom: 1; } .grid .row .row { @@ -48,6 +51,14 @@ max-width: none; min-width: 0; margin: 0 -5px; +} + +.grid .column, +.grid .columns { + float: left; + min-height: 1px; + padding: 0 5px; + position: relative; } .grid .row.collapse .column, @@ -55,25 +66,12 @@ padding: 0; } -.grid .row .row { - width: auto; - max-width: none; - min-width: 0; - margin: 0 -5px; -} - .grid .row .row.collapse { margin: 0; } -.grid .column, .grid .columns { - float: left; - min-height: 1px; - padding: 0 5px; - position: relative; -} - -.grid .column.centered, .grid .columns.centered { +.grid .column.centered, +.grid
[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jquery.uls to fd41bbe5e16a
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404065 ) Change subject: Update jquery.uls to fd41bbe5e16a .. Update jquery.uls to fd41bbe5e16a Bug: T175769 Change-Id: I4872d13204a221d592de42bf788fdb78e4ae4c21 --- M lib/jquery.uls/css/jquery.uls.css M lib/jquery.uls/css/jquery.uls.grid.css M lib/jquery.uls/css/jquery.uls.lcd.css M lib/jquery.uls/css/jquery.uls.mobile.css M lib/jquery.uls/i18n/cop.json M lib/jquery.uls/i18n/mwl.json D lib/jquery.uls/images/icon-language.png D lib/jquery.uls/images/icon-language.svg A lib/jquery.uls/images/language-ltr.png A lib/jquery.uls/images/language-ltr.svg A lib/jquery.uls/images/language-rtl.png A lib/jquery.uls/images/language-rtl.svg M lib/jquery.uls/src/jquery.uls.core.js M lib/jquery.uls/src/jquery.uls.data.utils.js M lib/jquery.uls/src/jquery.uls.languagefilter.js M lib/jquery.uls/src/jquery.uls.lcd.js M resources/css/ext.uls.pt.less 17 files changed, 288 insertions(+), 278 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/65/404065/1 diff --git a/lib/jquery.uls/css/jquery.uls.css b/lib/jquery.uls/css/jquery.uls.css index 6af44a5..af531f2 100644 --- a/lib/jquery.uls/css/jquery.uls.css +++ b/lib/jquery.uls/css/jquery.uls.css @@ -1,8 +1,8 @@ .uls-trigger { - background: url('../images/icon-language.png') no-repeat left center; + background: url( ../images/language-ltr.png ) no-repeat left center; /* @embed */ - background-image: linear-gradient(transparent, transparent), url('../images/icon-language.svg'); - padding-left: 30px; + background-image: linear-gradient( transparent, transparent ), url( ../images/language-ltr.svg ); + padding-left: 25px; } .uls-menu { @@ -12,10 +12,10 @@ margin-top: 1px; background-color: #fff; border: 1px solid #ccc; - border-color: rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + border-color: rgba( 0, 0, 0, 0.2 ); + -webkit-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); + -moz-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); + box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; @@ -65,9 +65,9 @@ } .uls-search-label { - background: url('../images/search.png') no-repeat center center; + background: url( ../images/search.png ) no-repeat center center; /* @embed */ - background-image: linear-gradient(transparent, transparent), url('../images/search.svg'); + background-image: linear-gradient( transparent, transparent ), url( ../images/search.svg ); background-size: 20px; height: 32px; width: 44px; @@ -88,7 +88,7 @@ width: 100%; /* For the custom clear (X) icon */ padding: 6px 25px 6px 0; - outline: none; + outline: 0; border: 0; display: block; position: absolute; @@ -110,9 +110,9 @@ } .uls-languagefilter-clear { - background: url('../images/clear.png') no-repeat left center; + background: url( ../images/clear.png ) no-repeat left center; /* @embed */ - background-image: linear-gradient(transparent, transparent), url('../images/clear.svg'); + background-image: linear-gradient( transparent, transparent ), url( ../images/clear.svg ); background-size: 15px; cursor: pointer; height: 15px; diff --git a/lib/jquery.uls/css/jquery.uls.grid.css b/lib/jquery.uls/css/jquery.uls.grid.css index 9caf088..f068a86 100644 --- a/lib/jquery.uls/css/jquery.uls.grid.css +++ b/lib/jquery.uls/css/jquery.uls.grid.css @@ -32,15 +32,18 @@ } .grid .highlight { - background: #99; + background: #ff9; } /* The Grid -- */ + .grid .row { width: 100%; max-width: none; min-width: 600px; margin: 0 auto; + /* Nicolas Gallagher's micro clearfix */ + *zoom: 1; } .grid .row .row { @@ -48,6 +51,14 @@ max-width: none; min-width: 0; margin: 0 -5px; +} + +.grid .column, +.grid .columns { + float: left; + min-height: 1px; + padding: 0 5px; + position: relative; } .grid .row.collapse .column, @@ -55,25 +66,12 @@ padding: 0; } -.grid .row .row { - width: auto; - max-width: none; - min-width: 0; - margin: 0 -5px; -} - .grid .row .row.collapse { margin: 0; } -.grid .column, .grid .columns { - float: left; - min-height: 1px; - padding: 0 5px; - position: relative; -} - -.grid .column.centered, .grid .columns.centered { +.grid .column.centered, +.grid
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: CX1: Fix translation view UI overlaps
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403918 ) Change subject: CX1: Fix translation view UI overlaps .. CX1: Fix translation view UI overlaps - Integrate infobar messages into main piece of content, matching the width of header after Id77aa5be3e80. - Fix inaccessible publish target namespace menu. Bug: T184662 Bug: T184130 Change-Id: Ic391b24d880bbd314c8fd5dafb583ec98a25bbd2 --- M modules/ui/legacy/styles/mw.cx.ui.Header.less M modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less M modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less M modules/ui/styles/mw.cx.ui.Infobar.less M modules/widgets/common/ext.cx.common.less 5 files changed, 16 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/18/403918/1 diff --git a/modules/ui/legacy/styles/mw.cx.ui.Header.less b/modules/ui/legacy/styles/mw.cx.ui.Header.less index 3502669..d2ad30c 100644 --- a/modules/ui/legacy/styles/mw.cx.ui.Header.less +++ b/modules/ui/legacy/styles/mw.cx.ui.Header.less @@ -16,7 +16,7 @@ } .cx-header:not( .cx-header--dashboard ) > .cx-header__main { - padding: 10px; + padding: @personal-header-padding; } .cx-header__trademark { @@ -106,7 +106,7 @@ .cx-header__main, .cx-header__trademark { - min-height: 2.5em; + min-height: @personal-header-height; } .cx-header__main:after { @@ -136,6 +136,10 @@ @media only screen and ( max-width: ( @very-narrow - 1px ) ) { padding: 10px 12px 0; } +} + +.cx-header-infobar { + .mw-ui-two-thirds; } .cx-header__bar-container { @@ -197,6 +201,7 @@ left: 0; width: 66.666%; + height: @header-bar-height-legacy; padding: 0; .box-shadow( 0 2px 2px 0 rgba( 0, 0, 0, 0.25 ) ); diff --git a/modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less b/modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less index fa6ec82..0fcece6 100644 --- a/modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less +++ b/modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less @@ -2,15 +2,15 @@ .cx-column--tools { .mw-ui-one-whole(@palm); + .stick-to-side; background-color: @colorGray14; min-height: 100vh; - position: relative; - top: -@header-bar-height-legacy; + top: @personal-header-height + 2 * @personal-header-padding; border-left: 1px solid @colorGray12; &.sticky { - .stick-to-side; + top: 0; @media @palm { .stick-to-bottom; diff --git a/modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less b/modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less index 2c7b5e2..ea4d579 100644 --- a/modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less +++ b/modules/ui/legacy/styles/mw.cx.ui.TranslationColumn.less @@ -1,6 +1,10 @@ @import '../../../widgets/common/ext.cx.common.less'; @import '../../../widgets/common/ext.cx.highlight.less'; +.cx-column.cx-column--translation { + z-index: auto; +} + .cx-column--translation { [contenteditable] { outline: 0; diff --git a/modules/ui/styles/mw.cx.ui.Infobar.less b/modules/ui/styles/mw.cx.ui.Infobar.less index 516e57d..bba6d92 100644 --- a/modules/ui/styles/mw.cx.ui.Infobar.less +++ b/modules/ui/styles/mw.cx.ui.Infobar.less @@ -1,6 +1,5 @@ @import '../../widgets/common/ext.cx.common.less'; .cx-header-infobar { - .mw-ui-item; .mw-ui-one-whole; } diff --git a/modules/widgets/common/ext.cx.common.less b/modules/widgets/common/ext.cx.common.less index b6b9bd3..884d81c 100644 --- a/modules/widgets/common/ext.cx.common.less +++ b/modules/widgets/common/ext.cx.common.less @@ -17,6 +17,8 @@ @max-dashboard-width: 1500px; @header-bar-height-legacy: 40px; +@personal-header-height: 2.5em; +@personal-header-padding: 0.625em; .box-shadow-card() { .box-shadow( 0 1px 1px rgba( 0, 0, 0, 0.15 ) ); -- To view, visit https://gerrit.wikimedia.org/r/403918 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic391b24d880bbd314c8fd5dafb583ec98a25bbd2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Fix seen notifications appearing as unseen on mobile
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403427 ) Change subject: Fix seen notifications appearing as unseen on mobile .. Fix seen notifications appearing as unseen on mobile Important note: Make sure to distinguish unseen from unread One way to reproduce minerva and non-minerva notification inconsistencies: - Have all your alerts and notices seen. This is displayed with grayed out number on vector skin or no number at all, if you have (marked as) read. - Generate new alert or notice (one is enough) in your preferred way. - You can check minerva and non-minerva at this step. Both should be in sync. But don't perform any additional action. - Open the notification popup in some non-minerva skin (I have tried with vector and monobook), marking it as seen. - Check the notification icon in minerva. At this point, you should see notification displayed as unseen. The reason bug appeared in the first place is that alert/notice timestamps were mixed up when seen time is obtained. We get seen time from EchoSeenTime class, where we get smaller of the two timestamps, using PHP method `min()`. See I27109ee6a248. Then, we get last unread notification timestamp (which can be either alert or notice), and compare that to seen time. That leads to the situation when you have only one of alerts or notices with unread items, smaller timestamp is used for seen, and most recent for unread, at which point we compare timestamps for two separate things. Previous behavior of getting seen timestamps (using max instead of min) would probably solve the problem, but some other inconsistencies might arrise. This should prevent any weird and unpredictable behavior to happen. Bug: T183076 Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a --- M includes/skins/SkinMinerva.php 1 file changed, 18 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue refs/changes/27/403427/1 diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index b0fc312..af49864 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -346,15 +346,6 @@ } /** -* Get the last time user has seen Echo notifications -* @param User $user -* @return string|bool Timestamp in TS_ISO_8601 format, or false if no stored time -*/ - protected function getEchoSeenTime( User $user ) { - return EchoSeenTime::newFromUser( $user )->getTime( 'all', TS_ISO_8601 ); - } - - /** * Get formatted Echo notification count * @param int $count * @return string @@ -388,20 +379,28 @@ // Don't show the secondary button at all $notificationsTitle = null; } else { - $notifUser = $this->getEchoNotifUser( $user ); - $echoSeenTime = $this->getEchoSeenTime( $user ); - $notificationsMsg = $this->msg( 'mobile-frontend-user-button-tooltip' )->text(); - $notifLastUnreadTime = $notifUser->getLastUnreadNotificationTime(); + + $notifUser = $this->getEchoNotifUser( $user ); $count = $notifUser->getNotificationCount(); + $seenTime = EchoSeenTime::newFromUser( $user ); + $seenAlertTime = $seenTime->getTime( 'alert', TS_ISO_8601 ); + $seenMsgTime = $seenTime->getTime( 'message', TS_ISO_8601 ); + + $alertNotificationTimestamp = $notifUser->getLastUnreadAlertTime(); + $msgNotificationTimestamp = $notifUser->getLastUnreadMessageTime(); + $isZero = $count === 0; - $hasUnseen = ( - $count > 0 && - $echoSeenTime !== false && - $notifLastUnreadTime !== false && - $echoSeenTime < $notifLastUnreadTime->getTimestamp( TS_ISO_8601 ) - ); + $hasUnseen = $count > 0 && + ( + $seenMsgTime !== false && $msgNotificationTimestamp !== false && + $seenMsgTime < $msgNotificationTimestamp->getTimestamp( TS_ISO_8601 ) + ) || + ( + $seenAlertTime !== false && $alertNotificationTimestamp !== false && + $seenAlertTime <
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix jump-to-nav element overlap on RCFilters
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403203 ) Change subject: Fix jump-to-nav element overlap on RCFilters .. Fix jump-to-nav element overlap on RCFilters "Jump to: navigation, search" (English version of message) is visible on Vector and Monobook when user tabs through the page. Hiding #contentSub element in Ifcde40c66fbb caused margin to be removed between title and "jump-to" element. Similar changes to #contentSub were made in Id58972b4b7ca, but reverted in I84c89053, because it caused T178626. English Wikipedia acted with changing MediaWiki:Common.css file (last two selectors in the file, at the time of writing this). That customization makes this bug not appearing on enwiki. Bug: T181154 Change-Id: I421cebec2acfd3ffe0cebd325f0fe2214dc5a8d7 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/03/403203/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index db439e3..413d45b 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -132,6 +132,11 @@ display: none; } + #jump-to-nav { + margin-top: -0.5em; + margin-bottom: 0.5em; + } + // Make the watchlist-details message display while loading, but make it not take up any // space. This makes the min-height trick work better. .watchlistDetails { -- To view, visit https://gerrit.wikimedia.org/r/403203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I421cebec2acfd3ffe0cebd325f0fe2214dc5a8d7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Fix notifications always appearing as unseen
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401755 ) Change subject: Fix notifications always appearing as unseen .. Fix notifications always appearing as unseen After Ie92b223a48 removed $flags parameter from EchoSeenTime::getTime(), we got 0 as $format passed to the method, which caused mismatch in timestamp string formats when comparing to $notifLastUnreadTime timestamp, which caused notifications to appear always as unseen (although that's unpredictable, because of wrong format used). Bug: T183076 Change-Id: Ia4ff0bc4c3b7ed80b5a22a9ca0052f1909469180 --- M includes/skins/SkinMinerva.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue refs/changes/55/401755/1 diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 439d47c..b0fc312 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -351,7 +351,7 @@ * @return string|bool Timestamp in TS_ISO_8601 format, or false if no stored time */ protected function getEchoSeenTime( User $user ) { - return EchoSeenTime::newFromUser( $user )->getTime( 'all', /*flags*/ 0, TS_ISO_8601 ); + return EchoSeenTime::newFromUser( $user )->getTime( 'all', TS_ISO_8601 ); } /** -- To view, visit https://gerrit.wikimedia.org/r/401755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4ff0bc4c3b7ed80b5a22a9ca0052f1909469180 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/MinervaNeue Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Change "comment" to "post" in English messages
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401747 ) Change subject: Change "comment" to "post" in English messages .. Change "comment" to "post" in English messages Bug: T144630 Change-Id: I02770a384e0d57c95a80cdf81290af66323ae3ab --- M i18n/en.json 1 file changed, 18 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/47/401747/1 diff --git a/i18n/en.json b/i18n/en.json index 7982702..5a53bb9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -57,22 +57,22 @@ "flow-topic-collapse-siderail": "Read at full width", "flow-topic-expand-siderail": "Read at fixed width", "flow-edit-header-link": "Edit description", - "flow-post-moderated-toggle-hide-show": "Show comment {{GENDER:$1|hidden}} by $2", - "flow-post-moderated-toggle-delete-show": "Show comment {{GENDER:$1|deleted}} by $2", - "flow-post-moderated-toggle-suppress-show": "Show comment {{GENDER:$1|suppressed}} by $2", - "flow-post-moderated-toggle-hide-hide": "Hide comment {{GENDER:$1|hidden}} by $2", - "flow-post-moderated-toggle-delete-hide": "Hide comment {{GENDER:$1|deleted}} by $2", - "flow-post-moderated-toggle-suppress-hide": "Hide comment {{GENDER:$1|suppressed}} by $2", + "flow-post-moderated-toggle-hide-show": "Show post {{GENDER:$1|hidden}} by $2", + "flow-post-moderated-toggle-delete-show": "Show post {{GENDER:$1|deleted}} by $2", + "flow-post-moderated-toggle-suppress-show": "Show post {{GENDER:$1|suppressed}} by $2", + "flow-post-moderated-toggle-hide-hide": "Hide post {{GENDER:$1|hidden}} by $2", + "flow-post-moderated-toggle-delete-hide": "Hide post {{GENDER:$1|deleted}} by $2", + "flow-post-moderated-toggle-suppress-hide": "Hide post {{GENDER:$1|suppressed}} by $2", "flow-topic-moderated-reason-prefix": "Reason:", - "flow-hide-post-content": "This comment was {{GENDER:$1|hidden}} by $1 ([$2 history])", + "flow-hide-post-content": "This post was {{GENDER:$1|hidden}} by $1 ([$2 history])", "flow-hide-title-content": "This topic was {{GENDER:$1|hidden}} by $1", "flow-hide-header-content": "{{GENDER:$1|Hidden}} by $2", "flow-hide-usertext": "$1", - "flow-delete-post-content": "This comment was {{GENDER:$1|deleted}} by $1 ([$2 history])", + "flow-delete-post-content": "This post was {{GENDER:$1|deleted}} by $1 ([$2 history])", "flow-delete-title-content": "This topic was {{GENDER:$1|deleted}} by $1", "flow-delete-header-content": "{{GENDER:$1|Deleted}} by $2", "flow-delete-usertext": "$1", - "flow-suppress-post-content": "This comment was {{GENDER:$1|suppressed}} by $1 ([$2 history])", + "flow-suppress-post-content": "This post was {{GENDER:$1|suppressed}} by $1 ([$2 history])", "flow-suppress-title-content": "This topic was {{GENDER:$1|suppressed}} by $1", "flow-suppress-header-content": "{{GENDER:$1|Suppressed}} by $2", "flow-suppress-usertext": "Username suppressed", @@ -226,7 +226,7 @@ "flow-edit-title-submit-anonymously": "Change title anonymously", "flow-edit-post-submit": "Submit changes", "flow-edit-post-submit-anonymously": "Submit changes anonymously", - "flow-rev-message-edit-post": "$1 {{GENDER:$2|edited}} a [$3 comment] on \"$4\"", + "flow-rev-message-edit-post": "$1 {{GENDER:$2|edited}} a [$3 post] on \"$4\"", "flow-rev-message-edit-post-recentchanges": "$1", "flow-rev-message-edit-post-recentchanges-summary": "{{GENDER:$2|Edited}} a post", "flow-rev-message-edit-post-contributions": "", @@ -251,14 +251,14 @@ "flow-rev-message-create-topic-summary-irc": "$2 {{GENDER:$2|created}} topic summary on $3", "flow-rev-message-edit-topic-summary": "$1 {{GENDER:$2|edited}} topic summary on $3", "flow-rev-message-edit-topic-summary-irc": "$2 {{GENDER:$2|edited}} topic summary on $3", - "flow-rev-message-hid-post": "$1 {{GENDER:$2|hid}} a [$4 comment] on \"$6\" ($5)", - "flow-rev-message-hid-post-irc": "$2 {{GENDER:$2|hid}} a comment on \"$6\" ($5)", - "flow-rev-message-deleted-post": "$1 {{GENDER:$2|deleted}} a [$4 comment] on \"$6\" ($5)", - "flow-rev-message-deleted-post-irc": "$2 {{GENDER:$2|deleted}} a comment on \"$6\" ($5)", - "flow-rev-message-suppressed-post": "$1 {{GENDER:$2|suppressed}} a [$4 comment] on \"$6\" ($5)", - "flow-rev-message-suppressed-post-irc": "$2 {{GENDER:$2|suppressed}} a comment on \"$6\" ($5)", - "flow-rev-message-restored-post": "$1 {{GENDER:$2|restored}} a [$4 comment] on \"$6\" ($5)", - "flow-rev-message-restored-post-irc": "$2 {{GENDER:$2|restored}} a comment on \"$6\" ($5)", + "flow-rev-message-hid-post": "$1 {{GENDER:$2|hid}} a [$4 post] on \"$6\"
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix "Mark as read" button icon on no-JS
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401738 ) Change subject: Fix "Mark as read" button icon on no-JS .. Fix "Mark as read" button icon on no-JS Bug: T182167 Change-Id: I2c386e1ab2c95d2d1034c8d366d39c12827b3d22 --- M modules/styles/LabelIconWidget.less 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/38/401738/1 diff --git a/modules/styles/LabelIconWidget.less b/modules/styles/LabelIconWidget.less index 9aec81f..bffd2a8 100644 --- a/modules/styles/LabelIconWidget.less +++ b/modules/styles/LabelIconWidget.less @@ -1,5 +1,6 @@ .oo-ui-labelIconWidget { display: table; + padding-left: 1.5em; } .oo-ui-labelIconWidget-row { @@ -10,4 +11,8 @@ display: table-cell; vertical-align: middle; } + + .oo-ui-iconElement-icon { + left: 0.5em; + } } -- To view, visit https://gerrit.wikimedia.org/r/401738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c386e1ab2c95d2d1034c8d366d39c12827b3d22 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use new 'lightbulb' icon
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401638 ) Change subject: Use new 'lightbulb' icon .. Use new 'lightbulb' icon Since I3e59bf2419 is merged and we have OOjs UI to v0.24.4, we can drop the replacement 'bright' icon and use 'lightbulb', as specified in original mockup. Change-Id: I0e9d65dd98c43f1b28bf3d863269e29bcf7558a1 --- M modules/dashboard/ext.cx.dashboard.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/38/401638/1 diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index 9ced7c0..1210535 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -40,7 +40,7 @@ }, narrow: { label: undefined, - icon: 'bright' + icon: 'lightbulb' } }; } -- To view, visit https://gerrit.wikimedia.org/r/401638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e9d65dd98c43f1b28bf3d863269e29bcf7558a1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Truncate long notification messages
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401634 ) Change subject: Truncate long notification messages .. Truncate long notification messages Bug: T170347 Depends-On: Ib01a8c303304064dde3ce983b817d93a88a5affd Change-Id: I3c1cf115722d56e8e84728dd302b9f6e2b14e7e3 --- M includes/PageTriageUtil.php 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage refs/changes/34/401634/1 diff --git a/includes/PageTriageUtil.php b/includes/PageTriageUtil.php index 45fea44..1db08ef 100644 --- a/includes/PageTriageUtil.php +++ b/includes/PageTriageUtil.php @@ -397,12 +397,27 @@ ]; if ( $extra ) { + $extra['note'] = self::truncateLongText( $extra['note'] ); $params['extra'] = $extra; } EchoEvent::create( $params ); } + /** +* @param string $text The text to truncate. +* @param int $length Maximum number of characters. +* @param string $ellipsis String to append to the end of truncated text. +* @return string +*/ + public static function truncateLongText( $text, $length = 150, $ellipsis = '...' ) { + if ( !is_string( $text ) ) { + return $text; + } + + return RequestContext::getMain()->getLanguage()->mb_truncate( $text, $length, $ellipsis ); + } + } class MWPageTriageUtilInvalidNumberException extends Exception { -- To view, visit https://gerrit.wikimedia.org/r/401634 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c1cf115722d56e8e84728dd302b9f6e2b14e7e3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageTriage Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Support long titles in selected source page
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400452 ) Change subject: Support long titles in selected source page .. Support long titles in selected source page - When the title is longer than 60, reduce the font size to 16px. - Make sure there is padding around the selected page detail info. - Don't use ellipsis to truncate language codes. Only truncate full, autonym language names. - Reduce smallest supported width for modal selected source page dialog, from 375px to 320px. Make dialog width more uniform on 700px-1500px range. - Hide discard button on selected source page for screens below 500px. - Remove language filter duplicate code in ext.cx.lists.common.less Bug: T181701 Change-Id: I69b8a541b32f4ccd81eef110086dc6cb43899d41 --- M modules/dashboard/styles/ext.cx.lists.common.less M modules/source/ext.cx.SelectedSourcePage.js M modules/source/styles/ext.cx.SelectedSourcePage.less M modules/ui/styles/mw.cx.ui.LanguageFilter.less 4 files changed, 46 insertions(+), 111 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/52/400452/1 diff --git a/modules/dashboard/styles/ext.cx.lists.common.less b/modules/dashboard/styles/ext.cx.lists.common.less index 1497887..9a40089 100644 --- a/modules/dashboard/styles/ext.cx.lists.common.less +++ b/modules/dashboard/styles/ext.cx.lists.common.less @@ -43,97 +43,14 @@ .flex-center-justify; - .translation-language-filter { - background-color: @colorGray15; - .box-sizing( border-box ); - max-width: 33.33%; - max-height: 34px; - border: 1px solid @colorGray10; - border-radius: @borderRadius; - padding: 0; + > span { + min-width: 0; + overflow-wrap: break-word; + word-wrap: break-word; + } - .flex-display( box ); // Support 2009 syntax - .flex-display; - - .translation-language-source-container, - .translation-language-target-container { - position: relative; - .box-sizing( border-box ); - cursor: pointer; - - .flex-item; - overflow: hidden; - } - - .translation-language-source-container { - margin-right: -8px; - padding-right: 8px; - } - - .translation-language-target-container { - margin-left: -8px; - padding-left: 8px; - } - - .translation-source-language-filter, - .translation-target-language-filter { - background-color: @colorGray15; - color: @colorGray2; - font-size: 16px; - line-height: 1; - - @media only screen and ( min-width: @narrow ) { - overflow: hidden; - text-overflow: ellipsis; - } - white-space: nowrap; - } - - .translation-source-language-filter { - padding: 8px 12px 8px 16px; - } - - .translation-target-language-filter { - padding: 8px 16px 8px 12px; - } - - .translation-language-arrow { - position: relative; - width: 0; - height: 32px; - margin-right: 16px; - } - - .translation-language-arrow:after, - .translation-language-arrow:before { - content: ' '; - - position: absolute; - top: 50%; - left: 100%; - - width: 0; - height: 0; - border: solid transparent; - - pointer-events: none; - } - - .translation-language-arrow:after { - margin-top: -16px; - border-color: rgba( 255, 255, 255, 0 ); - border-left-color: @colorGray15; - border-width: 16px; - border-left-width: 12px; - } - - .translation-language-arrow:before { - margin-top: -17px; - border-color: rgba( 157, 157, 157, 0 ); - border-left-color: @colorGray10; - border-width: 17px; - border-left-width: 13px; - } + .cx-language-filter { + margin-left: 8px; } } diff
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Remove @file and @ingroup annotations in comments
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400425 ) Change subject: Remove @file and @ingroup annotations in comments .. Remove @file and @ingroup annotations in comments Change-Id: Ic718f3d1eeb9c4add622d6bcbc4429e0bea70fd1 --- M ContentTranslation.alias.php M ContentTranslation.hooks.php M api/ApiContentTranslationConfiguration.php M api/ApiContentTranslationDelete.php M api/ApiContentTranslationPublish.php M api/ApiContentTranslationSave.php M api/ApiContentTranslationSuggestionList.php M api/ApiContentTranslationToken.php M api/ApiQueryContentTranslation.php M api/ApiQueryContentTranslationCorpora.php M api/ApiQueryContentTranslationLanguageTrend.php M api/ApiQueryContentTranslationStats.php M api/ApiQueryContentTranslationSuggestions.php M api/ApiQueryLangLinksCount.php M api/ApiQueryPublishedTranslations.php M api/ApiQueryTranslatorStats.php M includes/AbuseFilterCheck.php M includes/CorporaLookup.php M includes/RestbaseClient.php M includes/Stats.php M includes/TranslationStorageManager.php M includes/TranslationUnit.php M modules/base/ext.cx.model.js M modules/dashboard/ext.cx.recommendtool.client.js M modules/editor/ext.cx.editor.js M modules/entrypoint/ext.cx.betafeature.notification.js M modules/entrypoint/ext.cx.entrypoint.js M modules/entrypoint/ext.cx.interlanguagelink.js M modules/eventlogging/ext.cx.eventlogging.js M modules/publish/ext.cx.publish.dialog.js M modules/publish/ext.cx.publish.js M modules/publish/ext.cx.wikibase.link.js M modules/source/ext.cx.source.js M modules/stats/ext.cx.stats.js M modules/tools/ext.cx.tools.categories.js M modules/tools/ext.cx.tools.dictionary.js M modules/tools/ext.cx.tools.formatter.js M modules/tools/ext.cx.tools.gallery.js M modules/tools/ext.cx.tools.images.js M modules/tools/ext.cx.tools.instructions.js M modules/tools/ext.cx.tools.js M modules/tools/ext.cx.tools.link.js M modules/tools/ext.cx.tools.manager.js M modules/tools/ext.cx.tools.mt.card.js M modules/tools/ext.cx.tools.mt.js M modules/tools/ext.cx.tools.mtabuse.js M modules/tools/ext.cx.tools.poem.js M modules/tools/ext.cx.tools.reference.js M modules/tools/ext.cx.tools.template.card.js M modules/tools/ext.cx.tools.template.editor.js M modules/tools/ext.cx.tools.template.js M modules/tours/ext.cx.tours.publish.init.js M modules/translation/ext.cx.translation.aligner.js M modules/translation/ext.cx.translation.conflict.js M modules/translation/ext.cx.translation.js M modules/translation/ext.cx.translation.loader.js M modules/translation/ext.cx.translation.progress.js M modules/ui/legacy/mw.cx.ui.SourceColumn.js M modules/ui/legacy/mw.cx.ui.ToolsColumn.js M modules/ui/legacy/mw.cx.ui.TranslationColumn.js M modules/ui/legacy/mw.cx.ui.TranslationView.js M modules/ui/mw.cx.ui.js M modules/ui/widgets/mw.cx.ui.PublishSettingsWidget.js M modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js M modules/util/ext.cx.util.js M modules/util/ext.cx.util.selection.js M modules/widgets/feedback/ext.cx.feedback.js M modules/widgets/progressbar/ext.cx.progressbar.js M modules/widgets/spinner/ext.cx.spinner.js M modules/widgets/templates/mw.cx.widgets.TemplateParamOptionWidget.js M modules/widgets/translator/ext.cx.translator.js M scripts/dump-corpora.php M scripts/fix-stats.php M scripts/manage-lists.php M specials/SpecialContentTranslation.php M specials/SpecialContentTranslationStats.php M tests/qunit/publish/ext.cx.publish.prepare.test.js M tests/qunit/tools/ext.cx.tools.mtabuse.test.js M tests/qunit/tools/ext.cx.tools.template.test.js M tests/qunit/ui/mw.cx.ui.Infobar.test.js 80 files changed, 0 insertions(+), 105 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/25/400425/1 diff --git a/ContentTranslation.alias.php b/ContentTranslation.alias.php index 7f5e6e8..29258de 100644 --- a/ContentTranslation.alias.php +++ b/ContentTranslation.alias.php @@ -2,8 +2,6 @@ /** * Special page aliases for extension ContentTranslation. * - * @file - * @ingroup Extensions * @copyright 2014 ContentTranslation Team and others; see AUTHORS.txt * @license GPL-2.0+; see LICENSE.txt */ diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php index 6d14daa..4d3b877 100644 --- a/ContentTranslation.hooks.php +++ b/ContentTranslation.hooks.php @@ -2,8 +2,6 @@ /** * Hooks for ContentTranslation extension. * - * @file - * @ingroup Extensions * @copyright See AUTHORS.txt * @license GPL-2.0+ */ diff --git a/api/ApiContentTranslationConfiguration.php b/api/ApiContentTranslationConfiguration.php index dc23502..e2bf6c5 100644 --- a/api/ApiContentTranslationConfiguration.php +++ b/api/ApiContentTranslationConfiguration.php @@ -5,7 +5,6 @@ * Configuration currently contains information about sections that should be ignored * and template name and parameter mappings for the most common templates. * - * @file * @copyright
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Add nearby suggestions
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400266 ) Change subject: Add nearby suggestions .. Add nearby suggestions - Use geolocation API, with GeoIP cookie fallback, to determine user's approximate position. According to that position, provide nearby pages to user when there is no input query. - Add MenuLabelWidget to enable adding labels to search results. This allows to label two different suggestion lists: recent edits and nearby. - Fix error handling when setting selected source page. Bug: T111094 Change-Id: I1a6457e6e9ab14016c4e10d99a39cb4e8901d7c6 --- M extension.json M i18n/en.json M i18n/qqq.json M modules/source/ext.cx.SelectedSourcePage.js M modules/source/ext.cx.SourcePageSelector.js M modules/source/styles/ext.cx.SourcePageSelector.less A modules/ui/widgets/mw.cx.ui.MenuLabelWidget.js M modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js 8 files changed, 226 insertions(+), 47 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/66/400266/1 diff --git a/extension.json b/extension.json index 57f785e..bc91309 100644 --- a/extension.json +++ b/extension.json @@ -335,7 +335,6 @@ ], "messages": [ "cx-source-page-selector-input-placeholder", - "cx-source-page-selector-recent-edits-header", "cx-source-page-selector-no-suggestions", "cx-source-page-selector-no-search-results" ] @@ -2069,11 +2068,16 @@ "scripts": [ "ui/widgets/mw.cx.ui.PageSelectorWidget.js" ], + "messages": [ + "cx-page-selector-widget-recent-edits-label", + "cx-page-selector-widget-nearby-label" + ], "dependencies": [ "ext.cx.sitemapper", "jquery.uls.data", "mediawiki.widgets", "mw.cx.ui", + "mw.cx.ui.MenuLabelWidget", "mw.cx.ui.TitleOptionWidget", "oojs", "oojs-ui.styles.icons-interactions" @@ -2095,6 +2099,16 @@ "mw.cx.ui", "mediawiki.widgets" ] + }, + "mw.cx.ui.MenuLabelWidget": { + "targets": [ "desktop", "mobile" ], + "scripts": [ + "ui/widgets/mw.cx.ui.MenuLabelWidget.js" + ], + "dependencies": [ + "mw.cx.ui", + "oojs-ui-core" + ] } }, "ResourceFileModulePaths": { diff --git a/i18n/en.json b/i18n/en.json index 46b18b0..561bf30 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -85,8 +85,9 @@ "cx-tools-link-hover-tooltip": "Click to open", "cx-warning-unsaved-translation": "You have unsaved translations.", "cx-error-page-not-found": "The \"$1\" page could not be found in $2 Wikipedia", + "cx-page-selector-widget-recent-edits-label": "Recently edited by you", + "cx-page-selector-widget-nearby-label": "Nearby", "cx-source-page-selector-input-placeholder": "Search for a page to translate", - "cx-source-page-selector-recent-edits-header": "Recently edited by you", "cx-source-page-selector-no-suggestions": "Think of any topic of your interest. You don’t need to be an expert to create a great translation.", "cx-source-page-selector-no-search-results": "No pages found for \"$1\" in $2", "cx-selected-source-page-start-translation-button": "Start translation", diff --git a/i18n/qqq.json b/i18n/qqq.json index 62231bf..a94e297 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -94,8 +94,9 @@ "cx-tools-link-hover-tooltip": "Tooltip text shown when the mouse is over the link with shift or control key is pressed.", "cx-warning-unsaved-translation": "Warning message shown when user tried to navigate away when translation is not saved.", "cx-error-page-not-found": "Error message shown when a page is not found in a given language wikipedia\n\nParameters:\n* $1 - the title of the page.\n* $2 - The language name", + "cx-page-selector-widget-recent-edits-label": "Label used in \"New translation\" dialog, above the suggestions based on user's recently edited pages.", + "cx-page-selector-widget-nearby-label": "Label used in \"New translation\" dialog, above the suggestions
[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Fix detached RCFilters menu
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399802 ) Change subject: Fix detached RCFilters menu .. Fix detached RCFilters menu In attempts to fix RCFilters menu overlap with other UI elements when opening upwards, I1fe6b8b2c9 adds `z-index` rule to overlay element. But as part of the same rule, `position: relative` is added which cascades the absolute positioned overlay, causing it to appear in natural flow of document, which causes menu positioning parameters to render the menu detached from RCFilters. Bug: T183442 Change-Id: I3f7db005730d045b2278753cfd655169a96c60a9 --- M skinStyles/ooui.less 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector refs/changes/02/399802/1 diff --git a/skinStyles/ooui.less b/skinStyles/ooui.less index e9f5961..8749dd9 100644 --- a/skinStyles/ooui.less +++ b/skinStyles/ooui.less @@ -1,6 +1,9 @@ .oo-ui-windowManager-modal, -.skin-vector .mw-rcfilters-ui-overlay, .skin-vector .ve-ui-overlay-global { z-index: 101; position: relative; } + +.skin-vector .mw-rcfilters-ui-overlay { + z-index: 101; +} -- To view, visit https://gerrit.wikimedia.org/r/399802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f7db005730d045b2278753cfd655169a96c60a9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change Recent Changes "Number of edits..." preference message
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399673 ) Change subject: Change Recent Changes "Number of edits..." preference message .. Change Recent Changes "Number of edits..." preference message Bug: T183030 Change-Id: Ic37b0f815873e3c503446aada12293157fb3b0eb --- M languages/i18n/en.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/73/399673/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 301408f..f299a60 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1042,8 +1042,8 @@ "stub-threshold-disabled": "Disabled", "recentchangesdays": "Days to show in recent changes:", "recentchangesdays-max": "Maximum $1 {{PLURAL:$1|day|days}}", - "recentchangescount": "Number of edits to show by default:", - "prefs-help-recentchangescount": "This includes recent changes, page histories, and logs.", + "recentchangescount": "Number of edits to show in recent changes, page histories, and in logs, by default:", + "prefs-help-recentchangescount": "Maximum number: 1000", "prefs-help-watchlist-token2": "This is the secret key to the web feed of your watchlist.\nAnyone who knows it will be able to read your watchlist, so do not share it.\nIf you need to, [[Special:ResetTokens|you can reset it]].", "savedprefs": "Your preferences have been saved.", "savedrights": "The user groups of {{GENDER:$1|$1}} have been saved.", -- To view, visit https://gerrit.wikimedia.org/r/399673 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic37b0f815873e3c503446aada12293157fb3b0eb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix old style filters disappearing regression
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399440 ) Change subject: Fix old style filters disappearing regression .. Fix old style filters disappearing regression Add FormWrapperWidget after controller is initialized, to avoid it being removed when changes list view model is updated during initialization. Change-Id: I3bd4d1bc9efbcdbf99493498267ed1a690fd1ab2 --- M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MainWrapperWidget.js 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/40/399440/1 diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js index f770899..fe8bcf4 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js @@ -100,6 +100,8 @@ conditionalViews ); + mainWrapperWidget.initFormWidget( specialPage ); + $( 'a.mw-helplink' ).attr( 'href', 'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:New_filters_for_edit_review' diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MainWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MainWrapperWidget.js index e64ffd8..8002045 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MainWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MainWrapperWidget.js @@ -61,7 +61,6 @@ $( 'body' ) .append( this.$overlay ) .addClass( 'mw-rcfilters-ui-initialized' ); - this.initFormWidget(); }; /* Initialization */ -- To view, visit https://gerrit.wikimedia.org/r/399440 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3bd4d1bc9efbcdbf99493498267ed1a690fd1ab2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix sidebar regression
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399352 ) Change subject: Fix sidebar regression .. Fix sidebar regression - After removing clearfix on dashboard wrapper in Idee6714287, the wrapper collapsed because of floated children, which in turn introduced regression of sidebar not becoming sticky on scroll. Change-Id: Ie6de5eaf97084a3bc9510a930db88dbeb23e60b6 --- M modules/dashboard/styles/ext.cx.dashboard.less 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/52/399352/1 diff --git a/modules/dashboard/styles/ext.cx.dashboard.less b/modules/dashboard/styles/ext.cx.dashboard.less index 541550b..9c88a70 100644 --- a/modules/dashboard/styles/ext.cx.dashboard.less +++ b/modules/dashboard/styles/ext.cx.dashboard.less @@ -14,6 +14,18 @@ @media only screen and ( max-width: ( @very-narrow - 1px ) ) { padding: 20px 12px; } + + /* Clearfix */ + &:after { + // Non empty content value avoids an Opera bug that creates space around + // clearfixed elements if the contenteditable attribute is also present + // somewhere in the HTML. + content: ' '; + visibility: hidden; + display: block; + height: 0; + clear: both; + } } .cx-dashboard-sidebar { -- To view, visit https://gerrit.wikimedia.org/r/399352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6de5eaf97084a3bc9510a930db88dbeb23e60b6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Fix Contributions ORES preference and form override
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399122 ) Change subject: Fix Contributions ORES preference and form override .. Fix Contributions ORES preference and form override - If form is submitted: filter is enabled if the parameter is set, disabled otherwise. - If Contributions page is opened regularly: filter is enabled if the parameter is set or the preference is enabled, disabled otherwise. Bug: T182911 Change-Id: I837540e3dcbcc42e7ded8345469c4770e58d8f55 --- M includes/Hooks/ContributionsHooksHandler.php 1 file changed, 15 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/22/399122/1 diff --git a/includes/Hooks/ContributionsHooksHandler.php b/includes/Hooks/ContributionsHooksHandler.php index 01b2c8e..338108c 100644 --- a/includes/Hooks/ContributionsHooksHandler.php +++ b/includes/Hooks/ContributionsHooksHandler.php @@ -141,21 +141,28 @@ } /** -* Get user preference for hiding non-damaging edits, either by: -* - URL parameter 'hidenondamaging' or -* - User preference 'oresRCHideNonDamaging' +* Get user preference for hiding non-damaging edits. +* - If form is submitted: filter is enabled if the hidenondamaging is set, disabled otherwise. +* - If Contributions page is opened regularly: filter is enabled if the parameter is set or +* the preference is enabled, disabled otherwise. * * @param IContextSource $context -* @return string|boolean $option URL string param or boolean user preference +* @return boolean True if non damaging preference should be enabled */ private static function hideNonDamagingPreference( IContextSource $context ) { - $option = $context->getRequest()->getVal( 'hidenondamaging' ); + $checkbox = $context->getRequest()->getBool( 'hidenondamaging' ); + $preference = $context->getUser()->getOption( 'oresRCHideNonDamaging' ); - if ( $option === null ) { - $option = $context->getUser()->getOption( 'oresRCHideNonDamaging' ); + // Unchecked options aren't submitted with HTML form, so we have hidenondamaging=1 or null. + // To distinguish when form on Special:Contributions is submitted, we check for + // hidden parameter on the Special:Contributions form, with name 'limit'. + // Watchlist special page defines similar hidden input field, called 'action' + // which is used in the same fashion as we are using 'limit' here. + if ( $context->getRequest()->getBool( 'limit' ) ) { + return $checkbox; } - return $option; + return $preference || $checkbox; } } -- To view, visit https://gerrit.wikimedia.org/r/399122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I837540e3dcbcc42e7ded8345469c4770e58d8f55 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Make Contributions ORES preference sticky
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398841 ) Change subject: Make Contributions ORES preference sticky .. Make Contributions ORES preference sticky - When the user sets the ORES preference on RC tab, the option on the Contributors page gets changed to reflect that preference. - If the user checks/unchecks the checkbox on Contributions page, then the checkbox state becomes sticky on Contributors. - Whichever setting, the local control or the preference, was touched last, sticks, until there is another change. Bug: T182911 Change-Id: Ifc42c20e0f31d9db54cdccec7019d6216cd1279c --- M extension.json M includes/Hooks/ContributionsHooksHandler.php M includes/Hooks/PreferencesHookHandler.php 3 files changed, 47 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/41/398841/1 diff --git a/extension.json b/extension.json index 89f49be..773a381 100644 --- a/extension.json +++ b/extension.json @@ -63,6 +63,9 @@ "GetPreferences": [ "ORES\\Hooks\\PreferencesHookHandler::onGetPreferences" ], + "PreferencesFormPreSave": [ + "ORES\\Hooks\\PreferencesHookHandler::onPreferencesFormPreSave" + ], "LoadExtensionSchemaUpdates": [ "ORES\\Hooks::onLoadExtensionSchemaUpdates" ], diff --git a/includes/Hooks/ContributionsHooksHandler.php b/includes/Hooks/ContributionsHooksHandler.php index 01b2c8e..75ad48b 100644 --- a/includes/Hooks/ContributionsHooksHandler.php +++ b/includes/Hooks/ContributionsHooksHandler.php @@ -141,21 +141,30 @@ } /** -* Get user preference for hiding non-damaging edits, either by: -* - URL parameter 'hidenondamaging' or -* - User preference 'oresRCHideNonDamaging' +* Get user preference for hiding non-damaging edits. Update 'oresContribsHideNonDamaging' +* hidden preference, if 'hidenondamaging' has different value. * * @param IContextSource $context -* @return string|boolean $option URL string param or boolean user preference +* @return boolean $option Boolean user preference */ private static function hideNonDamagingPreference( IContextSource $context ) { - $option = $context->getRequest()->getVal( 'hidenondamaging' ); - - if ( $option === null ) { - $option = $context->getUser()->getOption( 'oresRCHideNonDamaging' ); + $user = $context->getUser(); + if ( $user->isAnon() ) { + return $context->getRequest()->getVal( 'hidenondamaging' ); } - return $option; + $option = $context->getRequest()->getBool( 'hidenondamaging' ); + $pref = $user->getBoolOption( 'oresContribsHideNonDamaging' ); + + // HACK: Number of parameters is used to distinguish submitted form on contributions page + // from opening /Special:Contributions/Username, where 'hidenondamaging' is unset, + // which would always be changing saved hidden preference - oresContribsHideNonDamaging. + if ( count( $context->getRequest()->getValues() ) > 1 && $option !== $pref ) { + $user->setOption( 'oresContribsHideNonDamaging', $option ); + $user->saveSettings(); + } + + return $user->getBoolOption( 'oresContribsHideNonDamaging' ); } } diff --git a/includes/Hooks/PreferencesHookHandler.php b/includes/Hooks/PreferencesHookHandler.php index 64a2f50..3173064 100644 --- a/includes/Hooks/PreferencesHookHandler.php +++ b/includes/Hooks/PreferencesHookHandler.php @@ -29,7 +29,7 @@ * @param string[] &$preferences */ public static function onGetPreferences( User $user, array &$preferences ) { - global $wgOresFiltersThresholds, $wgOresExtensionStatus; + global $wgOresFiltersThresholds, $wgOresExtensionStatus, $wgHiddenPrefs; if ( !Hooks::oresUiEnabled( $user ) || !Hooks::isModelEnabled( 'damaging' ) ) { return; @@ -94,6 +94,31 @@ 'section' => 'rc/ores-rc', 'label-message' => 'ores-pref-rc-hidenondamaging', ]; + + // Use hidden preference to make "Hide probably good edits" checkbox + // on Contributions page sticky, which means: + // The checkbox or the oresRCHideNonDamaging preference - whichever was touched last, + // will stick, until there is another change. + // Bug: T182911 + $wgHiddenPrefs[] = 'oresContribsHideNonDamaging'; } + /** +*
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use uppercase "All" language code on smaller screens
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398610 ) Change subject: Use uppercase "All" language code on smaller screens .. Use uppercase "All" language code on smaller screens - Don't apply bcp47 on "All" pseudo language code, preventing the code from going lowercase on smaller screens. - Move registering of 'x-all' pseudo language code from dashboard to language filter. - Add default options to consturctor documentation of language filter. Bug: T182947 Change-Id: I62c8b4dd8c87d0ffa951980b69d7c13f9ee97758 --- M modules/dashboard/ext.cx.dashboard.js M modules/ui/mw.cx.ui.LanguageFilter.js 2 files changed, 19 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/10/398610/1 diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index da455b3..7f3efa6 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -69,13 +69,6 @@ CXDashboard.prototype.init = function () { var self = this; - // 'all' could be valid language code, so we use extension mechanism and go with 'x-all' - $.uls.data.addLanguage( 'x-all', { - script: 'Latn', - regions: [ 'WW' ], - autonym: mw.msg( 'cx-translation-filter-uls-all-languages' ) - } ); - // Render the main components this.render(); diff --git a/modules/ui/mw.cx.ui.LanguageFilter.js b/modules/ui/mw.cx.ui.LanguageFilter.js index 5b96f31..ec4b06d 100644 --- a/modules/ui/mw.cx.ui.LanguageFilter.js +++ b/modules/ui/mw.cx.ui.LanguageFilter.js @@ -1,13 +1,21 @@ 'use strict'; +// Register 'All languages' in ULS data +// 'all' could be valid language code, so we use extension mechanism and go with 'x-all' +$.uls.data.addLanguage( 'x-all', { + script: 'Latn', + regions: [ 'WW' ], + autonym: mw.msg( 'cx-translation-filter-uls-all-languages' ) +} ); + /** * Language filter * * @class * @param {Object} [config] Configuration object - * @cfg {boolean} [canBeSame] True if source and target language can be the same langauge - * @cfg {boolean} [canBeUndefined] True if source or target language can be unset - * @cfg {boolean} [updateLocalStorage] True if this language selector can update local storage, + * @cfg {boolean} [canBeSame=false] True if source and target language can be the same langauge + * @cfg {boolean} [canBeUndefined=false] True if source or target language can be unset + * @cfg {boolean} [updateLocalStorage=false] True if this language selector can update local storage, * when source or target language changes * @cfg {Function} [onSourceLanguageChange] Callback invoked when source language changes * @cfg {Function} [onTargetLanguageChange] Callback invoked when target language changes @@ -308,10 +316,12 @@ * @param {string} language */ mw.cx.ui.LanguageFilter.prototype.setFilterLabel = function ( $filter, language ) { - var langProps; + var langProps, filterLabel; - if ( ( this.canBeUndefined && !language ) ) { - language = mw.msg( 'cx-translation-filter-label-all-languages' ); + if ( this.canBeUndefined && !language ) { + language = filterLabel = mw.msg( 'cx-translation-filter-label-all-languages' ); + } else { + filterLabel = mw.language.bcp47( language ); } langProps = { @@ -319,11 +329,9 @@ dir: $.uls.data.getDir( language ) }; - $filter.prop( langProps ) - .text( this.isNarrowScreenSize ? - mw.language.bcp47( language ) : - $.uls.data.getAutonym( language ) - ); + $filter + .prop( langProps ) + .text( this.isNarrowScreenSize ? filterLabel : $.uls.data.getAutonym( language ) ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/398610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62c8b4dd8c87d0ffa951980b69d7c13f9ee97758 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.31.0-wmf.12]: Fix getNamespace error
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398239 ) Change subject: Fix getNamespace error .. Fix getNamespace error In mw.rcfilters.init file, getNamespace method is introduced in Id55702ecbe. That method is invoked through 'this' context, which can be different depending on how init method is invoked, which can lead to errors, causing RCFilters not to render correctly. Change-Id: Ifd9cb49e547077c622a5a3757361a85d99283f62 (cherry picked from commit 8a3e9c0e08a13d83352299b314b5d19a72594a37) --- M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/39/398239/1 diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js index 565ac0a..100fa0b 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js @@ -95,7 +95,7 @@ controller.initialize( mw.config.get( 'wgStructuredChangeFilters' ), // All namespaces without Media namespace - this.getNamespaces( [ 'Media' ] ), + rcfilters.getNamespaces( [ 'Media' ] ), mw.config.get( 'wgRCFiltersChangeTags' ), conditionalViews ); -- To view, visit https://gerrit.wikimedia.org/r/398239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd9cb49e547077c622a5a3757361a85d99283f62 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.31.0-wmf.12 Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix how "Live updates" behave when user logs out
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398126 ) Change subject: Fix how "Live updates" behave when user logs out .. Fix how "Live updates" behave when user logs out If user enables "Live updates" on one tab/browser and logs out from different tab/browser, reload the page. Bug: T177717 Change-Id: Ifeeb7d50eaec8f733a94a36711f1c4541af1cef9 --- M includes/specialpage/ChangesListSpecialPage.php M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 2 files changed, 39 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/26/398126/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index b6d1028..dc77515 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -570,8 +570,14 @@ // Used by "live update" and "view newest" to check // if there's new changes with minimal data transfer if ( $this->getRequest()->getBool( 'peek' ) ) { - $code = $rows->numRows() > 0 ? 200 : 204; + $code = $rows->numRows() > 0 ? 200 : 204; $this->getOutput()->setStatusCode( $code ); + + if ( $this->getUser()->isAnon() !== $this->getRequest()->getFuzzyBool( 'isAnon' ) ) + { + $this->getOutput()->setStatusCode( 205 ); + } + return; } diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js index 7b5e115..79546b4 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js @@ -281,6 +281,7 @@ * Extracts information from the changes list DOM * * @param {jQuery} $root Root DOM to find children from +* @param {boolean} [statusCode] Server response status code * @return {Object} Information about changes list * @return {Object|string} return.changes Changes list, or 'NO_RESULTS' if there are no results * (either normally or as an error) @@ -288,10 +289,21 @@ * 'NO_RESULTS_TIMEOUT' for no results due to a timeout, or omitted for more than 0 results * @return {jQuery} return.fieldset Fieldset */ - mw.rcfilters.Controller.prototype._extractChangesListInfo = function ( $root ) { + mw.rcfilters.Controller.prototype._extractChangesListInfo = function ( $root, statusCode ) { var info, $changesListContents = $root.find( '.mw-changeslist' ).first().contents(), - areResults = !!$changesListContents.length; + areResults = !!$changesListContents.length, + checkForLogout = !areResults && statusCode === 200; + + // We check if user logged out on different tab/browser or the session has expired. + // 205 status code returned from the server, which indicates that we need to reload the page + // is not usable on WL page, because we get redirected to login page, which gives 200 OK + // status code (if everything else goes well). + // Bug: T177717 + if ( checkForLogout && !!$root.find( '#wpName1' ).length ) { + location.reload( false ); + return; + } info = { changes: $changesListContents.length ? $changesListContents : 'NO_RESULTS', @@ -611,10 +623,23 @@ } this._checkForNewChanges() - .then( function ( newChanges ) { + .then( function ( statusCode ) { + // no result is 204 with the 'peek' param + // logged out is 205 + var newChanges = statusCode === 200; + if ( !this._shouldCheckForNewChanges() ) { // by the time the response is received, // it may not be appropriate anymore + return; + } + + // 205 is the status code returned from server when user's logged in/out + // status is not matching while fetching live update changes. + // This works only on Recent Changes page. For WL, look _extractChangesListInfo. +
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix getNamespace error
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398053 ) Change subject: Fix getNamespace error .. Fix getNamespace error In mw.rcfilters.init file, getNamespace method is introduced in Id55702ecbe. That method is invoked through 'this' context, which can be different depending on how init method is invoked, which can lead to errors, causing RCFilters not to render correctly. Change-Id: Ifd9cb49e547077c622a5a3757361a85d99283f62 --- M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/398053/1 diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js index 582d25f..63064d3 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js @@ -94,7 +94,7 @@ controller.initialize( mw.config.get( 'wgStructuredChangeFilters' ), // All namespaces without Media namespace - this.getNamespaces( [ 'Media' ] ), + rcfilters.getNamespaces( [ 'Media' ] ), mw.config.get( 'wgRCFiltersChangeTags' ), conditionalViews ); -- To view, visit https://gerrit.wikimedia.org/r/398053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd9cb49e547077c622a5a3757361a85d99283f62 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Absolutely position legend only on new RCFilters
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/397799 ) Change subject: Absolutely position legend only on new RCFilters .. Absolutely position legend only on new RCFilters - Don't use absolute positioning on legend when user opts out of improved version of Recent Changes, or disables "New filters for edit review" beta feature to opt out of improved version of Watchlist. Bug: T182363 Change-Id: Ib02372ab7ad97f3f50764ad612e38096f92131ad --- M resources/src/mediawiki.special/mediawiki.special.changeslist.css 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/99/397799/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.changeslist.css b/resources/src/mediawiki.special/mediawiki.special.changeslist.css index 9521a2b..44adbf3 100644 --- a/resources/src/mediawiki.special/mediawiki.special.changeslist.css +++ b/resources/src/mediawiki.special/mediawiki.special.changeslist.css @@ -55,7 +55,7 @@ } /* Absolute positioning to avoid table overlap with floating elements */ -.mw-changeslist-legend.mw-enhanced { +.mw-changeslist > .mw-changeslist-legend.mw-enhanced { background-color: #fff; position: absolute; right: 0; -- To view, visit https://gerrit.wikimedia.org/r/397799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib02372ab7ad97f3f50764ad612e38096f92131ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Prevent page jumps on filter capsule click
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/397779 ) Change subject: Prevent page jumps on filter capsule click .. Prevent page jumps on filter capsule click - Don't take tag select action if filter which capsule is clicked is not available among search results. Bug: T178540 Change-Id: I9433b7fba629adb663073b872e51ba022ddac8f5 --- M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/79/397779/1 diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js index 91a2d5f..ddfd57a 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js @@ -512,6 +512,10 @@ menuOption = this.menu.getItemFromModel( tagItem.getModel() ), oldInputValue = this.input.getValue().trim(); + if ( !menuOption.isVisible() ) { + return; + } + this.menu.setUserSelecting( true ); // Reset input -- To view, visit https://gerrit.wikimedia.org/r/397779 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9433b7fba629adb663073b872e51ba022ddac8f5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use gradients on CX suggestion descriptions
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396565 ) Change subject: Use gradients on CX suggestion descriptions .. Use gradients on CX suggestion descriptions - Remove justified text approach used to align ellipsis indicator with the description, which was introduced in Iabadfca8ed. - Use gradients instead of ellipsis to indicate truncated text. Bug: T182479 Change-Id: I2e0c62bf1caf51714c90a31fc091837f0309d09a --- M extension.json M modules/dashboard/ext.cx.suggestionlist.js M modules/dashboard/styles/ext.cx.suggestionlist.less M modules/widgets/common/ext.cx.common.less 4 files changed, 113 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/65/396565/1 diff --git a/extension.json b/extension.json index 086cc12..5e8b3ab 100644 --- a/extension.json +++ b/extension.json @@ -994,7 +994,6 @@ "oojs-ui.styles.icons-interactions" ], "messages": [ - "ellipsis", "cx-suggestionlist-collapse", "cx-suggestionlist-empty-desc", "cx-suggestionlist-empty-title", diff --git a/modules/dashboard/ext.cx.suggestionlist.js b/modules/dashboard/ext.cx.suggestionlist.js index 67d8911..259e4a7 100644 --- a/modules/dashboard/ext.cx.suggestionlist.js +++ b/modules/dashboard/ext.cx.suggestionlist.js @@ -539,10 +539,6 @@ lang: suggestion.sourceLanguage, dir: sourceDir } ) - // We need to set ellipsis for pseudo element through data attribute - // as there is no way to add localized message to LESS or manipulate - // pseudo elements directly with JS - .attr( 'data-ellipsis', mw.msg( 'ellipsis' ) ) .addClass( 'cx-slitem__desc' ) .hide(); $discardAction = $( '' ) diff --git a/modules/dashboard/styles/ext.cx.suggestionlist.less b/modules/dashboard/styles/ext.cx.suggestionlist.less index c33ff27..a8f53d9 100644 --- a/modules/dashboard/styles/ext.cx.suggestionlist.less +++ b/modules/dashboard/styles/ext.cx.suggestionlist.less @@ -84,8 +84,7 @@ .cx-slitem { &:hover { .cx-slitem__desc:after { - background-color: #eaf3ff; - .transition( background-color 100ms ); + .animation( gradientIn, 100ms, forwards ); } } @@ -100,39 +99,108 @@ width: 100%; // We want to limit number of lines that description for // suggestion item takes. Maximum height is thus set to - // get maximum of three line heights. Before and after - // elements are tricks used to provide ellipsis truncation + // get maximum of three line heights. max-height: 3.6em; // line-height * 3 margin: 0.5em -1em 0.5em 0; - padding-right: 1em; font-size: 0.8125em; line-height: 1.2; - text-align: justify; - - &:before { - // This is needed so we can use localized 'ellipsis' - content: attr( data-ellipsis ); - position: absolute; - bottom: 0; - right: 0; - } &:after { content: ''; - background-color: #fff; position: absolute; + top: 2.4em; right: 0; - width: 1em; - height: 1em; - margin-top: 0.2em; + width: 70%; + height: 1.2em; + .animation( gradientOut, 100ms, forwards ); - .transition( background-color 100ms ); + @media only screen and ( min-width: 360px ) { + width: 60%; + } + + @media only screen and ( min-width: @very-narrow ) { + width: 50%; + } + + @media only screen and ( min-width: @narrow ) { + width: 40%; + } + + @media only screen and ( min-width: @wide ) { + width: 30%; + } + + @media only screen and ( min-width: @max-dashboard-width ) { + width: 20%; + }
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Break overflowing words
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396309 ) Change subject: Break overflowing words .. Break overflowing words - Don't allow long titles to overlap with UI action elements on mobile screen sizes. Bug: T179148 Change-Id: I40897098adbadaf78cf1f733b3c04e92b6c91d46 --- M modules/dashboard/styles/ext.cx.suggestionlist.less M modules/dashboard/styles/ext.cx.translationlist.less M modules/widgets/common/ext.cx.common.less 3 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/09/396309/1 diff --git a/modules/dashboard/styles/ext.cx.suggestionlist.less b/modules/dashboard/styles/ext.cx.suggestionlist.less index c33ff27..3e5f4c9 100644 --- a/modules/dashboard/styles/ext.cx.suggestionlist.less +++ b/modules/dashboard/styles/ext.cx.suggestionlist.less @@ -156,6 +156,7 @@ cursor: pointer; .source-title { + .break-overflowing-word; color: @gray-darker; } } diff --git a/modules/dashboard/styles/ext.cx.translationlist.less b/modules/dashboard/styles/ext.cx.translationlist.less index 5db88da..40631df 100644 --- a/modules/dashboard/styles/ext.cx.translationlist.less +++ b/modules/dashboard/styles/ext.cx.translationlist.less @@ -134,10 +134,13 @@ .target-title { color: @colorGray7; display: inline-block; + max-width: 100%; } .source-title, .target-title { + .break-overflowing-word; + // This needs to be "isolate" and not "embed", // because both titles can be in the same direction unicode-bidi: -moz-isolate; diff --git a/modules/widgets/common/ext.cx.common.less b/modules/widgets/common/ext.cx.common.less index 38f5467..f104be1 100644 --- a/modules/widgets/common/ext.cx.common.less +++ b/modules/widgets/common/ext.cx.common.less @@ -106,3 +106,17 @@ margin: 0 auto; } } + +.break-overflowing-word { + word-wrap: break-word; + overflow-wrap: break-word; +} + +.hyphenate { + .break-overflowing-word; + + -webkit-hyphens: auto; + -ms-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; +} -- To view, visit https://gerrit.wikimedia.org/r/396309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40897098adbadaf78cf1f733b3c04e92b6c91d46 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: CX1: Make header bar on translation view sticky again
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396281 ) Change subject: CX1: Make header bar on translation view sticky again .. CX1: Make header bar on translation view sticky again - Bring back the sticky behavior for header bar on CX1, which was removed in Ia74ddbe3af. - Integrate publish button into the document area of the translation view on CX1. Bug: T174138 Bug: T160068 Change-Id: Id77aa5be3e807f19021eca4eb21d2bb7d1d02bc3 --- M extension.json A modules/ui/legacy/mw.cx.ui.Header.js M modules/ui/legacy/styles/mw.cx.ui.Columns.less A modules/ui/legacy/styles/mw.cx.ui.Header.less M modules/ui/legacy/styles/mw.cx.ui.TranslationView.less M modules/widgets/common/ext.cx.common.less 6 files changed, 267 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/81/396281/1 diff --git a/extension.json b/extension.json index 086cc12..ac49fc3 100644 --- a/extension.json +++ b/extension.json @@ -1491,7 +1491,7 @@ "ext.cx.sitemapper", "ext.cx.util", "mw.cx.ui.Columns.legacy", - "mw.cx.ui.Header", + "mw.cx.ui.Header.legacy", "mw.cx.ui.PublishSettingsWidget", "mw.cx.util" ] @@ -1529,6 +1529,32 @@ "mw.cx.ui.Infobar" ] }, + "mw.cx.ui.Header.legacy": { + "targets": [ "desktop", "mobile" ], + "scripts": [ + "ui/legacy/mw.cx.ui.Header.js" + ], + "styles": [ + "ui/legacy/styles/mw.cx.ui.Header.less" + ], + "messages": [ + "cx", + "cx-draft-restore-failed", + "cx-draft-restored", + "cx-draft-restoring", + "cx-save-draft-error", + "cx-save-draft-save-success", + "cx-save-draft-saving", + "cx-save-draft-tooltip", + "login" + ], + "dependencies": [ + "jquery.throttle-debounce", + "mw.cx.ui", + "oojs-ui.styles.icons-wikimedia", + "mw.cx.ui.Infobar" + ] + }, "mw.cx.ui.Header.skin": { "targets": [ "desktop", "mobile" ], "styles": [ diff --git a/modules/ui/legacy/mw.cx.ui.Header.js b/modules/ui/legacy/mw.cx.ui.Header.js new file mode 100644 index 000..a1366ce --- /dev/null +++ b/modules/ui/legacy/mw.cx.ui.Header.js @@ -0,0 +1,126 @@ +'use strict'; + +/** + * TranslationView Header + * + * @class + * @extends OO.ui.PanelLayout + * @param {Object} [config] Configuration object + */ +mw.cx.ui.Header = function ( config ) { + // Configuration initialization + this.config = config || {}; + this.$headerBar = null; + this.$headerBarContainer = null; + this.$toolbar = null; + this.infobar = null; + this.statusbar = null; + // Parent constructor + mw.cx.ui.Header.super.call( this, $.extend( {}, this.config, { + continuous: true, + expanded: false, + $content: this.getContent(), + classes: [ 'cx-widget__header', 'cx-header' ] + } ) ); + this.listen(); +}; + +/* Setup */ + +OO.inheritClass( mw.cx.ui.Header, OO.ui.PanelLayout ); + +mw.cx.ui.Header.static.timer = null; + +mw.cx.ui.Header.prototype.getContent = function () { + var logo, $titleText, $headerTitle, $translationCenterLink, $translationCenter; + + logo = new OO.ui.ButtonWidget( { + href: mw.config.get( 'wgScript' ), + icon: 'logoWikipedia', + classes: [ 'cx-header__logo' ], + framed: false + } ); + $titleText = $( '' ) + .addClass( 'cx-header__title-text' ) + .text( this.config.titleText || mw.msg( 'cx' ) ); + + $headerTitle = $( '' ) + .addClass( 'cx-header__title' ) + .append( logo.$element, $titleText ); + + $translationCenterLink = $( '' ) + .attr( 'href', mw.util.getUrl( 'Special:ContentTranslation' ) ) + .text( mw.msg( 'cx-header-all-translations' ) ); + + $translationCenter = $( '' ) + .addClass( 'cx-header__translation-center' ) +
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix "Save current filter settings" menu and legend overlap
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395911 ) Change subject: Fix "Save current filter settings" menu and legend overlap .. Fix "Save current filter settings" menu and legend overlap Pass overlay to SaveFiltersPopupButtonWidget, so it gets onto same stacking context as the rest of popup widgets. Bug: T182269 Change-Id: I2c45f82840f651c39a0e572e003c82cbbd8c1c2e --- M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/11/395911/1 diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js index a7054e9..91a2d5f 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js @@ -88,7 +88,10 @@ if ( !mw.user.isAnon() ) { this.saveQueryButton = new mw.rcfilters.ui.SaveFiltersPopupButtonWidget( this.controller, - this.queriesModel + this.queriesModel, + { + $overlay: this.$overlay + } ); this.saveQueryButton.$element.on( 'mousedown', function ( e ) { e.stopPropagation(); } ); -- To view, visit https://gerrit.wikimedia.org/r/395911 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c45f82840f651c39a0e572e003c82cbbd8c1c2e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Reserve space between filters and results
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395788 ) Change subject: Reserve space between filters and results .. Reserve space between filters and results - Add bottom margin to RCFilters head. There is no more reserved space for "View newest changes" link, so we need to make sure we have enough white space separator between head and results. Bug: T182149 Change-Id: I592ab7bb1f12785d5bd802bb16f11b4e74fb26b7 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 1 file changed, 8 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/395788/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index 74b81fa..f002614 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -2,8 +2,9 @@ @import 'mediawiki.ui/variables'; @import 'mw.rcfilters.mixins'; -@rcfilters-spinner-width: 70px; -@rcfilters-head-min-height: 250px; +@rcfilters-spinner-size: 12px; +@rcfilters-head-min-height: 210px; +@rcfilters-head-margin-bottom: 20px; @rcfilters-wl-head-min-height: 320px; // Corrections for the standard special page @@ -15,6 +16,7 @@ // Reserve space for the UI while it loads .rcfilters-head { min-height: @rcfilters-head-min-height; + margin-bottom: @rcfilters-head-margin-bottom; } // On the watchlist, reserve a bit more @@ -65,11 +67,6 @@ } } - .rcfilters-container { - min-height: 100px; - margin: 0; - } - .mw-changeslist { // Reserve space for the highlight circles ul, @@ -93,9 +90,8 @@ display: none; position: absolute; left: 50%; - width: @rcfilters-spinner-width; // Make sure the middle of the spinner is centered, rather than its left edge - margin-left: -@rcfilters-spinner-width/2; + margin-left: -3 * @rcfilters-spinner-size / 2; opacity: 0.8; white-space: nowrap; @@ -105,8 +101,8 @@ &:after { content: ''; display: inline-block; - width: 12px; - height: 12px; + width: @rcfilters-spinner-size; + height: @rcfilters-spinner-size; background-color: @colorGray12; border-radius: 100%; .animation( rcfiltersBouncedelay 1.5s ease-in-out -0.16s infinite both ); @@ -123,7 +119,7 @@ body:not( .mw-rcfilters-ui-initialized ) .rcfilters-spinner { display: block; // When initializing, display the spinner on top of the area where the UI will appear - margin-top: -@rcfilters-head-min-height/2; + margin-top: -( @rcfilters-head-min-height + @rcfilters-head-margin-bottom ) / 2; } body.mw-rcfilters-ui-loading .rcfilters-spinner { display: block; -- To view, visit https://gerrit.wikimedia.org/r/395788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I592ab7bb1f12785d5bd802bb16f11b4e74fb26b7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Truncate tag filter descriptions
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395768 ) Change subject: Truncate tag filter descriptions .. Truncate tag filter descriptions Bug: T179626 Change-Id: Ib01a8c303304064dde3ce983b817d93a88a5affd --- M includes/specialpage/ChangesListSpecialPage.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/68/395768/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 6cb56d4f..4070270 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -787,13 +787,14 @@ ) { // Parse description $desc = ChangeTags::tagLongDescriptionMessage( $tagName, $context ); + $truncatedDesc = $context->getLanguage()->truncate( $desc->parse(), 120 ); $result[] = [ 'name' => $tagName, 'label' => Sanitizer::stripAllTags( ChangeTags::tagDescription( $tagName, $context ) ), - 'description' => $desc ? Sanitizer::stripAllTags( $desc->parse() ) : '', + 'description' => $desc ? Sanitizer::stripAllTags( $truncatedDesc ) : '', 'cssClass' => Sanitizer::escapeClass( 'mw-tag-' . $tagName ), 'hits' => $hits, ]; -- To view, visit https://gerrit.wikimedia.org/r/395768 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib01a8c303304064dde3ce983b817d93a88a5affd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add tags for undo edits
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395744 ) Change subject: Add tags for undo edits .. Add tags for undo edits Bug: T167656 Change-Id: I763844e4bf7c3b5ca7a436cc4aa22a92f70f79d0 --- M includes/DefaultSettings.php M includes/changetags/ChangeTags.php M includes/page/WikiPage.php M languages/i18n/en.json M languages/i18n/qqq.json 5 files changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/44/395744/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c17bf7e..20f2dba 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -6951,6 +6951,7 @@ * - 'mw-blank': Edit completely blanks the page * - 'mw-replace': Edit removes more than 90% of the content * - 'mw-rollback': Edit is a rollback, made through the rollback link or rollback API + * - 'mw-undo': Edit that undoes the change * * @var array * @since 1.31 @@ -6962,7 +6963,8 @@ 'mw-changed-redirect-target' => true, 'mw-blank' => true, 'mw-replace' => true, - 'mw-rollback' => true + 'mw-rollback' => true, + 'mw-undo' => true ]; /** diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index b4a8ca8..439ddc3 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -39,7 +39,8 @@ 'mw-changed-redirect-target', 'mw-blank', 'mw-replace', - 'mw-rollback' + 'mw-rollback', + 'mw-undo' ]; /** diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index ff997ab..67e4d0d 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1624,6 +1624,11 @@ $tags[] = $tag; } + // Check for undo tag + if ( $undidRevId !== 0 && in_array( 'mw-undo', ChangeTags::getSoftwareTags() ) ) { + $tags[] = 'mw-undo'; + } + // Provide autosummaries if summary is not provided and autosummaries are enabled if ( $wgUseAutomaticEditSummaries && ( $flags & EDIT_AUTOSUMMARY ) && $summary == '' ) { $summary = $handler->getAutosummary( $old_content, $content, $flags ); diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 7254b92..51f88af 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -3888,6 +3888,8 @@ "tag-mw-replace-description": "Edits that remove more than 90% of the content of a page", "tag-mw-rollback": "Rollback", "tag-mw-rollback-description": "Edits that roll back previous edits using the rollback link", + "tag-mw-undo": "Undo", + "tag-mw-undo-description": "Edits that undo the change", "tags-title": "Tags", "tags-intro": "This page lists the tags that the software may mark an edit with, and their meaning.", "tags-tag": "Tag name", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 0497396..54b2ee0 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -4083,6 +4083,8 @@ "tag-mw-replace-description": "Description for \"replace\" change tag", "tag-mw-rollback": "Change tag for rolling back an edit\n{{Identical|Rollback}}", "tag-mw-rollback-description": "Description for \"rollback\" change tag", + "tag-mw-undo": "Change tag for undoing an edit", + "tag-mw-undo-description": "Description for \"undo\" change tag", "tags-title": "The title of [[Special:Tags]].\n{{Identical|Tag}}", "tags-intro": "Explanation on top of [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].", "tags-tag": "Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].", -- To view, visit https://gerrit.wikimedia.org/r/395744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I763844e4bf7c3b5ca7a436cc4aa22a92f70f79d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Prevent results from wiggling
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395652 ) Change subject: Prevent results from wiggling .. Prevent results from wiggling The patch Ifecaaff572 introduces clearing to the right for the first result list item, when grouping is disabled. The difference between cleared vs non-cleared result becomes visible when legend is toggled, causing really small (around a pixel), but annoying wiggle. Change-Id: Ida6fb6f8ad0caf666258e3f1e770c6da9e24af58 --- M resources/src/mediawiki.special/mediawiki.special.changeslist.css 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/395652/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.changeslist.css b/resources/src/mediawiki.special/mediawiki.special.changeslist.css index 734666f..9521a2b 100644 --- a/resources/src/mediawiki.special/mediawiki.special.changeslist.css +++ b/resources/src/mediawiki.special/mediawiki.special.changeslist.css @@ -45,8 +45,12 @@ display: none; } +.mw-changeslist-legend.mw-collapsed { + margin: 0; +} + /* Prevent pushing down of content if legend is initially collapsed */ -.mw-changeslist-legend.mw-collapsed ~ ul.special > li:first-child { +.mw-changeslist-legend.mw-collapsed ~ ul:first-of-type > li:first-child { clear: right; } @@ -55,5 +59,4 @@ background-color: #fff; position: absolute; right: 0; - margin-top: -0.5em; } -- To view, visit https://gerrit.wikimedia.org/r/395652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida6fb6f8ad0caf666258e3f1e770c6da9e24af58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove live update feature flag
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395530 ) Change subject: Remove live update feature flag .. Remove live update feature flag - Don't depend on live update feature flag, when adding live update button to the RC pages, now that live update feature is out of beta. - Add bottom margin to RCFilters head. There is no more reserved space for "View newest changes" link, so we need to make sure we have enough white space separator between head and results. Change-Id: Ib5457ff453722211a893ac5dd6d54175ca810efa --- M resources/src/mediawiki.rcfilters/mw.rcfilters.js M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js 3 files changed, 17 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/395530/1 diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.js index 466b7c0..c62d6f2 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.js @@ -44,9 +44,6 @@ return result; } - }, - featureFlags: { - liveUpdate: mw.config.get( 'StructuredChangeFiltersLiveUpdatePollingRate' ) } }; }( mediaWiki ) ); diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index 74b81fa..9156dce 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -2,8 +2,9 @@ @import 'mediawiki.ui/variables'; @import 'mw.rcfilters.mixins'; -@rcfilters-spinner-width: 70px; -@rcfilters-head-min-height: 250px; +@rcfilters-spinner-size: 12px; +@rcfilters-head-min-height: 210px; +@rcfilters-head-margin-bottom: 20px; @rcfilters-wl-head-min-height: 320px; // Corrections for the standard special page @@ -15,9 +16,10 @@ // Reserve space for the UI while it loads .rcfilters-head { min-height: @rcfilters-head-min-height; + margin-bottom: @rcfilters-head-margin-bottom; } - // On the watchlist, reserve a bit more + // On the watchlist, reserve more space .mw-special-Watchlist .rcfilters-head { min-height: @rcfilters-wl-head-min-height; } @@ -65,11 +67,6 @@ } } - .rcfilters-container { - min-height: 100px; - margin: 0; - } - .mw-changeslist { // Reserve space for the highlight circles ul, @@ -93,9 +90,8 @@ display: none; position: absolute; left: 50%; - width: @rcfilters-spinner-width; // Make sure the middle of the spinner is centered, rather than its left edge - margin-left: -@rcfilters-spinner-width/2; + margin-left: -3 * @rcfilters-spinner-size / 2; opacity: 0.8; white-space: nowrap; @@ -105,8 +101,8 @@ &:after { content: ''; display: inline-block; - width: 12px; - height: 12px; + width: @rcfilters-spinner-size; + height: @rcfilters-spinner-size; background-color: @colorGray12; border-radius: 100%; .animation( rcfiltersBouncedelay 1.5s ease-in-out -0.16s infinite both ); @@ -123,7 +119,7 @@ body:not( .mw-rcfilters-ui-initialized ) .rcfilters-spinner { display: block; // When initializing, display the spinner on top of the area where the UI will appear - margin-top: -@rcfilters-head-min-height/2; + margin-top: -( @rcfilters-head-min-height + @rcfilters-head-margin-bottom ) / 2; } body.mw-rcfilters-ui-loading .rcfilters-spinner { display: block; diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js index a7d2c82..e6c3abe 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js @@ -43,7 +43,7 @@ this.changesListModel ); - this.numChangesWidget = new mw.rcfilters.ui.ChangesLimitAndDateButtonWidget( + this.numChangesAndDateWidget = new mw.rcfilters.ui.ChangesLimitAndDateButtonWidget( this.controller,
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Use ORES preference on Related Changes page
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394611 ) Change subject: Use ORES preference on Related Changes page .. Use ORES preference on Related Changes page Bug: T180866 Change-Id: I503c8d1a4f429050eaf1bdfe1fded55b36f199aa --- M includes/Hooks/ChangesListHooksHandler.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/11/394611/1 diff --git a/includes/Hooks/ChangesListHooksHandler.php b/includes/Hooks/ChangesListHooksHandler.php index f3bf99d..a4b4318 100644 --- a/includes/Hooks/ChangesListHooksHandler.php +++ b/includes/Hooks/ChangesListHooksHandler.php @@ -49,7 +49,7 @@ $logFilter = $changeTypeGroup->getFilter( 'hidelog' ); if ( Hooks::isModelEnabled( 'damaging' ) ) { - if ( $clsp instanceof SpecialRecentChanges ) { + if ( $clsp instanceof SpecialRecentChanges || $clsp instanceof SpecialRecentChangesLinked ) { $damagingDefault = $clsp->getUser()->getOption( 'oresRCHideNonDamaging' ); $highlightDefault = $clsp->getUser()->getBoolOption( 'ores-damaging-flag-rc' ); } elseif ( $clsp instanceof SpecialWatchlist ) { -- To view, visit https://gerrit.wikimedia.org/r/394611 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I503c8d1a4f429050eaf1bdfe1fded55b36f199aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Truncate suggestion descriptions by number of words
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394553 ) Change subject: Truncate suggestion descriptions by number of words .. Truncate suggestion descriptions by number of words - Change from truncation based on number of lines (pure CSS) to truncation based on number of words in the description (JS solution). - Previous, pure CSS solution, needed text-align: justify to display properly, which we wanted to drop. Using gradient indicators to show that description is truncated was not possible, because gradients are not animatable, and we need animation to match animated background color change. - Show between 20 (on 400px screen) and 75 (on 1500px+ screen) words. This should trim description on approximately 3rd or 4th line. Change-Id: I486d21315065998f6a2d3a8463c9d3cf108ea569 --- M modules/dashboard/ext.cx.suggestionlist.js M modules/dashboard/styles/ext.cx.suggestionlist.less 2 files changed, 30 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/53/394553/1 diff --git a/modules/dashboard/ext.cx.suggestionlist.js b/modules/dashboard/ext.cx.suggestionlist.js index 67d8911..ed6e002 100644 --- a/modules/dashboard/ext.cx.suggestionlist.js +++ b/modules/dashboard/ext.cx.suggestionlist.js @@ -336,7 +336,11 @@ var apply, self = this, queries = {}, - map = {}; + map = {}, + screenWidth = document.documentElement.clientWidth, + // Show between 20 (on 400px screen) and 75 (on 1500px+ screen) words + // This should trim description on approx. 3rd or 4th line + maxWords = Math.min( Math.round( screenWidth / 20 ), 75 ); // TODO: We dont need this grouping since suggestions are fetched for a fixed language pair $.each( suggestions, function ( index, suggestion ) { @@ -353,6 +357,24 @@ map[ suggestion.title ].push( suggestion ); } ); + function trimDescription( description ) { + var trimmed, length; + + if ( !description || typeof description[ 0 ] !== 'string' ) { + return description; + } + + description = description[ 0 ]; + length = description.match( /\S+/g ).length; + + if ( length > maxWords ) { + trimmed = description.split( /\s+/, maxWords ).join( ' ' ); + return trimmed + mw.msg( 'ellipsis' ); + } + + return description; + } + apply = function ( page ) { if ( !map[ page.title ] ) { return; @@ -364,7 +386,7 @@ item.$image.addClass( 'oo-ui-icon-page-existing' ); } if ( page.terms ) { - item.$desc.text( page.terms.description ).show(); + item.$desc.text( trimDescription( page.terms.description ) ).show(); } } ); }; @@ -539,10 +561,6 @@ lang: suggestion.sourceLanguage, dir: sourceDir } ) - // We need to set ellipsis for pseudo element through data attribute - // as there is no way to add localized message to LESS or manipulate - // pseudo elements directly with JS - .attr( 'data-ellipsis', mw.msg( 'ellipsis' ) ) .addClass( 'cx-slitem__desc' ) .hide(); $discardAction = $( '' ) diff --git a/modules/dashboard/styles/ext.cx.suggestionlist.less b/modules/dashboard/styles/ext.cx.suggestionlist.less index c33ff27..c95fd69 100644 --- a/modules/dashboard/styles/ext.cx.suggestionlist.less +++ b/modules/dashboard/styles/ext.cx.suggestionlist.less @@ -81,56 +81,13 @@ } } -.cx-slitem { - &:hover { - .cx-slitem__desc:after { - background-color: #eaf3ff; - .transition( background-color 100ms ); - } - } +.cx-slitem__desc { + .mw-ui-one-whole; - &__desc { - color: @colorGray7; - - overflow: hidden; - clear: both; - position: relative; - - box-sizing: border-box; - width: 100%; - // We want to limit number of lines
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix no result messages on "New translation" dialog
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394492 ) Change subject: Fix no result messages on "New translation" dialog .. Fix no result messages on "New translation" dialog - Fix "No pages found for $1 in $2", where $1 is query input and $2 is selected source language. When there are no pages for given search query, message is displayed. If source language changes, both $1 and $2 stay the same, but source language ($2) should change. - Change how no result messages are centered, without using additional DOM element to wrap centered text. Bug: T181457 Change-Id: Ib9251b2dd5c50b2464d976261d9c6e212d08ede7 --- M modules/source/ext.cx.SourcePageSelector.js M modules/source/styles/ext.cx.SourcePageSelector.less M modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js 3 files changed, 58 insertions(+), 48 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/92/394492/1 diff --git a/modules/source/ext.cx.SourcePageSelector.js b/modules/source/ext.cx.SourcePageSelector.js index 553e57f..e5fecf3 100644 --- a/modules/source/ext.cx.SourcePageSelector.js +++ b/modules/source/ext.cx.SourcePageSelector.js @@ -73,13 +73,7 @@ this.options.sourceTitle ) { this.show(); - - this.$searchResultsMessage.text( - mw.msg( 'cx-source-page-selector-no-search-results', - this.pageSelector.getQueryValue(), - $.uls.data.getAutonym( this.languageFilter.getSourceLanguage() ) - ) - ); + this.updateNoResultsMessage(); } }; @@ -118,7 +112,7 @@ piprop: 'thumbnail', pilimit: 10, pithumbsize: 80, - lllang: self.targetLanguage, + lllang: self.languageFilter.getTargetLanguage(), wbptterms: [ 'description' ] } ); }, function ( error ) { @@ -159,6 +153,15 @@ } ); }; + SourcePageSelector.prototype.updateNoResultsMessage = function () { + var message = mw.msg( 'cx-source-page-selector-no-search-results', + this.pageSelector.getQueryValue(), + $.uls.data.getAutonym( this.languageFilter.getSourceLanguage() ) + ); + + this.$searchResultsMessage.text( message ); + }; + /** * Listen for events. */ @@ -169,12 +172,7 @@ this.$trigger.click( this.show.bind( this ) ); this.pageSelector.on( 'change', function () { - self.$searchResultsMessage.text( - mw.msg( 'cx-source-page-selector-no-search-results', - self.pageSelector.getQueryValue(), - $.uls.data.getAutonym( self.languageFilter.getSourceLanguage() ) - ) - ); + self.updateNoResultsMessage(); } ); this.discardButton.connect( this, { click: this.discardDialog } ); @@ -200,6 +198,10 @@ * @param {string} language Language code. */ SourcePageSelector.prototype.sourceLanguageChangeHandler = function ( language ) { + this.$searchResults.removeClass( 'mw-cx-ui-PageSelectorWidget--no-results' ); + this.$searchResults.removeClass( 'mw-cx-ui-PageSelectorWidget--has-recent-edits' ); + this.updateNoResultsMessage(); + this.pageSelector.setLanguage( language ); this.pageSelector.closeLookupMenu(); @@ -227,8 +229,9 @@ } this.$sourceInputs.append( this.languageFilter.$element, this.discardButton.$element ); - this.pageSelector.toggle( true ); this.overlay.show(); + this.pageSelector.populateLookupMenu(); + this.pageSelector.lookupMenu.toggle( true ); this.$container.slideDown( 'fast' ); this.pageSelector.focus(); }; @@ -242,30 +245,24 @@ }; SourcePageSelector.prototype.render = function () { - var $searchMessage, - $recentEditsMessageContainer, - $recentEditsMessage, + var $recentEditsMessage, $recentEditsHeader; this.$container.hide(); // Starts as hidden, shown on this.$trigger button click - this.$searchResultsMessage = $( '' ) -
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Group related message keys
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394323 ) Change subject: Group related message keys .. Group related message keys After changing message keys in I1d8c2f655a, group together related message keys for "source-page-selector", "selected-source-page" and "cx-page". Change-Id: Ieedd172332de1851cb9cad236a9e2bc17f70ace6 --- M i18n/en.json 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/23/394323/1 diff --git a/i18n/en.json b/i18n/en.json index a068046..4c4aaa7 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -85,17 +85,17 @@ "cx-tools-link-hover-tooltip": "Click to open", "cx-warning-unsaved-translation": "You have unsaved translations.", "cx-error-page-not-found": "The \"$1\" page could not be found in $2 Wikipedia", - "cx-selected-source-page-start-translation-button": "Start translation", "cx-source-page-selector-input-placeholder": "Search for a page to translate", + "cx-source-page-selector-recent-edits-header": "Recently edited by you", + "cx-source-page-selector-recent-edits-no-results": "Think of any topic of your interest. You don’t need to be an expert to create a great translation.", + "cx-source-page-selector-no-search-results": "No pages found for \"$1\" in $2", + "cx-selected-source-page-start-translation-button": "Start translation", + "cx-selected-source-page-view-count": "{{PLURAL:$1|$1 visit per|$1 visits per|0=No visits this}} week", "cx-selected-source-page-error-page-and-title-exist": "This title is already used in [$1 $2] for [$3 a different page]", "cx-selected-source-page-error-page-exists": "The page [$1 already exists] in $2", "cx-selected-source-page-error-title-in-use": "The title for the new page is [$1 already in use]", "cx-page-missing-in-target-language": "Missing in $1", "cx-page-number-of-languages": "Number of languages", - "cx-selected-source-page-view-count": "{{PLURAL:$1|$1 visit per|$1 visits per|0=No visits this}} week", - "cx-source-page-selector-recent-edits-header": "Recently edited by you", - "cx-source-page-selector-recent-edits-no-results": "Think of any topic of your interest. You don’t need to be an expert to create a great translation.", - "cx-source-page-selector-no-search-results": "No pages found for \"$1\" in $2", "cx-mt-abuse-warning-title": "Your translation {{PLURAL:$1|contains}} $1% of unmodified machine-translated text", "cx-mt-abuse-warning-text": "Machine translation is provided only as a starting point. You need to make sure that the content is accurate and reads naturally in your language.", "cx-publish-captcha-title": "Security question", -- To view, visit https://gerrit.wikimedia.org/r/394323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieedd172332de1851cb9cad236a9e2bc17f70ace6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[wmf/1.31.0-wmf.10]: Set default languages after fetching valid languages
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394292 ) Change subject: Set default languages after fetching valid languages .. Set default languages after fetching valid languages - Set default source and target language immediately after getting all valid source and target languages from cx server. - This sets up local storage for any subsequent code to use data properly. - Fix bugs which shows on empty local storage. This is apparent on suggestions list, when local storage is empty. Change-Id: I179448ee99387f6b022485411034ebe5ad462473 (cherry picked from commit 8e3494a9e87bdf562a871c860b76dd0ae45c7dbd) --- M modules/dashboard/ext.cx.dashboard.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/92/394292/1 diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index 15b192c..0337c19 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -82,9 +82,9 @@ mw.cx.ui.LanguageFilter.sourceLanguages = data.sourceLanguages; mw.cx.ui.LanguageFilter.targetLanguages = data.targetLanguages; + self.setDefaultLanguages(); self.render(); self.initLists(); - self.setDefaultLanguages(); self.listen(); mw.hook( 'mw.cx.dashboard.ready' ).fire(); -- To view, visit https://gerrit.wikimedia.org/r/394292 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I179448ee99387f6b022485411034ebe5ad462473 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: wmf/1.31.0-wmf.10 Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Set default languages after fetching valid languages
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394290 ) Change subject: Set default languages after fetching valid languages .. Set default languages after fetching valid languages - Set default source and target language immediately after getting all valid source and target languages from cx server. - This sets up local storage for any subsequent code to use data properly. - Fix bugs which shows on empty local storage. This is apparent on suggestions list, when local storage is empty. Change-Id: I179448ee99387f6b022485411034ebe5ad462473 --- M modules/dashboard/ext.cx.dashboard.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/90/394290/1 diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index 15b192c..0337c19 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -82,9 +82,9 @@ mw.cx.ui.LanguageFilter.sourceLanguages = data.sourceLanguages; mw.cx.ui.LanguageFilter.targetLanguages = data.targetLanguages; + self.setDefaultLanguages(); self.render(); self.initLists(); - self.setDefaultLanguages(); self.listen(); mw.hook( 'mw.cx.dashboard.ready' ).fire(); -- To view, visit https://gerrit.wikimedia.org/r/394290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I179448ee99387f6b022485411034ebe5ad462473 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Allow more space for language filter
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394146 ) Change subject: Allow more space for language filter .. Allow more space for language filter - Allow more space for language filter: * Up to 40% of parent width on larger screens. * Up to 30% of parent width on narrow screens. - Add border radius and shadow to SelectedSourcePage modal dialog. - Make width of SelectedSourcePage modal dialog more responsive by adding better maximum widths, for various screen sizes. Bug: T178866 Change-Id: I4907df005deabeb4ea9ba104748161e508e0803a --- M modules/source/styles/ext.cx.SelectedSourcePage.less M modules/ui/styles/mw.cx.ui.LanguageFilter.less 2 files changed, 35 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/46/394146/1 diff --git a/modules/source/styles/ext.cx.SelectedSourcePage.less b/modules/source/styles/ext.cx.SelectedSourcePage.less index d39dd61..25dbab2 100644 --- a/modules/source/styles/ext.cx.SelectedSourcePage.less +++ b/modules/source/styles/ext.cx.SelectedSourcePage.less @@ -11,19 +11,35 @@ position: fixed; top: 50%; left: 50%; + z-index: 400; .transform( translate( -50%, -50% ) ); + width: 95%; min-width: 375px; - max-width: 550px; - width: 100%; - z-index: 400; + .box-shadow( 0 1px 1px rgba( 0, 0, 0, 0.15 ) ); + + @media only screen and ( min-width: @very-narrow ) { + max-width: 550px; + } + + @media only screen and ( min-width: @narrow ) { + max-width: 80%; + } @media only screen and ( min-width: @wide ) { - max-width: 750px; + max-width: 850px; } @media only screen and ( min-width: @max-dashboard-width ) { max-width: 1000px; + } + + .cx-selected-source-page__container{ + border-radius: @borderRadius @borderRadius 0 0; + } + + .cx-selected-source-page__actions{ + border-radius: 0 0 @borderRadius @borderRadius; } } @@ -41,13 +57,19 @@ background-repeat: no-repeat; background-size: cover; - &.oo-ui-iconElement-icon { - opacity: 0.65; - } - height: @image-size; width: @image-size; margin: 0.5em; + + // Don't let image be squeezed when screen gets tight + -webkit-box-flex: 1; // iOS 6-, Safari 3.1-6 + -moz-box-flex: 1; // Firefox 21- + -ms-flex: 0 0 auto; // IE 10 + flex: 0 0 auto; + + &.oo-ui-iconElement-icon { + opacity: 0.65; + } } &__info { diff --git a/modules/ui/styles/mw.cx.ui.LanguageFilter.less b/modules/ui/styles/mw.cx.ui.LanguageFilter.less index 6d3e6e8..82da6ba 100644 --- a/modules/ui/styles/mw.cx.ui.LanguageFilter.less +++ b/modules/ui/styles/mw.cx.ui.LanguageFilter.less @@ -5,7 +5,7 @@ background-color: @colorGray15; box-sizing: border-box; width: auto; - max-width: 25%; + max-width: 30%; max-height: 34px; border: 1px solid #9d9d9d; border-radius: @borderRadius; @@ -16,6 +16,10 @@ .flex-display; margin-left: auto; + @media only screen and ( min-width: @narrow ) { + max-width: 40%; + } + .cx-language-filter-source-language, .cx-language-filter-target-language { position: relative; -- To view, visit https://gerrit.wikimedia.org/r/394146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4907df005deabeb4ea9ba104748161e508e0803a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Absolutely position "legend" on grouped results
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394069 ) Change subject: Absolutely position "legend" on grouped results .. Absolutely position "legend" on grouped results - When results are grouped by page on pages where new RC filters are enabled, apply position: absolute to legend, to avoid top result entries being pushed too much. Bug: T174728 Change-Id: Ifecaaff5727905b3c4e860555ba094f71aac6f80 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js 2 files changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/69/394069/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less index b923efb..3aba8e0 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less @@ -54,8 +54,26 @@ } } + &-enhancedView { + .mw-changeslist-legend { + position: absolute; + right: 0; + float: none; + margin-top: -0.5em; + + &:not( .mw-collapsed ) { + .box-shadow( 0 1px 1px rgba( 0, 0, 0, 0.15 ) ); + } + } + } + .mw-changeslist-legend { background-color: @background-color-base; + border: 1px solid @colorGray12; + + &.mw-collapsed ~ ul.special > li { + clear: right; + } } // Correction for Enhanced RC diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js index b6a0a4f..3e09da7 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js @@ -368,6 +368,8 @@ // Regular RC $content.find( 'ul.special li' ) .prepend( $highlights.clone() ); + + $content.removeClass( 'mw-rcfilters-ui-changesListWrapperWidget-enhancedView' ); } }; -- To view, visit https://gerrit.wikimedia.org/r/394069 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifecaaff5727905b3c4e860555ba094f71aac6f80 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Post refactor cleanup
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393940 ) Change subject: Post refactor cleanup .. Post refactor cleanup - Remove unused and duplicated "New translation" messages. - Rename message keys used in newly introduced SourcePageSelector and SelectedSourcePage classes. This is done so old names and concepts (like embedded) are no longer used, to avoid confusion for newcomers to codebase. - Improve message documentation to remove obsolete concepts as arbitrary source page title. - Take further measures to prevent selection of same source and target language in some obscure cases, when there are little valid source languages to choose from when swapping languages. Change-Id: I1d8c2f655ab99fb985d63fcd74231f290e4ae158 --- M extension.json M i18n/en.json M i18n/qqq.json M modules/source/ext.cx.SelectedSourcePage.js M modules/source/ext.cx.SourcePageSelector.js M modules/stats/ext.cx.stats.js M modules/ui/mw.cx.ui.LanguageFilter.js M modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js 8 files changed, 73 insertions(+), 59 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/40/393940/1 diff --git a/extension.json b/extension.json index 94d4c90..204c8dc 100644 --- a/extension.json +++ b/extension.json @@ -351,10 +351,10 @@ "oojs" ], "messages": [ - "cx-sourceselector-embedded-source-page-placeholder", - "cx-sourceselector-embedded-recent-edits-header", - "cx-sourceselector-embedded-recent-edits-no-results", - "cx-sourceselector-embedded-search-no-results" + "cx-source-page-selector-input-placeholder", + "cx-source-page-selector-recent-edits-header", + "cx-source-page-selector-recent-edits-no-results", + "cx-source-page-selector-no-search-results" ] }, "ext.cx.SelectedSourcePage": { @@ -381,11 +381,11 @@ "oojs" ], "messages": [ - "cx-sourceselector-dialog-button-start-translation", - "cx-sourceselector-dialog-error-page-and-title-exist", - "cx-sourceselector-dialog-error-page-exists", - "cx-sourceselector-dialog-error-title-in-use", - "cx-sourceselector-embedded-selected-item-pageviews", + "cx-selected-source-page-start-translation-button", + "cx-selected-source-page-error-page-and-title-exist", + "cx-selected-source-page-error-page-exists", + "cx-selected-source-page-error-title-in-use", + "cx-selected-source-page-view-count", "cx-license-agreement" ] }, @@ -1549,7 +1549,7 @@ "ui/styles/mw.cx.ui.Infobar.less" ], "messages": [ - "cx-header-new-translation", + "cx-create-new-translation", "cx-header-all-translations", "cx-special-login-error", "cx-translation-target-page-exists" @@ -2079,8 +2079,8 @@ "ui/styles/widgets/mw.cx.ui.TitleOptionWidget.less" ], "messages": [ - "cx-sourceselector-missing-in-target-language", - "cx-sourceselector-number-of-languages" + "cx-page-missing-in-target-language", + "cx-page-number-of-languages" ], "dependencies": [ "mw.cx.ui", diff --git a/i18n/en.json b/i18n/en.json index a1e10fd..a068046 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -25,7 +25,6 @@ "cx-header-progressbar-text": "$1% {{PLURAL:$1|translated}}", "cx-header-progressbar-text-mt": "($1% from {{PLURAL:$1|machine translation}})", "cx-header-translation-center": "Translation center", - "cx-header-new-translation": "New translation", "cx-header-all-translations": "All translations", "cx-source-view-page": "view page", "cx-publish-page-success": "Page published at $1", @@ -86,18 +85,17 @@ "cx-tools-link-hover-tooltip": "Click to open",
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix null reference error on discard translation
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393901 ) Change subject: Fix null reference error on discard translation .. Fix null reference error on discard translation - Add additional check before trying to remove class from translation list item action trigger. - Without checking, we get null reference error when user opens actions menu (only when opened on hover) on translation list item and clicks "Discard translation". - Introduced in I52b0e0b8f681de91673e1e6eccea564b72fde0b4. Bug: T181533 Change-Id: I4a4223863a0bd8de4068e658d006d8bfc0cafb78 --- M modules/dashboard/ext.cx.translationlist.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/01/393901/1 diff --git a/modules/dashboard/ext.cx.translationlist.js b/modules/dashboard/ext.cx.translationlist.js index 0c7dda9..bb557c5 100644 --- a/modules/dashboard/ext.cx.translationlist.js +++ b/modules/dashboard/ext.cx.translationlist.js @@ -468,7 +468,9 @@ e.stopPropagation(); translation = $( this ).closest( '.cx-tlitem' ).data( 'translation' ); - self.$selectedActionMenu.removeClass( 'cx-tlitem__actions--selected' ); + if ( self.$selectedActionMenu ) { + self.$selectedActionMenu.removeClass( 'cx-tlitem__actions--selected' ); + } OO.ui.getWindowManager().openWindow( 'message', $.extend( { message: mw.msg( 'cx-draft-discard-confirmation-message' ), -- To view, visit https://gerrit.wikimedia.org/r/393901 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a4223863a0bd8de4068e658d006d8bfc0cafb78 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix null reference error on discard translation
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393893 ) Change subject: Fix null reference error on discard translation .. Fix null reference error on discard translation - Add additional check before trying to remove class from translation list item action trigger. - Without checking, we get null reference error when user opens actions menu (only when opened on hover) on translation list item and clicks "Discard translation". - Introduced in I52b0e0b8f681de91673e1e6eccea564b72fde0b4. Bug: T181533 Change-Id: I881ace99f9c670525f58504d2a7ee056fbfa540f --- M modules/dashboard/ext.cx.translationlist.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/93/393893/1 diff --git a/modules/dashboard/ext.cx.translationlist.js b/modules/dashboard/ext.cx.translationlist.js index 0c7dda9..bb557c5 100644 --- a/modules/dashboard/ext.cx.translationlist.js +++ b/modules/dashboard/ext.cx.translationlist.js @@ -468,7 +468,9 @@ e.stopPropagation(); translation = $( this ).closest( '.cx-tlitem' ).data( 'translation' ); - self.$selectedActionMenu.removeClass( 'cx-tlitem__actions--selected' ); + if ( self.$selectedActionMenu ) { + self.$selectedActionMenu.removeClass( 'cx-tlitem__actions--selected' ); + } OO.ui.getWindowManager().openWindow( 'message', $.extend( { message: mw.msg( 'cx-draft-discard-confirmation-message' ), -- To view, visit https://gerrit.wikimedia.org/r/393893 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I881ace99f9c670525f58504d2a7ee056fbfa540f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add left padding to PageNotificationsOptionWidget
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393775 ) Change subject: Add left padding to PageNotificationsOptionWidget .. Add left padding to PageNotificationsOptionWidget Bug: T177065 Change-Id: I71a9bafe520faf04e59c093761ed1303b13861bb --- M modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/75/393775/1 diff --git a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less index e0edefd..abbb7fa 100644 --- a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less +++ b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less @@ -35,7 +35,7 @@ } &-title { - padding: 0.2em 0; + padding: 0.2em 0 0.2em 0.5em; } &-count { -- To view, visit https://gerrit.wikimedia.org/r/393775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71a9bafe520faf04e59c093761ed1303b13861bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Small change to "Other review tools" link
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393770 ) Change subject: Small change to "Other review tools" link .. Small change to "Other review tools" link - Reduce the separation between the label and the expand/collapse icon. Bug: T179539 Change-Id: I0bfc8a72650325a815be930a64e472ae66f536f6 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/70/393770/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index ef358e0..fe7fa07 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -31,6 +31,17 @@ // Same as the legend border: 1px solid @colorGray12; } + + /* stylelint-disable declaration-no-important */ + .oo-ui-buttonElement-button { + padding-right: 1.2em !important; + + > .oo-ui-indicatorElement-indicator { + right: 0 !important; + width: 0.9375em !important; + } + } + /* stylelint-enable */ } body:not( .mw-rcfilters-ui-initialized ) { -- To view, visit https://gerrit.wikimedia.org/r/393770 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0bfc8a72650325a815be930a64e472ae66f536f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Align other review tools and saved filters buttons
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393754 ) Change subject: Align other review tools and saved filters buttons .. Align other review tools and saved filters buttons Bug: T179825 Change-Id: I654d417072bb58a6518a1094061208788b64c1f8 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 1 file changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/54/393754/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index ef358e0..05791c7 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -23,13 +23,12 @@ } .mw-recentchanges-toplinks { - margin-bottom: 0.5em; - padding: 0 0.5em 0.5em 0.5em; - border: 1px solid transparent; + padding-left: 0.5em; &:not( .mw-recentchanges-toplinks-collapsed ) { - // Same as the legend - border: 1px solid @colorGray12; + margin-bottom: 0.5em; + border: 1px solid @colorGray12; // Same as the legend + padding: 0 0.5em 0.5em 0.5em; } } -- To view, visit https://gerrit.wikimedia.org/r/393754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I654d417072bb58a6518a1094061208788b64c1f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Reorder Translate filters
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393671 ) Change subject: Reorder Translate filters .. Reorder Translate filters Reorder the filters as follows: - Translations - Site messages - Not translations Bug: T159795 Change-Id: I9cea48df95a042926d74baea3fed436a02bbe878 --- M utils/RcFilter.php 1 file changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/71/393671/1 diff --git a/utils/RcFilter.php b/utils/RcFilter.php index de9197b..54e533f 100644 --- a/utils/RcFilter.php +++ b/utils/RcFilter.php @@ -144,17 +144,6 @@ 'isFullCoverage' => true, 'filters' => [ [ - 'name' => 'filter', - 'label' => 'translate-rcfilters-translations-filter-label', - 'description' => 'translate-rcfilters-translations-filter-desc', - 'cssClassSuffix' => 'filter', - 'isRowApplicableCallable' => function ( $ctx, $rc ) { - $namespaces = self::getTranslateNamespaces(); - - return !in_array( $rc->getAttribute( 'rc_namespace' ), $namespaces ); - } - ], - [ 'name' => 'only', 'label' => 'translate-rcfilters-translations-only-label', 'description' => 'translate-rcfilters-translations-only-desc', @@ -178,6 +167,17 @@ strpos( $rc->getAttribute( 'rc_title' ), '/' ) === false; } ], + [ + 'name' => 'filter', + 'label' => 'translate-rcfilters-translations-filter-label', + 'description' => 'translate-rcfilters-translations-filter-desc', + 'cssClassSuffix' => 'filter', + 'isRowApplicableCallable' => function ( $ctx, $rc ) { + $namespaces = self::getTranslateNamespaces(); + + return !in_array( $rc->getAttribute( 'rc_namespace' ), $namespaces ); + } + ], ], 'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedValues -- To view, visit https://gerrit.wikimedia.org/r/393671 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9cea48df95a042926d74baea3fed436a02bbe878 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Prevent body color changes
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393666 ) Change subject: Prevent body color changes .. Prevent body color changes While CX page is loading, background color is changing from #f6f6f6 to #eaecf0. Prevent color changes by overriding skin default background. Change-Id: I1beae91d9d41b76f36bea371edd8cdc46780a067 --- M modules/dashboard/styles/ext.cx.dashboard.less M modules/ui/styles/mw.cx.ui.Header.skin.less 2 files changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/66/393666/1 diff --git a/modules/dashboard/styles/ext.cx.dashboard.less b/modules/dashboard/styles/ext.cx.dashboard.less index 6affd4e..1f24610 100644 --- a/modules/dashboard/styles/ext.cx.dashboard.less +++ b/modules/dashboard/styles/ext.cx.dashboard.less @@ -1,10 +1,6 @@ @import '../../widgets/common/ext.cx.common.less'; @import 'mediawiki.mixins'; -body { - background: @colorGray14; -} - .cx-dashboard { color: @gray-darker; max-width: @max-dashboard-width; diff --git a/modules/ui/styles/mw.cx.ui.Header.skin.less b/modules/ui/styles/mw.cx.ui.Header.skin.less index 7e293ee..d51388e 100644 --- a/modules/ui/styles/mw.cx.ui.Header.skin.less +++ b/modules/ui/styles/mw.cx.ui.Header.skin.less @@ -1,3 +1,11 @@ +@import '../../widgets/common/ext.cx.common.less'; + +body.mw-special-ContentTranslation { + // Not using background-color, because we want to override skin specific backgrounds, + // like on monobook + background: @colorGray14; +} + .client-js .cx-nojs { display: none; } -- To view, visit https://gerrit.wikimedia.org/r/393666 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1beae91d9d41b76f36bea371edd8cdc46780a067 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change "Live update" button animation
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393643 ) Change subject: Change "Live update" button animation .. Change "Live update" button animation - Extend the total length of the animation to 2.3 seconds. - Redefine the transitions in the animation to be completed already at the 80% point (instead of the current 100%), in order to create a period of no change between repetitions. Bug: T176474 Change-Id: Ibea7c74a90be0394223d8fa85324bbf4cee16c4d --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.LiveUpdateButtonWidget.less 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/43/393643/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.LiveUpdateButtonWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.LiveUpdateButtonWidget.less index 67664b5..3c8664c 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.LiveUpdateButtonWidget.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.LiveUpdateButtonWidget.less @@ -19,7 +19,7 @@ border-radius: 100%; transform-origin: 50% 50%; opacity: 0; - animation: ripple 1.2s ease-out infinite; + animation: ripple 2.3s ease-out infinite; animation-delay: 1s; } } @@ -35,6 +35,7 @@ .transform( scale( 1.5 ) ); opacity: 0.8; } + 80%, 100% { opacity: 0; .transform( scale( 4 ) ); -- To view, visit https://gerrit.wikimedia.org/r/393643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibea7c74a90be0394223d8fa85324bbf4cee16c4d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Combine changes limit and time period selectors
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393622 ) Change subject: Combine changes limit and time period selectors .. Combine changes limit and time period selectors - Combine number of results and the time period panels. - Add gear/settings icon. - Make the "View newest changes" link more prominent, by moving the indicator into the same row as "Live updates" button and the combined number of results and time period selector. - Add reload icon to "View newest changes" link. Bug: T177926 Change-Id: I793bfaa91a7823bdec7af5816d9398d2a993262a --- M languages/i18n/en.json M languages/i18n/qqq.json M resources/Resources.php M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesLimitPopupWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.DatePopupWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.LiveUpdateButtonWidget.less A resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitAndDateButtonWidget.js D resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitPopupWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js D resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DatePopupWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js 14 files changed, 243 insertions(+), 326 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/22/393622/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 1fecca0..eb07837 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1361,11 +1361,11 @@ "rcfilters-legend-heading": "List of abbreviations:", "rcfilters-other-review-tools": "Other review tools", "rcfilters-group-results-by-page": "Group results by page", - "rcfilters-grouping-title": "Grouping", "rcfilters-activefilters": "Active filters", "rcfilters-advancedfilters": "Advanced filters", - "rcfilters-limit-title": "Changes to show", - "rcfilters-limit-shownum": "Show last {{PLURAL:$1|change|$1 changes}}", + "rcfilters-limit-title": "Results to show", + "rcfilters-limit-and-date-label": "{{PLURAL:$1|change|$1 changes}}, $2", + "rcfilters-date-popup-title": "Time period to search", "rcfilters-days-title": "Recent days", "rcfilters-hours-title": "Recent hours", "rcfilters-days-show-days": "$1 {{PLURAL:$1|day|days}}", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 654ac6a..82dcbad 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1555,11 +1555,11 @@ "rcfilters-legend-heading": "Used as a heading for legend box on [[Special:RecentChanges]] and [[Special:Watchlist]] when RCFilters are enabled.", "rcfilters-other-review-tools": "Used as a heading for the community collection of other links on [[Special:RecentChanges]] when RCFilters are enabled.", "rcfilters-group-results-by-page": "A label for the checkbox describing whether the results in [[Special:RecentChanges]] are grouped by page when RCFilters are enabled.", - "rcfilters-grouping-title": "Title for the section showing display options for grouping results in [[Special:RecentChanges]] when RCFilters are enabled.", "rcfilters-activefilters": "Title for the filters selection showing the active filters.", "rcfilters-advancedfilters": "Title for the buttons allowing the user to switch to the various advanced filters views.", "rcfilters-limit-title": "Title for the options to change the number of results shown.", - "rcfilters-limit-shownum": "Title for the button that opens the operation to control how many results are shown. \n\nParameters: $1 - Number of results shown", + "rcfilters-limit-and-date-label": "Title for the button that opens the operation to control how many results to show and in which time period to search. \n\nParameters: $1 - Number of results shown\n\n$2 - Time period to search. One of {{msg-mw|rcfilters-days-title}} or {{msg-mw|rcfilters-hours-title}} is used as $2", + "rcfilters-date-popup-title": "Section title of date options on recent changes results", "rcfilters-days-title": "Title for the options to change the number of days for the results shown.", "rcfilters-hours-title": "Title for the options to change the number of hours for the results shown.", "rcfilters-days-show-days": "Title for the button that opens the operation to control the day range for the results. \n\nParameters: $1 - Number of days shown\n{{Identical|Day}}", diff
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Prevent empty chart flashing on CX dashboard
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393578 ) Change subject: Prevent empty chart flashing on CX dashboard .. Prevent empty chart flashing on CX dashboard - Change appearance behavior of CX stats card: * Old behavior displays empty stats card in CX dashboard, which is populated or removed after user statistics are loaded. * New behavior does not display stats card initially. Stats card is only displayed if there is data to show. Bug: T179747 Change-Id: I9080464ce1a5e1ec2e411014f71add1ccf2036ba --- M modules/widgets/translator/ext.cx.translator.js M modules/widgets/translator/ext.cx.translator.less 2 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/78/393578/1 diff --git a/modules/widgets/translator/ext.cx.translator.js b/modules/widgets/translator/ext.cx.translator.js index 74ee041..1652cf3 100644 --- a/modules/widgets/translator/ext.cx.translator.js +++ b/modules/widgets/translator/ext.cx.translator.js @@ -93,6 +93,10 @@ self.$canvas.prop( 'width', self.$widget.width() ); self.draw(); + + // Make statistics visible in dashboard sidebar, + // after all data is fetched and drawn on canvas + self.$widget.addClass( 'cx-translator--visible' ); } ).fail( function () { self.$widget.remove(); } ); diff --git a/modules/widgets/translator/ext.cx.translator.less b/modules/widgets/translator/ext.cx.translator.less index 3baad07..e5a7c20 100644 --- a/modules/widgets/translator/ext.cx.translator.less +++ b/modules/widgets/translator/ext.cx.translator.less @@ -5,6 +5,7 @@ .mw-ui-one-whole; background-color: #fff; + display: none; margin-bottom: 1em; border-radius: @borderRadius; padding: 1em; @@ -14,6 +15,10 @@ width: 47.5%; margin-bottom: 0; } + + &--visible { + display: block; + } } .cx-translator__header { -- To view, visit https://gerrit.wikimedia.org/r/393578 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9080464ce1a5e1ec2e411014f71add1ccf2036ba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Add loading indicator to CX stats card
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393258 ) Change subject: Add loading indicator to CX stats card .. Add loading indicator to CX stats card - Change appearance behavior of CX stats card. Old behavior displayes empty stats card in CX dashboard, which is populated or removed after user statistics are loaded. - Always show stats card in CX dashboard, with loading indicator showing user statistics are being loaded from server. - Display message when user does not have any translations so far, instead of removing the card completely. Bug: T179747 Change-Id: I49515304fc0e65159da3e5b6565924fb45a0ce75 --- M extension.json M i18n/en.json M i18n/qqq.json M modules/widgets/translator/ext.cx.translator.js M modules/widgets/translator/ext.cx.translator.less 5 files changed, 88 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/58/393258/1 diff --git a/extension.json b/extension.json index 6c16fd2..d1fd405 100644 --- a/extension.json +++ b/extension.json @@ -1208,10 +1208,12 @@ "messages": [ "cx-translator-header", "cx-translator-month-stats-label", + "cx-translator-no-stats", "cx-translator-total-translations-label" ], "dependencies": [ "ext.cx.model", + "ext.cx.widgets.spinner", "mediawiki.api", "mediawiki.language" ] diff --git a/i18n/en.json b/i18n/en.json index a1e10fd..4468fe3 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -210,6 +210,7 @@ "cx-tools-linter-view-details": "View details", "cx-tools-linter-hide-details": "Hide details", "cx-translator-header": "Your statistics", + "cx-translator-no-stats": "You don't have any translations yet", "cx-translator-month-stats-label": "This month", "cx-translator-total-translations-label": "Total", "cx-page-old-revision-loaded": "This translation is based on an older version of the content. The source page may have [$1 changed significantly]. You can continue this translation or start it again to use the updated content.", diff --git a/i18n/qqq.json b/i18n/qqq.json index de67707..5d2d93b 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -219,6 +219,7 @@ "cx-tools-linter-view-details": "Label for abusefilter error hide/collapse link in linter card", "cx-tools-linter-hide-details": "Label for abusefilter error hide/collapse link in linter card", "cx-translator-header": "Shown in sidebar menu in the Content Translation dashboard. Represents card header for translation statistics of current user.", + "cx-translator-no-stats": "Shown in sidebar menu in the Content Translation dashboard. Shown when user doesn't have any translation to display in the statistics card.", "cx-translator-month-stats-label": "Label displayed in the translation statistics of current user.", "cx-translator-total-translations-label": "Label displayed in the translation statistics of current user.\n{{Identical|Total}}", "cx-page-old-revision-loaded": "Warning message shown when the older revision of source page loaded", diff --git a/modules/widgets/translator/ext.cx.translator.js b/modules/widgets/translator/ext.cx.translator.js index 74ee041..02a64ae 100644 --- a/modules/widgets/translator/ext.cx.translator.js +++ b/modules/widgets/translator/ext.cx.translator.js @@ -22,18 +22,26 @@ this.max = -1; this.$lastMonthButton = null; + this.$monthStats = null; + this.$total = null; + this.$statsContainer = null; this.$widget = null; this.$canvas = null; this.render(); + this.loadStats(); }; mw.cx.widgets.CXTranslator.prototype.render = function () { - var $header, $monthStats, $total, - api = new mw.Api(), - self = this; + var $overlay, $loadingIndicator, $noStatsMessage, $header; - $header = $( '' ).addClass( 'cx-translator__header' ); + $overlay = $( '' ).addClass( 'cx-translator__overlay' ); + $loadingIndicator = $( '' ) + .addClass( 'cx-translator__loading-indicator' ) + .append( mw.cx.widgets.spinner() ); + $noStatsMessage = $( '' ) + .addClass( 'cx-translator__no-stats-msg' ) + .text( mw.msg( 'cx-translator-no-stats' ) ); this.$lastMonthButton = $( '' )
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Dismiss action menu when menu option is clicked
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393241 ) Change subject: Dismiss action menu when menu option is clicked .. Dismiss action menu when menu option is clicked - Fix stuck action menu, opened on click. Menu remains stuck after "Discard translation" button is clicked. If dialog gets canceled, there is no obvious way for user to close action menu. Bug: T180649 Change-Id: I52b0e0b8f681de91673e1e6eccea564b72fde0b4 --- M modules/dashboard/ext.cx.translationlist.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/41/393241/1 diff --git a/modules/dashboard/ext.cx.translationlist.js b/modules/dashboard/ext.cx.translationlist.js index 043c2a8..4eef8f3 100644 --- a/modules/dashboard/ext.cx.translationlist.js +++ b/modules/dashboard/ext.cx.translationlist.js @@ -422,6 +422,7 @@ e.stopPropagation(); translation = $( this ).closest( '.cx-tlitem' ).data( 'translation' ); + self.$selectedActionMenu.removeClass( 'cx-tlitem__actions--selected' ); OO.ui.getWindowManager().openWindow( 'message', $.extend( { message: mw.msg( 'cx-draft-discard-confirmation-message' ), -- To view, visit https://gerrit.wikimedia.org/r/393241 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52b0e0b8f681de91673e1e6eccea564b72fde0b4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Remove duplicate suggestions in search results
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393231 ) Change subject: Remove duplicate suggestions in search results .. Remove duplicate suggestions in search results Prevents exact user input query to be added to search results in New translation dialog. Made possible by extra abstraction added in Ic7a3aaf38a. Bug: T181002 Change-Id: I0f548de70dd084c2a638af48e9fecaf4e3a8f99e --- M modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/31/393231/1 diff --git a/modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js b/modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js index 0a54123..12164b3 100644 --- a/modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js +++ b/modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js @@ -122,6 +122,13 @@ /** * @inheritdoc */ +mw.cx.ui.PageSelectorWidget.prototype.shouldAddQueryInput = function () { + return false; +}; + +/** + * @inheritdoc + */ mw.cx.ui.PageSelectorWidget.prototype.getOptionsFromData = function ( data ) { // Parent method var optionsData = mw.cx.ui.PageSelectorWidget.super.prototype.getOptionsFromData.call( this, data ); -- To view, visit https://gerrit.wikimedia.org/r/393231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f548de70dd084c2a638af48e9fecaf4e3a8f99e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make mw.widget.TitleWidget results more flexible
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393230 ) Change subject: Make mw.widget.TitleWidget results more flexible .. Make mw.widget.TitleWidget results more flexible * Factor out addition of exact input query to mw.widget.TitleWidget results, enabling subclasses to make it optional. Change-Id: Ic7a3aaf38a3827917e4d349cc6b828f37cc64b67 --- M resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js 1 file changed, 29 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/393230/1 diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js index 83a2612..1f807bb 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js @@ -211,7 +211,7 @@ * @return {OO.ui.OptionWidget[]} Menu items */ mw.widgets.TitleWidget.prototype.getOptionsFromData = function ( data ) { - var i, len, index, pageExists, pageExistsExact, suggestionPage, page, redirect, redirects, + var i, len, index, suggestionPage, page, redirect, redirects, currentPageName = new mw.Title( mw.config.get( 'wgRelevantPageName' ) ).getPrefixedText(), items = [], titles = [], @@ -272,31 +272,12 @@ return pageData[ a ].index - pageData[ b ].index; } ); - // If not found, run value through mw.Title to avoid treating a match as a - // mismatch where normalisation would make them matching (T50476) - - pageExistsExact = ( - Object.prototype.hasOwnProperty.call( pageData, this.getQueryValue() ) && - ( - !pageData[ this.getQueryValue() ].missing || - pageData[ this.getQueryValue() ].known - ) - ); - pageExists = pageExistsExact || ( - titleObj && - Object.prototype.hasOwnProperty.call( pageData, titleObj.getPrefixedText() ) && - ( - !pageData[ titleObj.getPrefixedText() ].missing || - pageData[ titleObj.getPrefixedText() ].known - ) - ); - if ( this.cache ) { this.cache.set( pageData ); } - // Offer the exact text as a suggestion if the page exists - if ( pageExists && !pageExistsExact ) { + if ( this.shouldAddQueryInput( pageData ) ) { + // Offer the exact text as a suggestion if the page exists titles.unshift( this.getQueryValue() ); } @@ -319,6 +300,32 @@ }; /** +* Determines whether exact input query should be added to the suggestions. +* +* @param {Array} pageData +* @return {boolean} True if exact user input query should be added to the suggestions. +*/ + mw.widgets.TitleWidget.prototype.shouldAddQueryInput = function ( pageData ) { + var queryValue = this.getQueryValue(), + titleObj = mw.Title.newFromText( queryValue ); + + if ( !titleObj ) { + return false; + } + + function pageExists( title ) { + return Object.prototype.hasOwnProperty.call( pageData, title ) && + ( + !pageData[ title ].missing || + pageData[ title ].known + ); + } + + // We want normalized page to exist, and page exact to input query NOT to exist in pageData + return pageExists( titleObj.getPrefixedText() ) && !pageExists( queryValue ); + }; + + /** * Get menu option widget data from the title and page data * * @param {string} title Title object -- To view, visit https://gerrit.wikimedia.org/r/393230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7a3aaf38a3827917e4d349cc6b828f37cc64b67 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: [WIP] Split WL and RC prefs for ORES
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392452 ) Change subject: [WIP] Split WL and RC prefs for ORES .. [WIP] Split WL and RC prefs for ORES - Make ORES preferences separate for Watchlist and RecentChanges, so both include: * Prediction Threshold * "Highlight likely problem edits" control * "Show only likely problem edits" control - Provide both sections with separate titles, not mentioning the other one. - Change instruction text displayed on help icon click. Bug: T180866 Change-Id: Ifbc5a6b3a5f5e634cc308d769360365f30fceecc --- M extension.json M i18n/en.json M includes/Hooks.php M includes/Hooks/PreferencesHookHandler.php 4 files changed, 27 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/52/392452/1 diff --git a/extension.json b/extension.json index 63f226b..e8c6af3 100644 --- a/extension.json +++ b/extension.json @@ -206,6 +206,7 @@ "DefaultUserOptions": { "ores-damaging-flag-rc": false, "oresDamagingPref": "soft", + "rcOresDamagingPref": "soft", "oresHighlight": false, "oresRCHideNonDamaging": false, "oresWatchlistHideNonDamaging": false diff --git a/i18n/en.json b/i18n/en.json index 5cd0889..498b69e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -11,11 +11,11 @@ "ores-damaging-legend": "This edit may have problems and should be reviewed ([[:mw:Special:MyLanguage/ORES review tool|more info]])", "ores-hide-nondamaging-filter": "Hide probably good edits", "ores-pref-damaging": "Prediction threshold", - "ores-pref-damaging-flag": "Highlight likely problem edits with colors and an \"{{int:ores-damaging-letter}}\" for \"needs review\" (to set the level at which edits are marked, use the \"{{int:ores-pref-damaging}}\" setting in the Watchlist preferences)", + "ores-pref-damaging-flag": "Highlight likely problem edits with colors and an \"{{int:ores-damaging-letter}}\" for \"needs review\"", "ores-damaging-maybebad": "May have problems (flags most problem edits but includes many false positives)", "ores-damaging-likelybad": "Likely have problems (medium probability)", "ores-damaging-verylikelybad": "Very likely have problems (flags few false positives but finds a smaller % of problem edits)", - "ores-help-damaging-pref": "Sets the sensitivity of the \"Highlight likely problem edits...\" and \"Show only likely problem edits...\" options on Recent Changes and Watchlist.", + "ores-help-damaging-pref": "Change the \"threshold\" setting to make the options below broader or more selective.", "ores-rcfilters-whats-this-link-text": "Learn more", "ores-rcfilters-ores-conflicts-logactions-global": "The \"{{int:rcfilters-filter-logactions-label}}\" filter conflicts with one or more Contribution Quality or User Intent filters. Quality and Intent predictions are not available for logged actions. The conflicting filters are marked in the Active Filters area, above.", "ores-rcfilters-logactions-conflicts-ores": "This filter conflicts with one or more Contribution Quality or User Intent filters. Quality and Intent predictions are not available for logged actions.", @@ -48,7 +48,8 @@ "ores-pref-highlight": "Highlight likely problem edits with colors and an \"{{int:ores-damaging-letter}}\" for \"needs review\"", "ores-pref-rc-hidenondamaging": "Show only likely problem edits (and hide probably good edits)", "ores-pref-watchlist-hidenondamaging": "Show only likely problem edits (and hide probably good edits)", - "prefs-ores" : "Revision scoring", + "prefs-ores-wl" : "Revision scoring on Watchlist", + "prefs-ores-rc" : "Revision scoring on Recent changes, Related changes, Contributions", "apihelp-query+ores-description": "Return ORES configuration and model data for this wiki.", "apihelp-query+ores-summary": "Return ORES configuration and model data for this wiki.", "apihelp-query+ores-example-simple": "Fetch ORES data:", diff --git a/includes/Hooks.php b/includes/Hooks.php index 78c71c3..abaee0a 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -10,6 +10,8 @@ use MediaWiki\Logger\LoggerFactory; use OutputPage; use RecentChange; +use DerivativeContext; +use DerivativeRequest; use RequestContext; use Skin; use SpecialRecentChanges; @@ -115,7 +117,12 @@ * @return string 'maybebad', 'likelybad', or 'verylikelybad' */ public static function getDamagingLevelPreference( User $user ) { - $pref = $user->getOption( 'oresDamagingPref' ); + $context = new DerivativeContext( RequestContext::getMain() ); + $context->setUser( $user ); +
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix same source and target language
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390997 ) Change subject: Fix same source and target language .. Fix same source and target language - Fix order of calls issue that allowed source and target language to be same, in specific cases(look bug for details). Bug: T178126 Change-Id: If8afa8fd3d5e02a196eedadfbf55d49c988cea82 --- M modules/source/ext.cx.source.selector.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/97/390997/1 diff --git a/modules/source/ext.cx.source.selector.js b/modules/source/ext.cx.source.selector.js index 90d68a0..da24785 100644 --- a/modules/source/ext.cx.source.selector.js +++ b/modules/source/ext.cx.source.selector.js @@ -123,8 +123,8 @@ self.targetLanguages = data.targetLanguages; self.sourceLanguages = data.sourceLanguages; self.render(); - self.setDefaultLanguages(); self.prefill(); + self.setDefaultLanguages(); if ( self.isEmbedded ) { self.populateRecentEdits(); } -- To view, visit https://gerrit.wikimedia.org/r/390997 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8afa8fd3d5e02a196eedadfbf55d49c988cea82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Change filter group title message
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390265 ) Change subject: Change filter group title message .. Change filter group title message - Change title message for "Flagged Revisions" filter group, to include message documentation note to 'use the word your wiki uses for Flagged Revisions'. Bug: T159791 Change-Id: If4f5a44d562e22038a0a6c4ea09ec2d84decb5c9 --- M frontend/FlaggedRevsUI.hooks.php M i18n/flaggedrevs/en.json M i18n/flaggedrevs/qqq.json 3 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/65/390265/1 diff --git a/frontend/FlaggedRevsUI.hooks.php b/frontend/FlaggedRevsUI.hooks.php index 37f73f6..410be12 100644 --- a/frontend/FlaggedRevsUI.hooks.php +++ b/frontend/FlaggedRevsUI.hooks.php @@ -362,7 +362,7 @@ $flaggedRevsGroup = new ChangesListStringOptionsFilterGroup( [ 'name' => 'flaggedrevs', - 'title' => 'flaggedrevs', + 'title' => 'flaggedrevs-rcfilters-filtergroup-title', 'priority' => -9, 'default' => ChangesListStringOptionsFilterGroup::NONE, 'isFullCoverage' => true, diff --git a/i18n/flaggedrevs/en.json b/i18n/flaggedrevs/en.json index f8e0b56..60e1148 100644 --- a/i18n/flaggedrevs/en.json +++ b/i18n/flaggedrevs/en.json @@ -26,6 +26,7 @@ "flaggedrevs-hidereviewed": "$1 reviewed edits", "flaggedrevs-hidereviewed-hide": "Hide", "flaggedrevs-hidereviewed-show": "Show", + "flaggedrevs-rcfilters-filtergroup-title": "Flagged Revisions", "flaggedrevs-rcfilters-need-review-label": "Need review", "flaggedrevs-rcfilters-need-review-desc": "Edits requiring review.", "flaggedrevs-rcfilters-reviewed-label": "Reviewed", diff --git a/i18n/flaggedrevs/qqq.json b/i18n/flaggedrevs/qqq.json index 0bc0cc6..aaa4099 100644 --- a/i18n/flaggedrevs/qqq.json +++ b/i18n/flaggedrevs/qqq.json @@ -56,6 +56,7 @@ "flaggedrevs-hidereviewed": "{{Flagged Revs}}\nShown within parenthesis on [[Special:Recentchanges]], [[Special:NewPages]] and [[Special:Watchlist]].\n\nThis refers to a toggle to hide or show edits (revisions) that have been reviewed.\n\nIf set to \"hide\", it also hides edits to pages that are not reviewable (like Talk pages).\n\nParameters:\n* $1 - a link with the text {{msg-mw|flaggedrevs-hidereviewed-show}} or {{msg-mw|flaggedrevs-hidereviewed-hide}}", "flaggedrevs-hidereviewed-hide": "{{doc-actionlink}}\nOption text in [[Special:RecentChanges]] in conjunction with {{msg-mw|flaggedrevs-hidereviewed}}.\n\nSee also:\n* {{msg-mw|flaggedrevs-hidereviewed-show}}\n{{Identical|Hide}}", "flaggedrevs-hidereviewed-show": "{{doc-actionlink}}\nOption text in [[Special:RecentChanges]] in conjunction with {{msg-mw|flaggedrevs-hidereviewed}}.\n\nSee also:\n* {{msg-mw|flaggedrevs-hidereviewed-hide}}\n{{Identical|Show}}", + "flaggedrevs-rcfilters-filtergroup-title": "{{Flagged Revs}}\nTitle for the filter group for Flagged Revisions.\nUse the word here your wiki uses for Flagged Revisions.\nSee also:\n* {{msg-mw|flaggedrevs}}", "flaggedrevs-rcfilters-need-review-label": "Label for the filter for showing edits that require review.", "flaggedrevs-rcfilters-need-review-desc": "Description for the filter for showing edits that require review.", "flaggedrevs-rcfilters-reviewed-label": "Label for the filter for showing edits that have been reviewed.\n{{Identical|Reviewed}}", -- To view, visit https://gerrit.wikimedia.org/r/390265 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4f5a44d562e22038a0a6c4ea09ec2d84decb5c9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Add new core tags
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390224 ) Change subject: [WIP] Add new core tags .. [WIP] Add new core tags Add tags to types of edits that get automatic edit summaries: - Making a page a redirect - Blanking of the page - Removing nearly all (more than 90%) content - Rolling back an edit Bug: T167656 Change-Id: Ie7f637fcec5ee659c1086e28e8ba21f470c45160 --- M includes/changetags/ChangeTags.php M includes/content/ContentHandler.php M includes/page/WikiPage.php M languages/i18n/en.json M languages/i18n/qqq.json 5 files changed, 158 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/24/390224/1 diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index fa98124..9451784 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -35,7 +35,13 @@ /** * @var string[] */ - private static $coreTags = [ 'mw-contentmodelchange' ]; + private static $coreTags = [ + 'mw-contentmodelchange', + 'redirect', + 'blank', + 'replace', + 'rollback' + ]; /** * Creates HTML for the given tags diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index 0509e29..b9c5452 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -755,6 +755,66 @@ } /** +* Return type of change if one exists for the given edit. +* +* @param Content $oldContent The previous text of the page. +* @param Content $newContent The submitted text of the page. +* @param int $flags Bit mask: a bit mask of flags submitted for the edit. +* +* @return string|null String key representing type of change, or null. +*/ + private function getChangeType( Content $oldContent = null, Content $newContent = null, + $flags ) { + /** +* @var $ot Title +* @var $rt Title +*/ + $ot = !is_null( $oldContent ) ? $oldContent->getRedirectTarget() : null; + $rt = !is_null( $newContent ) ? $newContent->getRedirectTarget() : null; + + // We check for the type of change in the given edit, and return string key accordingly + + // Redirect + if ( is_object( $rt ) && + ( !is_object( $ot ) + || !$rt->equals( $ot ) + || $ot->getFragment() != $rt->getFragment() + ) ) { + return 'redirect'; + } + + // New page created + if ( $flags & EDIT_NEW && $newContent->getSize() > 0 ) { + return 'newpage'; + } + + // Blanking of a page + if ( !empty( $oldContent ) && $oldContent->getSize() > 0 && $newContent->getSize() == 0 ) { + return 'blank'; + } + + // Removing more than 90% of the article + if ( !empty( $oldContent ) + && $oldContent->getSize() > 10 * $newContent->getSize() + && $newContent->getSize() < 500 + ) { + return 'replace'; + } + + // New blank article + if ( $flags & EDIT_NEW && $newContent->isEmpty() ) { + return 'newblank'; + } + + // Content model changed + if ( $oldContent && $oldContent->getModel() !== $newContent->getModel() ) { + return 'mw-contentmodelchange'; + } + + return null; + } + + /** * Return an applicable auto-summary if one exists for the given edit. * * @since 1.21 @@ -767,23 +827,17 @@ */ public function getAutosummary( Content $oldContent = null, Content $newContent = null, $flags ) { + $changeType = $this->getChangeType( $oldContent, $newContent, $flags ); + + // There's no applicable auto-summary for our case, so our auto-summary is empty. + if ( !$changeType ) { + return ''; + } + // Decide what kind of auto-summary is needed. - - // Redirect auto-summaries - - /** -* @var $ot Title -* @var $rt Title -*/ - - $ot = !is_null( $oldContent ) ? $oldContent->getRedirectTarget() : null; - $rt = !is_null( $newContent ) ? $newContent->getRedirectTarget() : null; - - if ( is_object( $rt ) ) {
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change disabled saved filter tooltip
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390167 ) Change subject: Change disabled saved filter tooltip .. Change disabled saved filter tooltip Bug: T179743 Change-Id: I2359bec7d89c6184dafbb5a1f90ea0f47cccd962 --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/390167/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index b463d95..5386927 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1382,7 +1382,7 @@ "rcfilters-savedqueries-apply-and-setdefault-label": "Create default filter", "rcfilters-savedqueries-cancel-label": "Cancel", "rcfilters-savedqueries-add-new-title": "Save current filter settings", - "rcfilters-savedqueries-already-saved": "These filters are already saved", + "rcfilters-savedqueries-already-saved": "These filters are already saved. Change your settings to create a new Saved Filter.", "rcfilters-restore-default-filters": "Restore default filters", "rcfilters-clear-all-filters": "Clear all filters", "rcfilters-show-new-changes": "View newest changes", -- To view, visit https://gerrit.wikimedia.org/r/390167 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2359bec7d89c6184dafbb5a1f90ea0f47cccd962 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add overlay to list of changes
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/389753 ) Change subject: Add overlay to list of changes .. Add overlay to list of changes - Prevent users from accidentally clicking links on filtered results, when RCFilters dropdown menu is opened, by adding overlay which closes dropdown menu. Bug: T177626 Change-Id: Id55702ecbe6b96ee57453d4f86f20bd94a401d7c --- M includes/specialpage/ChangesListSpecialPage.php M includes/specials/SpecialRecentchanges.php M includes/specials/SpecialWatchlist.php M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js 6 files changed, 41 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/389753/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 5194983..d449608 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -1606,6 +1606,15 @@ } /** +* Return the overlay displayed within the changes list +* +* @return string +*/ + public function makeOverlay() { + return ''; + } + + /** * Add page-specific modules. */ protected function addModules() { diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index dfa13b6..1fe24fd 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -425,6 +425,7 @@ $userShowHiddenCats = $this->getUser()->getBoolOption( 'showhiddencats' ); $rclistOutput = $list->beginRecentChangesList(); if ( $this->isStructuredFilterUiEnabled() ) { + $rclistOutput .= $this->makeOverlay(); $rclistOutput .= $this->makeLegend(); } diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index ff62e9e..e349ab2 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -535,6 +535,7 @@ $s = $list->beginRecentChangesList(); if ( $this->isStructuredFilterUiEnabled() ) { + $s .= $this->makeOverlay(); $s .= $this->makeLegend(); } diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less index b923efb..bc2c437 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less @@ -12,6 +12,7 @@ } .mw-rcfilters-ui-changesListWrapperWidget { + position: relative; &-newChanges { min-height: 34px; @@ -56,6 +57,17 @@ .mw-changeslist-legend { background-color: @background-color-base; + position: relative; + } + + .mw-changeslist-overlay { + display: none; + } + + &--overlay > .mw-changeslist-overlay { + position: absolute; + display: block; + width: 100%; } // Correction for Enhanced RC diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js index b6a0a4f..b489d82 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js @@ -43,6 +43,10 @@ newChangesExist: 'onNewChangesExist' } ); + // Hooks + mw.hook( 'RcFilters.popup.open' ).add( this.toggleOverlay.bind( this, true ) ); + mw.hook( 'RcFilters.popup.close' ).add( this.toggleOverlay.bind( this, false ) ); + this.$element .addClass( 'mw-rcfilters-ui-changesListWrapperWidget' ) // We handle our own display/hide of the empty results message @@ -189,6 +193,9 @@ } + // We need changes list overlay to cover all filtered edits, therefore we match heights + this.$element.find( '.mw-changeslist-overlay' ).height( this.$element.height() ); + loaderPromise.done( function () { if ( !isInitialDOM && !isEmpty ) { // Make sure
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters:Make bookmark icon gray when unavailable
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/389697 ) Change subject: RCFilters:Make bookmark icon gray when unavailable .. RCFilters:Make bookmark icon gray when unavailable - Make bookmark icon gray out when unavailable instead of disappearing. - Include a tooltip in the grayed out state only to say: "These filters are already saved." Bug: T179743 Change-Id: I3e4d711f9b8f2b0a2c1195c9d7632de417e6d0d5 --- M languages/i18n/en.json M languages/i18n/qqq.json M resources/Resources.php M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js 4 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/389697/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index b93a5d3..6c9929b 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1382,6 +1382,7 @@ "rcfilters-savedqueries-apply-and-setdefault-label": "Create default filter", "rcfilters-savedqueries-cancel-label": "Cancel", "rcfilters-savedqueries-add-new-title": "Save current filter settings", + "rcfilters-savedqueries-already-saved": "These filters are already saved", "rcfilters-restore-default-filters": "Restore default filters", "rcfilters-clear-all-filters": "Clear all filters", "rcfilters-show-new-changes": "View newest changes", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index d715091..08038ed 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1576,6 +1576,7 @@ "rcfilters-savedqueries-apply-and-setdefault-label": "Label for the button to apply saving a new filter setting and set it as default in [[Special:RecentChanges]]. This is for a small popup, please try to use a short string.", "rcfilters-savedqueries-cancel-label": "Label for the button to cancel the saving of a new quick link in [[Special:RecentChanges]]\n{{Identical|Cancel}}", "rcfilters-savedqueries-add-new-title": "Title for the popup to add new quick link in [[Special:RecentChanges]]. This is for a small popup, please try to use a short string.", + "rcfilters-savedqueries-already-saved": "Title for the popup in [[Special:RecentChanges]] that indicates that current set of filters is already saved. This is for a small popup, please try to use a short string.", "rcfilters-restore-default-filters": "Label for the button that resets filters to defaults", "rcfilters-clear-all-filters": "Title for the button that clears all filters", "rcfilters-show-new-changes": "Label for the button to show new changes.", diff --git a/resources/Resources.php b/resources/Resources.php index 2594a3d..a16ab0e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1854,6 +1854,7 @@ 'rcfilters-savedqueries-new-name-label', 'rcfilters-savedqueries-new-name-placeholder', 'rcfilters-savedqueries-add-new-title', + 'rcfilters-savedqueries-already-saved', 'rcfilters-savedqueries-apply-label', 'rcfilters-savedqueries-apply-and-setdefault-label', 'rcfilters-savedqueries-cancel-label', diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js index 0d39cd0..4e33be0 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js @@ -417,7 +417,10 @@ this.matchingQuery ? this.matchingQuery.getLabel() : '' ); this.savedQueryTitle.toggle( !!this.matchingQuery ); - this.saveQueryButton.toggle( !this.matchingQuery ); + this.saveQueryButton.setDisabled( !!this.matchingQuery ); + this.saveQueryButton.setTitle( !this.matchingQuery ? + mw.msg( 'rcfilters-savedqueries-add-new-title' ) : + mw.msg( 'rcfilters-savedqueries-already-saved' ) ); if ( this.matchingQuery ) { this.emphasize(); -- To view, visit https://gerrit.wikimedia.org/r/389697 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e4d711f9b8f2b0a2c1195c9d7632de417e6d0d5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Customize personal header
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/389649 ) Change subject: Customize personal header .. Customize personal header - Fade into the background. Drop white color for the header. - Show notification entry points and move user links to dropdown menu. Bug: T160918 Depends-On: I0ab756cafcbd535fa1765fd12fdd72bb75f0df62 Depends-On: I549376af6f7380dbadfb5f3f7f7171bbe64cccd7 Change-Id: Ib44e7986c83d72d8a79ed51cbf94a0a98960e9d0 --- M extension.json M i18n/en.json M i18n/qqq.json M modules/dashboard/ext.cx.dashboard.js M modules/dashboard/styles/ext.cx.dashboard.less M modules/ui/legacy/styles/mw.cx.ui.Columns.less M modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less M modules/ui/mw.cx.ui.Header.js M modules/ui/styles/mw.cx.ui.Columns.less M modules/ui/styles/mw.cx.ui.Header.less A modules/ui/styles/widgets/mw.cx.ui.PersonalMenuWidget.less A modules/ui/widgets/mw.cx.ui.PersonalMenuWidget.js M specials/SpecialContentTranslation.php 13 files changed, 376 insertions(+), 66 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/49/389649/1 diff --git a/extension.json b/extension.json index 78c283f..3df9b79 100644 --- a/extension.json +++ b/extension.json @@ -1473,12 +1473,15 @@ "cx-save-draft-save-success", "cx-save-draft-saving", "cx-save-draft-tooltip", + "cx-personaltools-user", "login" ], "dependencies": [ "mw.cx.ui", "oojs-ui.styles.icons-wikimedia", - "mw.cx.ui.Infobar" + "oojs-ui.styles.icons-user", + "mw.cx.ui.Infobar", + "mw.cx.ui.PersonalMenuWidget" ] }, "mw.cx.ui.Header.skin": { @@ -2022,6 +2025,17 @@ "oojs-ui.styles.icons-interactions" ] }, + "mw.cx.ui.PersonalMenuWidget": { + "scripts": [ + "ui/widgets/mw.cx.ui.PersonalMenuWidget.js" + ], + "styles": [ + "ui/styles/widgets/mw.cx.ui.PersonalMenuWidget.less" + ], + "dependencies": [ + "mediawiki.widgets" + ] + }, "mw.cx.ui.TitleOptionWidget": { "targets": [ "desktop", "mobile" ], "scripts": [ diff --git a/i18n/en.json b/i18n/en.json index 0a5ac9d..038f5a8 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -204,6 +204,7 @@ "cx-tools-link-to-another-page": "Link to another page", "cx-tools-link-add-as-missing": "Add as missing link", "cx-tools-link-apply": "Done", + "cx-personaltools-user": "User", "mw-pageselector-missing": "Page does not exist", "cx-draft-restoring": "Loading the saved translation...", "cx-draft-restored": "Saved translation loaded.", diff --git a/i18n/qqq.json b/i18n/qqq.json index a8d9891..16907c1 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -213,6 +213,7 @@ "cx-tools-link-to-another-page": "Opens a tool that allows linking to any internal or external page.", "cx-tools-link-add-as-missing": "Shown in the page selector when the user types a name of a page that doesn't exist in the target wiki. Clicking it adds a missing (\"red\") link to this page. \"Missing\" has the same meaning as in {{msg-mw|cx-tools-missing-link-mark-link}}.", "cx-tools-link-apply": "Button label to apply the link selection from link tool card\n{{Identical|Done}}", + "cx-personaltools-user": "Label displayed in personal tools menu on Content Translation dashboard, used in customized personal tools header. Provides link to User page.", "mw-pageselector-missing": "Message shown in page selector when the search did not fetch any result", "cx-draft-restoring": "Message indicating the saved translation being fetched.", "cx-draft-restored": "Message indicating that the saved translation was fetched.", diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index 0a1c819..42bec15 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -18,7 +18,6 @@ function CXDashboard( element, siteMapper ) { this.$container = $( element ); this.siteMapper = siteMapper; - this.$header = null; this.$sidebar = null;
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add another method of getting Preferences URL
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/389648 ) Change subject: Add another method of getting Preferences URL .. Add another method of getting Preferences URL - Add fallback to Preferences URL. If there is no DOM element, get the Preferences link through from the server passed parameter. Change-Id: I0ab756cafcbd535fa1765fd12fdd72bb75f0df62 --- M modules/ext.echo.init.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/48/389648/1 diff --git a/modules/ext.echo.init.js b/modules/ext.echo.init.js index b5e0962..7829d8a 100644 --- a/modules/ext.echo.init.js +++ b/modules/ext.echo.init.js @@ -27,7 +27,8 @@ // Store links links = { notifications: $( '#pt-notifications-alert a' ).attr( 'href' ), - preferences: $( '#pt-preferences a' ).attr( 'href' ) + '#mw-prefsection-echo' + preferences: $( '#pt-preferences a' ).attr( 'href' ) || mw.config.get( 'preferencesLink' ) + + '#mw-prefsection-echo' }; // Respond to click on the notification button and load the UI on demand -- To view, visit https://gerrit.wikimedia.org/r/389648 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ab756cafcbd535fa1765fd12fdd72bb75f0df62 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Provide personal tools getter
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/389647 ) Change subject: Provide personal tools getter .. Provide personal tools getter - Add public function to get user's personal tools. - Add new level of abstraction to the creation on personal tools list items, by enabling user to provide list of personal tools. Change-Id: I549376af6f7380dbadfb5f3f7f7171bbe64cccd7 --- M includes/skins/SkinTemplate.php 1 file changed, 31 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/389647/1 diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 532ee51..21ff72b 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -524,16 +524,45 @@ * @return string */ public function getPersonalToolsList() { + return $this->makePersonalToolsList(); + } + + /** +* Get the HTML for the personal tools list +* +* @param array $personalTools +* @param array $options +* @return string +*/ + public function makePersonalToolsList( $personalTools = null, $options = [] ) { $tpl = $this->setupTemplateForOutput(); $tpl->set( 'personal_urls', $this->buildPersonalUrls() ); $html = ''; - foreach ( $tpl->getPersonalTools() as $key => $item ) { - $html .= $tpl->makeListItem( $key, $item ); + + if ( !isset( $personalTools ) ) { + $personalTools = $tpl->getPersonalTools(); } + + foreach ( $personalTools as $key => $item ) { + $html .= $tpl->makeListItem( $key, $item, $options ); + } + return $html; } /** +* Get personal tools for the user +* +* @return array Array of personal tools +*/ + public function getPersonalTools() { + $tpl = $this->setupTemplateForOutput(); + $tpl->set( 'personal_urls', $this->buildPersonalUrls() ); + + return $tpl->getPersonalTools(); + } + + /** * Format language name for use in sidebar interlanguage links list. * By default it is capitalized. * -- To view, visit https://gerrit.wikimedia.org/r/389647 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I549376af6f7380dbadfb5f3f7f7171bbe64cccd7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix PHP warning for min() method
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/388033 ) Change subject: Fix PHP warning for min() method .. Fix PHP warning for min() method - Pass zero as an argument, instead of giving empty array to min() method when there is no translation data. The data returned to the client stays the same, but without warning. Bug: T179517 Change-Id: Iafff7f064ba841c5c1cf9aa42586cd09b5ccdd84 --- M api/ApiQueryTranslatorStats.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/33/388033/1 diff --git a/api/ApiQueryTranslatorStats.php b/api/ApiQueryTranslatorStats.php index 6d26298..c4e8e17 100644 --- a/api/ApiQueryTranslatorStats.php +++ b/api/ApiQueryTranslatorStats.php @@ -54,7 +54,8 @@ $dates = array_keys( $data ); $dm = new DateManipulator( 'month' ); - $min = $dm->getIntervalIdentifier( min( $dates ) ); + // If there is no data, just use zero (represents now) to avoid passing empty array into min method + $min = $dm->getIntervalIdentifier( empty( $dates ) ? 0 : min( $dates ) ); $max = $dm->getIntervalIdentifier( 0 ); // Now $steps = $dm->getSteps( $min, $max, 'month' ); -- To view, visit https://gerrit.wikimedia.org/r/388033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iafff7f064ba841c5c1cf9aa42586cd09b5ccdd84 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make filter area togglable
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387848 ) Change subject: Make filter area togglable .. Make filter area togglable - Close and open the dropdown filter menu when a user clicks on the active filter area. - Fix inaccessible menu when user clicks on browser scrollbar while dropdown filter menu is visible. Bug: T176954 Change-Id: Id1c0c5078d80064a432b3db0f42775d0c00cdd85 --- M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/387848/1 diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js index a2ce20e..0d39cd0 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js @@ -285,6 +285,8 @@ mw.rcfilters.ui.FilterTagMultiselectWidget.parent.prototype.onMenuToggle.call( this ); if ( isVisible ) { + this.focus(); + mw.hook( 'RcFilters.popup.open' ).fire(); if ( !this.getMenu().getSelectedItem() ) { @@ -294,6 +296,8 @@ setTimeout( function () { this.getMenu().scrollToTop(); }.bind( this ), 0 ); } } else { + this.blur(); + // Clear selection this.selectTag( null ); @@ -340,6 +344,17 @@ /** * @inheritdoc */ + mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onMouseDown = function ( e ) { + if ( !this.isDisabled() && e.which === OO.ui.MouseButtons.LEFT ) { + this.menu.toggle(); + + return false; + } + }; + + /** +* @inheritdoc +*/ mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onChangeTags = function () { // Parent method mw.rcfilters.ui.FilterTagMultiselectWidget.parent.prototype.onChangeTags.call( this ); -- To view, visit https://gerrit.wikimedia.org/r/387848 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1c0c5078d80064a432b3db0f42775d0c00cdd85 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove Media namespace from the list of RCFilters
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387784 ) Change subject: Remove Media namespace from the list of RCFilters .. Remove Media namespace from the list of RCFilters Bug: T176990 Change-Id: I3c5b65244fd6b2782dea0404fe3671407fbb99e6 --- M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/84/387784/1 diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js index dd095dd..14f0f6b 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js @@ -12,6 +12,7 @@ rcTopSection, $watchlistDetails, wlTopSection, + namespaces, savedQueriesPreferenceName = mw.config.get( 'wgStructuredChangeFiltersSavedQueriesPreferenceName' ), filtersModel = new mw.rcfilters.dm.FiltersViewModel(), changesListModel = new mw.rcfilters.dm.ChangesListViewModel(), @@ -44,9 +45,13 @@ // call will do that and add the -loading class right back. $( 'body' ).removeClass( 'mw-rcfilters-ui-loading' ); + // Remove Media namespace + namespaces = mw.config.get( 'wgFormattedNamespaces' ); + delete namespaces[ mw.config.get( 'wgNamespaceIds' ).media ]; + controller.initialize( mw.config.get( 'wgStructuredChangeFilters' ), - mw.config.get( 'wgFormattedNamespaces' ), + namespaces, mw.config.get( 'wgRCFiltersChangeTags' ) ); -- To view, visit https://gerrit.wikimedia.org/r/387784 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c5b65244fd6b2782dea0404fe3671407fbb99e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Spell out Tags and Namespaces labels
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387779 ) Change subject: RCFilters: Spell out Tags and Namespaces labels .. RCFilters: Spell out Tags and Namespaces labels - Provide Tags and Namespaces menus with labels where the icons now are, in order to increase discoverability. Bug: T178539 Change-Id: I2101898d10043ef45d7636f6676d8f1f51b9db58 --- M languages/i18n/en.json M languages/i18n/qqq.json M resources/Resources.php M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js 5 files changed, 5 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/79/387779/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 8015c3d..234b78d 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1463,7 +1463,6 @@ "rcfilters-tag-prefix-tags": "#$1", "rcfilters-exclude-button-off": "Exclude selected", "rcfilters-exclude-button-on": "Excluding selected", - "rcfilters-view-advanced-filters-label": "Advanced filters", "rcfilters-view-tags": "Tagged edits", "rcfilters-view-namespaces-tooltip": "Filter results by namespace", "rcfilters-view-tags-tooltip": "Filter results using edit tags", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 5f72b75..9e7bfca 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1657,7 +1657,6 @@ "rcfilters-tag-prefix-tags": "Prefix for the edit tags in [[Special:RecentChanges]]. Edit tags use a hash (#) as prefix. Please keep this format.\n\nParameters:\n* $1 - Tag display name.", "rcfilters-exclude-button-off": "Title for the button that excludes selected namespaces, when it is not yet active.", "rcfilters-exclude-button-on": "Title for the button that excludes selected namespaces, when it is active.", - "rcfilters-view-advanced-filters-label": "Label for the view switch that changes between advanced filters in [[Special:RecentChanges]]", "rcfilters-view-tags": "Title for the tags view in [[Special:RecentChanges]]\n{{Identical|Tag}}", "rcfilters-view-namespaces-tooltip": "Tooltip for the button that loads the namespace view in [[Special:RecentChanges]]", "rcfilters-view-tags-tooltip": "Tooltip for the button that loads the tags view in [[Special:RecentChanges]]", diff --git a/resources/Resources.php b/resources/Resources.php index eb33ff7..df0c249 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1874,7 +1874,6 @@ 'rcfilters-tag-prefix-tags', 'rcfilters-exclude-button-off', 'rcfilters-exclude-button-on', - 'rcfilters-view-advanced-filters-label', 'rcfilters-view-tags', 'rcfilters-view-namespaces-tooltip', 'rcfilters-view-tags-tooltip', @@ -1888,6 +1887,7 @@ 'rcfilters-other-review-tools', 'blanknamespace', 'namespaces', + 'tags-title', 'invert', 'recentchanges-noresult', 'recentchanges-timeout', diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less index fafa697..148e37b 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less @@ -65,26 +65,15 @@ &-widget.oo-ui-widget { border: 1px solid @colorGray10; border-left-width: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; - border-bottom-left-radius: 0; + border-radius: 0 0 @borderRadius 0; display: block; text-align: right; height: 2.5em; .box-sizing( border-box ); - .oo-ui-buttonElement-frameless.oo-ui-iconElement:first-child { + .oo-ui-buttonOptionWidget:first-child { margin-left: 0; - } - - .oo-ui-labelElement.oo-ui-optionWidget.oo-ui-buttonElement:first-child { - margin-left: 0; - -
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Change main entry point text
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387774 ) Change subject: RCFilters: Change main entry point text .. RCFilters: Change main entry point text Bug: T178069 Change-Id: I52c41a795ca76af9c645cb35266ccebe32a8f1fa --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/387774/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 8015c3d..e4f1a88 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1384,7 +1384,7 @@ "rcfilters-restore-default-filters": "Restore default filters", "rcfilters-clear-all-filters": "Clear all filters", "rcfilters-show-new-changes": "View newest changes", - "rcfilters-search-placeholder": "Filter recent changes (browse or start typing)", + "rcfilters-search-placeholder": "Filter changes (use menu or search for filter name)", "rcfilters-invalid-filter": "Invalid filter", "rcfilters-empty-filter": "No active filters. All contributions are shown.", "rcfilters-filterlist-title": "Filters", -- To view, visit https://gerrit.wikimedia.org/r/387774 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52c41a795ca76af9c645cb35266ccebe32a8f1fa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Refactor setDefaultLanguages
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387644 ) Change subject: Refactor setDefaultLanguages .. Refactor setDefaultLanguages - Move code that finds valid source and target languages, which are different from each other, to separate method. Change-Id: I5550aa603db31862016b6d54c82abf3722d9b5e5 --- M modules/source/ext.cx.source.selector.js 1 file changed, 22 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/44/387644/1 diff --git a/modules/source/ext.cx.source.selector.js b/modules/source/ext.cx.source.selector.js index 77eec21..90d68a0 100644 --- a/modules/source/ext.cx.source.selector.js +++ b/modules/source/ext.cx.source.selector.js @@ -908,22 +908,31 @@ }; CXSourceSelector.prototype.setDefaultLanguages = function () { - var storedTargetLanguage, storedSourceLanguage, - targetLanguage, sourceLanguage, - commonSourceLanguages, i; + var validDefaultLanguagePair = this.findValidDefaultLanguagePair(); - storedTargetLanguage = mw.storage.get( 'cxTargetLanguage' ); - storedSourceLanguage = mw.storage.get( 'cxSourceLanguage' ); + this.setSourceLanguage( validDefaultLanguagePair.sourceLanguage ); + this.setTargetLanguage( validDefaultLanguagePair.targetLanguage ); + }; - targetLanguage = storedTargetLanguage || mw.config.get( 'wgContentLanguage' ); - sourceLanguage = storedSourceLanguage; + /** +* Find valid source and target language pair, with different source and target language +* +* @return {Object} languages Valid and different source and target languages +*/ + CXSourceSelector.prototype.findValidDefaultLanguagePair = function () { + var sourceLanguage, + targetLanguage, + commonSourceLanguages, i, length; + + sourceLanguage = mw.storage.get( 'cxSourceLanguage' ); + targetLanguage = mw.storage.get( 'cxTargetLanguage' ) || mw.config.get( 'wgContentLanguage' ); if ( !this.isValidSource( sourceLanguage ) || sourceLanguage === targetLanguage ) { commonSourceLanguages = this.$sourceLanguage.data( 'uls' ).options.quickList(); - for ( i = 0; i < commonSourceLanguages.length; i++ ) { + for ( i = 0, length = commonSourceLanguages.length; i < length; i++ ) { if ( commonSourceLanguages[ i ] !== targetLanguage && - this.isValidSource( commonSourceLanguages[ i ], targetLanguage ) + this.isValidSource( commonSourceLanguages[ i ] ) ) { sourceLanguage = commonSourceLanguages[ i ]; @@ -932,13 +941,10 @@ } } - // Still couldn't find a valid source language? - if ( !this.isValidSource( sourceLanguage ) || sourceLanguage === targetLanguage ) { - sourceLanguage = mw.config.get( 'wgContentTranslationDefaultSourceLanguage' ); - } - - this.setSourceLanguage( sourceLanguage ); - this.setTargetLanguage( targetLanguage ); + return { + sourceLanguage: sourceLanguage, + targetLanguage: targetLanguage + }; }; CXSourceSelector.prototype.setSelectedItem = function ( item ) { -- To view, visit https://gerrit.wikimedia.org/r/387644 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5550aa603db31862016b6d54c82abf3722d9b5e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: Fix invite guided tour overflows
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387630 ) Change subject: Fix invite guided tour overflows .. Fix invite guided tour overflows - Remove hard height constraint on guided tour card, which caused overflows when translated info is lenghty. - Pass width of guided tour card through JS, instead of LESS !important rules. - Limit the width of cancel and confirm buttons, which makes buttons stay in one line. Bug: T168413 Change-Id: Iee66e9dfdeae18df32a8cb6f9572e5fb103db86e --- M modules/rcfilters-beta-tour.js M modules/rcfilters-beta-tour.less M modules/rcfilters-highlight-tour.js M modules/rcfilters-highlight-tour.less M modules/rcfilters-invite-tour.js M modules/rcfilters-invite-tour.less 6 files changed, 21 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages refs/changes/30/387630/1 diff --git a/modules/rcfilters-beta-tour.js b/modules/rcfilters-beta-tour.js index e01ea6b..01b29f8 100644 --- a/modules/rcfilters-beta-tour.js +++ b/modules/rcfilters-beta-tour.js @@ -1,9 +1,9 @@ ( function ( mw, gt ) { var tour = new gt.TourBuilder( { - name: 'RcFiltersBeta', - shouldLog: true, - isSinglePage: true - } ); + name: 'RcFiltersBeta', + shouldLog: true, + isSinglePage: true + } ); tour.firstStep( { name: 'Welcome', @@ -13,6 +13,7 @@ 'eri-rcfilters-tour-welcome-no-ores-description', autoFocus: true, allowAutomaticOkay: false, + width: 600, buttons: [ { namemsg: 'eri-rcfilters-tour-welcome-button', diff --git a/modules/rcfilters-beta-tour.less b/modules/rcfilters-beta-tour.less index 0c0ce60..5b8d5d8 100644 --- a/modules/rcfilters-beta-tour.less +++ b/modules/rcfilters-beta-tour.less @@ -1,6 +1,5 @@ .mw-guidedtour-tour-RcFiltersBeta { padding: 40px; - width: 600px !important; .guider_content { background: url( images/rc-beta-tour-welcome-ltr.gif ) no-repeat; // Ensure the background image appears on the left in LTR and on the right in RTL diff --git a/modules/rcfilters-highlight-tour.js b/modules/rcfilters-highlight-tour.js index c423f97..448c314 100644 --- a/modules/rcfilters-highlight-tour.js +++ b/modules/rcfilters-highlight-tour.js @@ -3,10 +3,10 @@ */ ( function ( mw, gt ) { var tour = new gt.TourBuilder( { - name: 'RcFiltersHighlight', - shouldLog: true, - isSinglePage: true - } ); + name: 'RcFiltersHighlight', + shouldLog: true, + isSinglePage: true + } ); tour.firstStep( { name: 'Highlight', @@ -15,6 +15,7 @@ autoFocus: true, allowAutomaticOkay: false, attachTo: '.mw-rcfilters-ui-filtersListWidget-hightlightButton', + width: 250, position: 'right', buttons: [ { diff --git a/modules/rcfilters-highlight-tour.less b/modules/rcfilters-highlight-tour.less index 827772d..e3f1833 100644 --- a/modules/rcfilters-highlight-tour.less +++ b/modules/rcfilters-highlight-tour.less @@ -1,6 +1,5 @@ .mw-guidedtour-tour-RcFiltersHighlight { padding: 40px; - width: 250px !important; .guider_content { background: url( images/highlight-tour-ltr.svg ) no-repeat; background-position-x: 50%; diff --git a/modules/rcfilters-invite-tour.js b/modules/rcfilters-invite-tour.js index aa8f5ed..d65c1dc 100644 --- a/modules/rcfilters-invite-tour.js +++ b/modules/rcfilters-invite-tour.js @@ -11,7 +11,7 @@ url = 'https://www.mediawiki.org/wiki/Special:MyLanguage/Edit_Review_Improvements/New_filters_for_edit_review', linkLabel = mw.message( 'eri-rcfilters-tour-invite-learnmore-link-label' ).text(), inviteDesc = new gt.WikitextDescription( - descText + '' + '[' + url + ' ' + linkLabel + ']' + descText + '[' + url + ' ' + linkLabel + ']' ), $attachTo = $( '#pt-betafeatures > a' ); @@ -26,6 +26,7 @@ autoFocus: true, allowAutomaticOkay: false, attachTo: $attachTo, + width: 290, position: 'bottom', onShow: function () { var api = new mw.Api(); diff --git a/modules/rcfilters-invite-tour.less b/modules/rcfilters-invite-tour.less index 89d1b92..1a15245 100644 --- a/modules/rcfilters-invite-tour.less +++ b/modules/rcfilters-invite-tour.less
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: More specific warning when RC page fails to load
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/387594 ) Change subject: More specific warning when RC page fails to load .. More specific warning when RC page fails to load - Provide more specific message when the page fails to load (when the connection drops for any reason), replacing the current message, which says misleadingly that no results could be found. - Center warning messages horizontally. Bug: T177413 Change-Id: Ie2bc4fe4bd19103b513e4753e59f4adb295fbafa --- M languages/i18n/en.json M languages/i18n/qqq.json M resources/Resources.php M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ChangesListViewModel.js M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js 7 files changed, 32 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/387594/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index de493ef..43d9a7c 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1340,6 +1340,7 @@ "recentchangestext": "-", "recentchanges-noresult": "No changes during the given period match these criteria.", "recentchanges-timeout": "This search has timed out. You may wish to try different search parameters.", + "recentchanges-network": "Due to a technical error, no results could be loaded. Please try refreshing the page.", "recentchanges-feed-description": "Track the most recent changes to the wiki in this feed.", "recentchanges-label-newpage": "This edit created a new page", "recentchanges-label-minor": "This is a minor edit", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 5f72b75..cf81671 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1534,6 +1534,7 @@ "recentchangestext": "Text in [[Special:RecentChanges]]", "recentchanges-noresult": "Used in [[Special:RecentChanges]], [[Special:RecentChangesLinked]], and [[Special:Watchlist]] when there are no changes to be shown.", "recentchanges-timeout": "Used in [[Special:RecentChanges]], [[Special:RecentChangesLinked]], and [[Special:Watchlist]] when a query times out.", + "recentchanges-network": "Used in [[Special:RecentChanges]], [[Special:RecentChangesLinked]] and [[Special:Watchlist]] when network error occurs.", "recentchanges-feed-description": "Used in feed of RecentChanges. See example [{{canonicalurl:Special:RecentChanges|feed=atom}} feed].", "recentchanges-label-newpage": "# Used as tooltip for {{msg-mw|Newpageletter}}.\n# Also used as legend. Preceded by {{msg-mw|Newpageletter}} and followed by {{msg-mw|Recentchanges-legend-newpage}}.", "recentchanges-label-minor": "# Used as tooltip for {{msg-mw|Minoreditletter}}\n# Also used as legend. Preceded by {{msg-mw|Minoreditletter}}", diff --git a/resources/Resources.php b/resources/Resources.php index 1a2d707..4f44424 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1913,6 +1913,7 @@ 'invert', 'recentchanges-noresult', 'recentchanges-timeout', + 'recentchanges-network', 'quotation-marks', ], 'dependencies' => [ diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ChangesListViewModel.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ChangesListViewModel.js index 3c03c70..2aa31a6 100644 --- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ChangesListViewModel.js +++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ChangesListViewModel.js @@ -73,18 +73,18 @@ * * @param {jQuery|string} changesListContent * @param {jQuery} $fieldset -* @param {boolean} isDatabaseTimeout Whether this is an error state due to a database query +* @param {string} noResultsDetails Type of no result error * timeout. * @param {boolean} [isInitialDOM] Using the initial (already attached) DOM elements * @param {boolean} [separateOldAndNew] Whether a logical separation between old and new changes is needed * @fires update */ - mw.rcfilters.dm.ChangesListViewModel.prototype.update = function ( changesListContent, $fieldset, isDatabaseTimeout, isInitialDOM, separateOldAndNew ) { + mw.rcfilters.dm.ChangesListViewModel.prototype.update = function ( changesListContent, $fieldset, noResultsDetails, isInitialDOM, separateOldAndNew ) { var from = this.nextFrom; this.valid = true; this.extractNextFrom( $fieldset );
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Show noscroll margin only on bigger screens
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/386953 ) Change subject: Show noscroll margin only on bigger screens .. Show noscroll margin only on bigger screens * Don't add margin to the right for screen sizes below 700px when noscroll is activated on body tag. Additional margin is added to fill the space left by scrollbar disappearing, but narrow screens would arguably only be used on mobile, where scrollbar doesn't take space. Change-Id: I7830af6124a0a829aaf3e466568623a68f8fcda9 --- M modules/widgets/overlay/ext.cx.overlay.less 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/53/386953/1 diff --git a/modules/widgets/overlay/ext.cx.overlay.less b/modules/widgets/overlay/ext.cx.overlay.less index ed3be14..34317d0 100644 --- a/modules/widgets/overlay/ext.cx.overlay.less +++ b/modules/widgets/overlay/ext.cx.overlay.less @@ -1,3 +1,5 @@ +@import '../../widgets/common/ext.cx.common.less'; + .cx-overlay { background-color: #fff; position: fixed; @@ -15,6 +17,8 @@ body.cx-noscroll { overflow: hidden; - // Avoid content jump when we hide the scrollbar. - margin-right: 15px; + // Avoid content jump when we hide the scrollbar on medium and large screens + @media only screen and ( min-width: @narrow ) { + margin-right: 15px; + } } -- To view, visit https://gerrit.wikimedia.org/r/386953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7830af6124a0a829aaf3e466568623a68f8fcda9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Adjust dashboard padding to screen size
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/386673 ) Change subject: Adjust dashboard padding to screen size .. Adjust dashboard padding to screen size - Change dashboard padding from static 50px to responsive: * Use 12px for very small sizes (for screen width below 500px). * Use 24px on small sizes (for screen width between 500px and 700px). * Use 40px by default ( for screen width above 700px ). - Fix sticky navigation header size and positioning for screen sizes between 1500px and 1580px. Bug: T178669 Change-Id: Id8436fc4649e0f14b70574909d143bba5ce7bf22 --- M modules/dashboard/styles/ext.cx.dashboard.less M modules/widgets/common/ext.cx.common.less 2 files changed, 29 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/73/386673/1 diff --git a/modules/dashboard/styles/ext.cx.dashboard.less b/modules/dashboard/styles/ext.cx.dashboard.less index dbb4875..5d0a7e9 100644 --- a/modules/dashboard/styles/ext.cx.dashboard.less +++ b/modules/dashboard/styles/ext.cx.dashboard.less @@ -3,7 +3,9 @@ // Height used for matching sticky header height with sticky sidebar offset from top @sticky-header-height: 59px; -@dashboard-horizontal-padding: 50px; +@very-narrow-dashboard-horizontal-padding: 12px; // up to 500px +@narrow-dashboard-horizontal-padding: 24px; // 500px - 700px +@dashboard-horizontal-padding: 40px; // 700+px // When sidebar becomes sticky, it uses position: fixed // Since sidebar width is percentual, it gets percentage of viewport width, rather than parent width // Before sidebar becomes sticky it calculates percentual width using width of parent - cx-dashboard @@ -16,7 +18,7 @@ // Container for list of items in dashboard has padding equal to following variable value. // Following variable is also used to align sticky header with container @translationlist-container-padding-right: 10px; -@maximum-dashboard-width: 1500px; +@maximum-dashboard-width: 1500px + 2 * @dashboard-horizontal-padding; body { background: @colorGray14; @@ -24,9 +26,18 @@ .cx-dashboard { color: @gray-darker; + box-sizing: border-box; max-width: @maximum-dashboard-width; margin: 0 auto; - padding: 20px @dashboard-horizontal-padding; + padding: 20px @very-narrow-dashboard-horizontal-padding; + + @media only screen and ( min-width: @very-narrow ) { + padding: 20px @narrow-dashboard-horizontal-padding; + } + + @media only screen and ( min-width: @narrow ) { + padding: 20px @dashboard-horizontal-padding; + } } .cx-dashboard-sidebar { @@ -58,8 +69,7 @@ @media only screen and ( min-width: @maximum-dashboard-width ) { right: auto; left: 50%; - margin-left: @maximum-dashboard-width / 6; - padding-right: 0; + margin-left: ( @maximum-dashboard-width - 2 * @dashboard-horizontal-padding ) / 6; } } @@ -181,19 +191,27 @@ // has a z-index of 1000. So a number in between is chosen. z-index: 200; width: 100%; - padding: 10px @dashboard-horizontal-padding; + padding: 10px @very-narrow-dashboard-horizontal-padding; + + @media only screen and ( min-width: @very-narrow ) { + padding: 10px @narrow-dashboard-horizontal-padding; + } + + @media only screen and ( min-width: @narrow ) { + padding: 10px @dashboard-horizontal-padding; + } @media only screen and ( min-width: @wide ) { width: 66.66%; - padding: 10px 0; // Defines top and bottom padding. Left and right padding are defined separately for clarity padding-right: @sticky-sidebar-right-position + @translationlist-container-padding-right; - padding-left: @dashboard-horizontal-padding; } @media only screen and ( min-width: @maximum-dashboard-width ) { left: 50%; - max-width: 2 * @maximum-dashboard-width / 3 + @translationlist-container-padding-right; - margin-left: -@maximum-dashboard-width / 2 - @translationlist-container-padding-right; + max-width: 2 * ( @maximum-dashboard-width - 2 * @dashboard-horizontal-padding ) / 3 + + @translationlist-container-padding-right; + margin-left: -@maximum-dashboard-width / 2 + @dashboard-horizontal-padding - + @translationlist-container-padding-right; padding: 0 @translationlist-container-padding-right; } } diff --git a/modules/widgets/common/ext.cx.common.less b/modules/widgets/common/ext.cx.common.less index 53d355f..abe2170 100644 ---
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix missing months on CX dashboard chart data
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385353 ) Change subject: Fix missing months on CX dashboard chart data .. Fix missing months on CX dashboard chart data - Add missing months to data returned for translation stats. - Change deprecated frontend logic. Bug: T176513 Change-Id: I9207663bb0735ce308ad26b1bc428a1d7340f70e --- M api/ApiQueryTranslatorStats.php M modules/widgets/translator/ext.cx.translator.js 2 files changed, 40 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/53/385353/1 diff --git a/api/ApiQueryTranslatorStats.php b/api/ApiQueryTranslatorStats.php index 246da33..6d26298 100644 --- a/api/ApiQueryTranslatorStats.php +++ b/api/ApiQueryTranslatorStats.php @@ -9,6 +9,7 @@ use ContentTranslation\Translation; use ContentTranslation\Translator; +use ContentTranslation\DateManipulator; /** * @ingroup API ContentTranslationAPI @@ -39,16 +40,8 @@ null, null, 'published', 'month', $translatorId ); - $trend = []; - foreach ( $publishedStats as $key => $value ) { - $datetime = new DateTime( "@$key" ); - $trend[ $datetime->format( 'Y-m-d' ) ] = $value; - } + $trend = $this->addMissingMonths( $publishedStats ); - // TODO: The $publishedStats does not contain data for all months, - // if there is not translation in that month. ApiQueryContentTranslationLanguageTrend - // has utility methods to fill it. But it is not important for the graph we render - // from the output of this data. $result = [ 'translator' => $user->getName(), 'translatorId' => $translatorId, @@ -57,6 +50,36 @@ $this->getResult()->addValue( null, $this->getModuleName(), $result ); } + private function addMissingMonths( $data ) { + $dates = array_keys( $data ); + + $dm = new DateManipulator( 'month' ); + $min = $dm->getIntervalIdentifier( min( $dates ) ); + $max = $dm->getIntervalIdentifier( 0 ); // Now + + $steps = $dm->getSteps( $min, $max, 'month' ); + + $out = []; + $count = 0; + + foreach ( $steps as $datetime ) { + $id = $datetime->format( 'U' ); + $date = $datetime->format( 'Y-m-d' ); + + if ( isset( $data[ $id ] ) ) { + $out[ $date ] = $data[ $id ]; + $count = $data[ $id ][ 'count' ]; + } else { + $out[ $date ] = [ + 'count' => $count, + 'delta' => 0 + ]; + } + } + + return $out; + } + public function getAllowedParams() { $allowedParams = [ 'translator' => [ diff --git a/modules/widgets/translator/ext.cx.translator.js b/modules/widgets/translator/ext.cx.translator.js index 6f58b95..67902a6 100644 --- a/modules/widgets/translator/ext.cx.translator.js +++ b/modules/widgets/translator/ext.cx.translator.js @@ -65,28 +65,24 @@ .addClass( 'cx-translator' ) .append( $header, $monthStats, $total, this.$canvas ); statsRequest.then( function ( stats ) { - var total, monthCount, + var total, thisMonthStats, publishTrend = stats.cxtranslatorstats.publishTrend, // Sorted months for ordered display on bar chart monthKeys = Object.keys( publishTrend ).sort(), - thisMonthKey = new Date().toISOString().slice( 0, 7 ) + '-01', - lastMonthKey = Object.keys( publishTrend ).slice( -1 ).pop(); + thisMonthKey = new Date().toISOString().slice( 0, 7 ) + '-01'; - // lastMonthKey is for the month with non-zero contributions. It may be equal to - // thisMonthKey, but not guaranteed. - if ( !lastMonthKey ) { - // There is no month with non-zero contributions. + total = publishTrend[ thisMonthKey ].count || 0; + thisMonthStats = publishTrend[ thisMonthKey ].delta || 0; + + // Don't display statistics if there are no translations yet + if ( total === 0 ) {
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix changes list misaligned arrow
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385252 ) Change subject: Fix changes list misaligned arrow .. Fix changes list misaligned arrow - Revert td alignment from middle to top. - Add top padding to fix misalignment. Bug: T178595 Change-Id: I1211b7afe1c29b0a33c051c07921eed7eb9704e3 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less M resources/src/mediawiki.special/mediawiki.special.changeslist.enhanced.css 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/385252/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less index 8f3bacf..0fa3137 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less @@ -59,10 +59,8 @@ // Correction for Enhanced RC // This is outside the scope of the 'highlights' wrapper - table.mw-enhanced-rc td { - vertical-align: middle; - - &:last-child { + table.mw-enhanced-rc { + td:last-child { width: 100%; } } diff --git a/resources/src/mediawiki.special/mediawiki.special.changeslist.enhanced.css b/resources/src/mediawiki.special/mediawiki.special.changeslist.enhanced.css index d6b06e6..cb11332 100644 --- a/resources/src/mediawiki.special/mediawiki.special.changeslist.enhanced.css +++ b/resources/src/mediawiki.special/mediawiki.special.changeslist.enhanced.css @@ -48,6 +48,10 @@ display: none; } +.mw-enhancedchanges-arrow { + padding-top: 2px; +} + .mw-enhancedchanges-arrow-space { display: inline-block; *display: inline; /* IE7 and below */ -- To view, visit https://gerrit.wikimedia.org/r/385252 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1211b7afe1c29b0a33c051c07921eed7eb9704e3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix same source and target language
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385179 ) Change subject: Fix same source and target language .. Fix same source and target language Bug: T178126 Change-Id: I9e9628e735f756d096fff577e4a55c29919acfd0 --- M modules/source/ext.cx.source.selector.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/79/385179/1 diff --git a/modules/source/ext.cx.source.selector.js b/modules/source/ext.cx.source.selector.js index 8c7ef4f..454f579 100644 --- a/modules/source/ext.cx.source.selector.js +++ b/modules/source/ext.cx.source.selector.js @@ -912,7 +912,7 @@ targetLanguage = storedTargetLanguage || mw.config.get( 'wgContentLanguage' ); sourceLanguage = storedSourceLanguage; - if ( !this.isValidSource( sourceLanguage ) ) { + if ( !this.isValidSource( sourceLanguage ) || sourceLanguage === targetLanguage ) { commonSourceLanguages = this.$sourceLanguage.data( 'uls' ).options.quickList(); for ( i = 0; i < commonSourceLanguages.length; i++ ) { @@ -927,7 +927,7 @@ } // Still couldn't find a valid source language? - if ( !this.isValidSource( sourceLanguage ) ) { + if ( !this.isValidSource( sourceLanguage ) || sourceLanguage === targetLanguage ) { sourceLanguage = mw.config.get( 'wgContentTranslationDefaultSourceLanguage' ); } -- To view, visit https://gerrit.wikimedia.org/r/385179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e9628e735f756d096fff577e4a55c29919acfd0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Show a loading indicator for suggestions
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385145 ) Change subject: Show a loading indicator for suggestions .. Show a loading indicator for suggestions * Show the three pulsing circles spinner indicator below the suggestion list header, as part of a new element, using Base90 (#F8F9FA) as background. Bug: T178145 Change-Id: Iae9c69f75d4c1b6663125c3ed0758084c7c3494e --- M extension.json M modules/dashboard/ext.cx.suggestionlist.js M modules/dashboard/styles/ext.cx.suggestionlist.less 3 files changed, 34 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/45/385145/1 diff --git a/extension.json b/extension.json index 17ffe5c..96750db 100644 --- a/extension.json +++ b/extension.json @@ -937,6 +937,7 @@ "dependencies": [ "ext.cx.recommendtool.client", "ext.cx.util", + "ext.cx.widgets.spinner", "jquery.uls.data", "mediawiki.storage" ], diff --git a/modules/dashboard/ext.cx.suggestionlist.js b/modules/dashboard/ext.cx.suggestionlist.js index 04e539c..164729b 100644 --- a/modules/dashboard/ext.cx.suggestionlist.js +++ b/modules/dashboard/ext.cx.suggestionlist.js @@ -74,6 +74,8 @@ this.$publicCollectionContainer = null; this.$refreshTrigger = null; this.$headerContainer = null; + this.$loadingIndicatorSpinner = null; + this.pendingRequests = 0; this.seed = null; this.init(); this.listen(); @@ -88,12 +90,15 @@ .text( mw.msg( 'cx-suggestionlist-title' ) ) .addClass( 'cx-suggestionlist__public-title' ), this.languageFilter.$element ); + this.$loadingIndicatorSpinner = $( '' ) + .addClass( 'cx-suggestionlist__loading-indicator' ) + .append( mw.cx.widgets.spinner() ); this.$publicCollectionContainer = $( '' ) .addClass( 'cx-suggestionlist__public' ) - .append( this.$headerContainer ); + .append( this.$headerContainer, this.$loadingIndicatorSpinner ); this.$publicCollection = $( '' ) .addClass( 'cx-suggestionlist__public-items' ); - this.$publicCollectionContainer.append( this.$publicCollection ).hide(); + this.$publicCollectionContainer.append( this.$publicCollection ); this.$suggestionsContainer = $( '' ) .addClass( 'cx-suggestionlist-container' ) .append( this.$personalCollection, this.$publicCollectionContainer ); @@ -129,6 +134,9 @@ var lists, promise, isEmpty = true, self = this; + + this.$loadingIndicatorSpinner.show(); + this.pendingRequests++; if ( !list ) { // Initial load, load available lists and couple of suggestions for them @@ -172,6 +180,10 @@ self.insertSuggestionList( listId, list.suggestions ); } + if ( !--self.pendingRequests ) { + self.$loadingIndicatorSpinner.hide(); + } + return isEmpty; } ); @@ -194,8 +206,11 @@ self.showEmptySuggestionList(); } }, function () { - // On Fail, show empty list + // On fail, show empty list and hide spinner self.showEmptySuggestionList(); + if ( !( self.pendingRequests -= 2 ) ) { + self.$loadingIndicatorSpinner.hide(); + } } ); }; diff --git a/modules/dashboard/styles/ext.cx.suggestionlist.less b/modules/dashboard/styles/ext.cx.suggestionlist.less index 7fb6ec8..66f1082 100644 --- a/modules/dashboard/styles/ext.cx.suggestionlist.less +++ b/modules/dashboard/styles/ext.cx.suggestionlist.less @@ -31,6 +31,21 @@ } } +.cx-suggestionlist__loading-indicator { + @dot-size: 16px; + @verticalPadding: 15px; + + background-color: @colorGray15; + height: @dot-size + @verticalPadding; + padding-top: @verticalPadding; + + .cx-spinner { + width: 3 * @dot-size; + height: @dot-size; + margin: 0 auto; + } +} + // stylelint-disable indentation // At any time display only
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace deprecated edit review params
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384702 ) Change subject: Replace deprecated edit review params .. Replace deprecated edit review params - Replace old options 'hideanons' or 'hideliu' with structured UI equivalent. Bug: T176172 Change-Id: I6ad050f7864bf51db05c3db957ac3533358cd3ac --- M includes/specialpage/ChangesListSpecialPage.php 1 file changed, 32 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/02/384702/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 20fd06a..ba37651 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -1185,7 +1185,10 @@ * @param FormOptions $opts */ public function validateOptions( FormOptions $opts ) { - if ( $this->fixContradictoryOptions( $opts ) ) { + $isContradictory = $this->fixContradictoryOptions( $opts ); + $isReplaced = $this->replaceOldOptions( $opts ); + + if ( $isContradictory || $isReplaced ) { $query = wfArrayToCgi( $this->convertParamsForLink( $opts->getChangedValues() ) ); $this->getOutput()->redirect( $this->getPageTitle()->getCanonicalURL( $query ) ); } @@ -1257,6 +1260,34 @@ } /** +* Replace old options 'hideanons' or 'hideliu' with structured UI equivalent +* +* @param FormOptions $opts +* @return bool True if the change was made +*/ + public function replaceOldOptions( FormOptions $opts ) { + if ( !$this->isStructuredFilterUiEnabled() ) { + return false; + } + + // At this point 'hideanons' and 'hideliu' cannot be both true, + // because fixBackwardsCompatibilityOptions resets (at least) 'hideanons' in such case + if ( $opts[ 'hideanons' ] ) { + $opts->reset( 'hideanons' ); + $opts[ 'userExpLevel' ] = 'registered'; + return true; + } + + if ( $opts[ 'hideliu' ] ) { + $opts->reset( 'hideliu' ); + $opts[ 'userExpLevel' ] = 'unregistered'; + return true; + } + + return false; + } + + /** * Convert parameters values from true/false to 1/0 * so they are not omitted by wfArrayToCgi() * Bug 36524 -- To view, visit https://gerrit.wikimedia.org/r/384702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ad050f7864bf51db05c3db957ac3533358cd3ac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix changes list misaligned arrow
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384535 ) Change subject: Fix changes list misaligned arrow .. Fix changes list misaligned arrow Bug: T176368 Change-Id: Ie2e938a1b869a58368bc1a5eeec054c90a90724f --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/35/384535/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less index 0fa3137..e0c7e3d 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less @@ -59,8 +59,10 @@ // Correction for Enhanced RC // This is outside the scope of the 'highlights' wrapper - table.mw-enhanced-rc { - td:last-child { + table.mw-enhanced-rc td { + vertical-align: middle; + + &:last-child{ width: 100%; } } -- To view, visit https://gerrit.wikimedia.org/r/384535 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2e938a1b869a58368bc1a5eeec054c90a90724f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix tabindex applied twice on RC top section
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384518 ) Change subject: Fix tabindex applied twice on RC top section .. Fix tabindex applied twice on RC top section - Remove tabindex = 0 applied to ButtonElement and leave only tabindex on ButtonElement-button, so keyboard focus does not catch one time too much. Bug: T175893 Change-Id: I5bf759dd2cdcb1a719f1ca7844253025813f8e9a --- M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/18/384518/1 diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js index ca76046..2c99d3d 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js @@ -48,7 +48,8 @@ widget.switchTopLinks( 'collapsed' ); } ); - this.$topLinks.find( '.mw-recentchanges-toplinks-title' ).replaceWith( toplinksTitle.$element ); + this.$topLinks.find( '.mw-recentchanges-toplinks-title' ) + .replaceWith( toplinksTitle.$element.removeAttr( 'tabIndex' ) ); // Create two positions for the toplinks to toggle between // in the table (first cell) or up above it -- To view, visit https://gerrit.wikimedia.org/r/384518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bf759dd2cdcb1a719f1ca7844253025813f8e9a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove strong tag from "Other review tools"
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384498 ) Change subject: Remove strong tag from "Other review tools" .. Remove strong tag from "Other review tools" Bug: T175031 Change-Id: I0e9b75496d87c7312d0bb597650ed914a9dccf90 --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/384498/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 9826a56..0006516 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1354,7 +1354,7 @@ "recentchanges-submit": "Show", "rcfilters-tag-remove": "Remove '$1'", "rcfilters-legend-heading": "List of abbreviations:", - "rcfilters-other-review-tools": "Other review tools", + "rcfilters-other-review-tools": "Other review tools", "rcfilters-group-results-by-page": "Group results by page", "rcfilters-grouping-title": "Grouping", "rcfilters-activefilters": "Active filters", -- To view, visit https://gerrit.wikimedia.org/r/384498 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e9b75496d87c7312d0bb597650ed914a9dccf90 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Improve wording in Saved Filter Menu
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384494 ) Change subject: Improve wording in Saved Filter Menu .. Improve wording in Saved Filter Menu - Change user message in saved filter menu from "No links saved yet" to more clear "No filters saved yet". Bug: T177540 Change-Id: I39846159183f51fa40efb62f9c8f2fbc79a9c282 --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/384494/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 9826a56..a55523d 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1367,7 +1367,7 @@ "rcfilters-days-show-hours": "$1 {{PLURAL:$1|hour|hours}}", "rcfilters-highlighted-filters-list": "Highlighted: $1", "rcfilters-quickfilters": "Saved filters", - "rcfilters-quickfilters-placeholder-title": "No links saved yet", + "rcfilters-quickfilters-placeholder-title": "No filters saved yet", "rcfilters-quickfilters-placeholder-description": "To save your filter settings and reuse them later, click the bookmark icon in the Active Filter area, below.", "rcfilters-savedqueries-defaultlabel": "Saved filters", "rcfilters-savedqueries-rename": "Rename", -- To view, visit https://gerrit.wikimedia.org/r/384494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39846159183f51fa40efb62f9c8f2fbc79a9c282 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Change New translation input placeholder
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384182 ) Change subject: Change New translation input placeholder .. Change New translation input placeholder - Change placeholder message from "Search for source page" to "Search for a page to translate", because New translation dialog does not provide option to set target page title, therefore making source page concept not very intuitive. Bug: T111094 Change-Id: Ieb28e58e451f0394b0100b94c6eda76a145c9bcc --- M extension.json M i18n/en.json M i18n/qqq.json M modules/source/ext.cx.source.selector.js 4 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/82/384182/1 diff --git a/extension.json b/extension.json index 1da09f5..402b8fb 100644 --- a/extension.json +++ b/extension.json @@ -362,6 +362,7 @@ "cx-sourceselector-dialog-button-cancel", "cx-sourceselector-dialog-source-language-label", "cx-sourceselector-dialog-target-language-label", + "cx-sourceselector-embedded-source-page-placeholder", "cx-sourceselector-dialog-source-title-placeholder", "cx-sourceselector-dialog-target-title-placeholder", "cx-sourceselector-dialog-error-page-and-title-exist", diff --git a/i18n/en.json b/i18n/en.json index 41d3cab..e9b2458 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -91,6 +91,7 @@ "cx-sourceselector-dialog-button-cancel": "Cancel", "cx-sourceselector-dialog-source-language-label": "From:", "cx-sourceselector-dialog-target-language-label": "To:", + "cx-sourceselector-embedded-source-page-placeholder": "Search for a page to translate", "cx-sourceselector-dialog-source-title-placeholder": "Search for source page", "cx-sourceselector-dialog-target-title-placeholder": "Translation title", "cx-sourceselector-dialog-error-page-and-title-exist": "This title is already used in [$1 $2] for [$3 a different page]", diff --git a/i18n/qqq.json b/i18n/qqq.json index 550145d..9e84750 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -100,6 +100,7 @@ "cx-sourceselector-dialog-button-cancel": "Button label for translation selector. Clicking on it cancels new translation and hides dialog. Only appears when translation selector is presented as a dialog.\n{{Identical|Cancel}}", "cx-sourceselector-dialog-source-language-label": "Label text for source language and title selector.\n{{Identical|From}}", "cx-sourceselector-dialog-target-language-label": "Label text for target language and title selector.\n{{Identical|To}}", + "cx-sourceselector-embedded-source-page-placeholder": "Placeholder for the source page input field. Used on Content Translation page for new translation dialog and provides prompt to search for source page to start translation.", "cx-sourceselector-dialog-source-title-placeholder": "Placeholder for the source title input. Provides prompt to search for source title.", "cx-sourceselector-dialog-target-title-placeholder": "Placeholder for the target title input. Provides prompt to enter translation title (optional).", "cx-sourceselector-dialog-error-page-and-title-exist": "An error message that indicates that there is page in the target wiki with the same title as the proposed source title and the target title is used elsewhere.\n\nParameters:\n* $1 - link to existing target page.\n* $2 - target language name.\n* $3 - link to article using proposed target title.", diff --git a/modules/source/ext.cx.source.selector.js b/modules/source/ext.cx.source.selector.js index 7018a0c..7bd4eb1 100644 --- a/modules/source/ext.cx.source.selector.js +++ b/modules/source/ext.cx.source.selector.js @@ -1362,7 +1362,7 @@ siteMapper: this.siteMapper, value: this.options.sourceTitle, validateTitle: true, - placeholder: mw.msg( 'cx-sourceselector-dialog-source-title-placeholder' ), + placeholder: mw.msg( 'cx-sourceselector-embedded-source-page-placeholder' ), showRedirectTargets: true, $overlay: this.$searchResults, $container: this.$searchResults -- To view, visit https://gerrit.wikimedia.org/r/384182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb28e58e451f0394b0100b94c6eda76a145c9bcc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use OOjs UI widget for discard button
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384177 ) Change subject: Use OOjs UI widget for discard button .. Use OOjs UI widget for discard button Change-Id: Iab6ffbfcb55b035ca7e1e863ca9d869321bd57dc --- M modules/source/ext.cx.source.selector.js M modules/source/styles/ext.cx.source.selector.less 2 files changed, 6 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/77/384177/1 diff --git a/modules/source/ext.cx.source.selector.js b/modules/source/ext.cx.source.selector.js index 7018a0c..c7f946e 100644 --- a/modules/source/ext.cx.source.selector.js +++ b/modules/source/ext.cx.source.selector.js @@ -1368,8 +1368,11 @@ $container: this.$searchResults } ); - this.$discardButton = $( '' ) - .addClass( 'cx-sourceselector-embedded-discard' ); + this.$discardButton = new OO.ui.ButtonWidget( { + framed: false, + icon: 'close', + classes: [ 'cx-sourceselector-embedded-discard' ] + } ).$element; this.$sourceInputs = $( '' ) .addClass( 'cx-sourceselector-embedded__source-inputs' ) diff --git a/modules/source/styles/ext.cx.source.selector.less b/modules/source/styles/ext.cx.source.selector.less index 586927d..1fe4520 100644 --- a/modules/source/styles/ext.cx.source.selector.less +++ b/modules/source/styles/ext.cx.source.selector.less @@ -209,21 +209,7 @@ } .cx-sourceselector-embedded-discard { - .background-image-svg('../../tools/images/clear.svg', '../../tools/images/clear.png'); - background-position: center center; - background-repeat: no-repeat; - background-size: 16px; - opacity: 0.8; - - float: right; - width: 24px; - height: 24px; - margin: 0 8px 0 16px; - cursor: pointer; - - &:hover { - opacity: 1; - } + margin-left: 8px; } .cx-sourceselector__license, -- To view, visit https://gerrit.wikimedia.org/r/384177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab6ffbfcb55b035ca7e1e863ca9d869321bd57dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use upstream icon for refresh on CX dashboard
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384112 ) Change subject: Use upstream icon for refresh on CX dashboard .. Use upstream icon for refresh on CX dashboard Change-Id: I0aad1d7b719deb6c15bf24d65d2f4f8c9bbb25af --- M extension.json M modules/dashboard/ext.cx.suggestionlist.js D modules/dashboard/images/refresh.png D modules/dashboard/images/refresh.svg M modules/dashboard/styles/ext.cx.suggestionlist.less 5 files changed, 39 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/12/384112/1 diff --git a/extension.json b/extension.json index 1da09f5..eab4bc5 100644 --- a/extension.json +++ b/extension.json @@ -941,7 +941,9 @@ "ext.cx.recommendtool.client", "ext.cx.util", "jquery.uls.data", - "mediawiki.storage" + "mediawiki.storage", + "oojs-ui-widgets", + "oojs-ui.styles.icons-interactions" ], "messages": [ "ellipsis", diff --git a/modules/dashboard/ext.cx.suggestionlist.js b/modules/dashboard/ext.cx.suggestionlist.js index 04e539c..5e99161 100644 --- a/modules/dashboard/ext.cx.suggestionlist.js +++ b/modules/dashboard/ext.cx.suggestionlist.js @@ -914,11 +914,15 @@ this.$refreshTrigger.show(); return; } - - this.$refreshTrigger = $( '' ) - .addClass( 'cx-suggestionlist__refresh' ) - .text( mw.msg( 'cx-suggestionlist-refresh' ) ) - .on( 'click', this.refreshPublicLists.bind( this ) ); + this.$refreshTrigger = new OO.ui.ButtonWidget( { + framed: false, + classes: [ 'cx-suggestionlist__refresh' ], + flags: [ + 'progressive' + ], + icon: 'reload', + label: mw.msg( 'cx-suggestionlist-refresh' ) + } ).on( 'click', this.refreshPublicLists.bind( this ) ).$element; this.$publicCollectionContainer.append( this.$refreshTrigger ); }; diff --git a/modules/dashboard/images/refresh.png b/modules/dashboard/images/refresh.png deleted file mode 100644 index 96ee533..000 --- a/modules/dashboard/images/refresh.png +++ /dev/null Binary files differ diff --git a/modules/dashboard/images/refresh.svg b/modules/dashboard/images/refresh.svg deleted file mode 100644 index 8177d78..000 --- a/modules/dashboard/images/refresh.svg +++ /dev/null @@ -1 +0,0 @@ -http://www.w3.org/2000/svg; width="20" height="20" viewBox="0 0 20 20">refresh \ No newline at end of file diff --git a/modules/dashboard/styles/ext.cx.suggestionlist.less b/modules/dashboard/styles/ext.cx.suggestionlist.less index 7fb6ec8..e892bfc 100644 --- a/modules/dashboard/styles/ext.cx.suggestionlist.less +++ b/modules/dashboard/styles/ext.cx.suggestionlist.less @@ -58,8 +58,7 @@ } .cx-suggestionlist__collapse, -.cx-suggestionlist__expand, -.cx-suggestionlist__refresh { +.cx-suggestionlist__expand { .mw-ui-one-whole; background-color: #fff; border: 1px solid @colorGray12; @@ -74,27 +73,38 @@ } .cx-suggestionlist__refresh { - color: @colorProgressive; + background-color: #fff; + width: 100%; margin-top: -10px; + border: 1px solid @colorGray12; border-width: 1px 0; border-radius: 0 0 @borderRadius @borderRadius; - padding: 20px; .box-shadow-card; - font-weight: bold; + text-align: center; - &:before { - @iconSize: 16px; + &:hover { + background-color: #eff3fb; + } - content: ''; - .background-image-svg('../images/refresh.svg', '../images/refresh.png'); - background-repeat: no-repeat; - background-size: @iconSize; - display: inline-block; - position: relative; - top: 2px; - width: @iconSize; - height: @iconSize; - margin-right: 8px; + > .oo-ui-buttonElement-button { + width: 100%; + border: 0; + + .oo-ui-iconElement-icon, + .oo-ui-labelElement-label { + display: inline-block; + position: static; + vertical-align: middle; + } + + .oo-ui-iconElement-icon { + min-height: 20px; + } + } + + // Needed to beat specificity for padding +
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Make translated titles less prominent in dashboard
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384075 ) Change subject: Make translated titles less prominent in dashboard .. Make translated titles less prominent in dashboard - Change the font weight from bold to normal for translated titles. - Reduce the separation between original and translated title. Bug: T178148 Change-Id: I64767198f25e894dbc278175af0ca7647d010e29 --- M modules/dashboard/styles/ext.cx.translationlist.less 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/75/384075/1 diff --git a/modules/dashboard/styles/ext.cx.translationlist.less b/modules/dashboard/styles/ext.cx.translationlist.less index 42775f7..c276e8c 100644 --- a/modules/dashboard/styles/ext.cx.translationlist.less +++ b/modules/dashboard/styles/ext.cx.translationlist.less @@ -116,7 +116,6 @@ .mw-ui-one-whole; font-size: 1em; - font-weight: bolder; text-decoration: none; padding-left: 0; @@ -127,7 +126,8 @@ .source-title { color: @colorGray2; - padding-right: 1em; + padding-right: 0.5em; + font-weight: bold; } .target-title { -- To view, visit https://gerrit.wikimedia.org/r/384075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64767198f25e894dbc278175af0ca7647d010e29 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix page selection error
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384061 ) Change subject: Fix page selection error .. Fix page selection error With update of OOjs UI to v0.23.5 in If8312c60e1547, some properties, that relied on the way previous version stored configs, are broken. This fixes the issue by storing and retrieving the number of languages property. Change-Id: I4537ead74cdcc0acfd209eeeaef00e0cbc417498 --- M modules/source/ext.cx.source.selector.js M modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/61/384061/1 diff --git a/modules/source/ext.cx.source.selector.js b/modules/source/ext.cx.source.selector.js index 7018a0c..b2ce49a 100644 --- a/modules/source/ext.cx.source.selector.js +++ b/modules/source/ext.cx.source.selector.js @@ -1013,7 +1013,7 @@ text: itemTitle } ); - numOfLanguages = item.initialConfig.numOfLanguages; + numOfLanguages = item.getNumberOfLanguages(); if ( numOfLanguages ) { this.$selectedItemMetrics.prepend( $( '' ) diff --git a/modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js b/modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js index e1110a0..8af3216 100644 --- a/modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js +++ b/modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js @@ -30,6 +30,8 @@ this.$element.addClass( 'mw-cx-widget-titleOptionWidget' ); if ( config.numOfLanguages ) { + this.numOfLanguages = config.numOfLanguages; + languageIcon = new OO.ui.IconWidget( { icon: 'language', iconTitle: 'Number of languages' @@ -62,4 +64,8 @@ OO.inheritClass( mw.cx.ui.TitleOptionWidget, mw.widgets.TitleOptionWidget ); + mw.cx.ui.TitleOptionWidget.prototype.getNumberOfLanguages = function () { + return this.numOfLanguages; + }; + }( jQuery, mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/384061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4537ead74cdcc0acfd209eeeaef00e0cbc417498 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: [WIP] Port Translate filters to new RC filters UI
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383986 ) Change subject: [WIP] Port Translate filters to new RC filters UI .. [WIP] Port Translate filters to new RC filters UI Bug: T159795 Change-Id: Id47e57487e13f90354e1cdfbb1e2f19fb869ac11 --- M Translate.php M i18n/core/en.json M i18n/core/qqq.json M utils/RcFilter.php 4 files changed, 152 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/86/383986/1 diff --git a/Translate.php b/Translate.php index 19b90b8..2d825b8 100644 --- a/Translate.php +++ b/Translate.php @@ -131,6 +131,8 @@ // Recent changes filters $wgHooks['ChangesListSpecialPageQuery'][] = 'TranslateRcFilter::translationFilter'; $wgHooks['SpecialRecentChangesPanel'][] = 'TranslateRcFilter::translationFilterForm'; +$wgHooks['ChangesListSpecialPageStructuredFilters'][] = +'TranslateRcFilter::onChangesListSpecialPageStructuredFilters'; $wgHooks['SkinTemplateToolboxEnd'][] = 'TranslateToolbox::toolboxAllTranslations'; $wgHooks['AbortEmailNotification'][] = 'TranslateHooks::onAbortEmailNotificationReview'; diff --git a/i18n/core/en.json b/i18n/core/en.json index c7fcaaf..5194287 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -114,6 +114,13 @@ "action-translate-messagereview": "review translations", "right-translate-groupreview": "Change workflow state of message groups", "action-translate-groupreview": "change workflow state of message groups", + "translate-rcfilters-translations": "Translations", + "translate-rcfilters-translations-only-label": "Translations", + "translate-rcfilters-translations-only-desc": "Changes to translated pages.", + "translate-rcfilters-translations-filter-label": "Not translations", + "translate-rcfilters-translations-filter-desc": "All changes that are not translations.", + "translate-rcfilters-translations-site-label": "Site Messages", + "translate-rcfilters-translations-site-desc": "Customizations of site messages.", "translate-rc-translation-filter": "Filter translations:", "translate-rc-translation-filter-no": "Do nothing", "translate-rc-translation-filter-only": "Show translations only", diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json index 9358dbf..ad959f0 100644 --- a/i18n/core/qqq.json +++ b/i18n/core/qqq.json @@ -147,6 +147,13 @@ "right-translate-groupreview": "{{doc-right|translate-groupreview}}", "action-translate-groupreview": "{{doc-action|translate-groupreview}}", "translate-rc-translation-filter": "Name of filter in [[Special:RecentChanges]]. Gives a user the option to filter out translations, show translations only, or do nothing (default).", + "translate-rcfilters-translations": "Title for the filter group for translations. Only available on [[Special:RecentChanges]].", + "translate-rcfilters-translations-only-label": "Label for the filter for showing changes to translated pages only.", + "translate-rcfilters-translations-only-desc": "Description for the filter for showing changes to translated pages only.", + "translate-rcfilters-translations-filter-label": "Label for the filter for showing changes to pages that aren't translations.", + "translate-rcfilters-translations-filter-desc": "Description for the filter for showing changes to pages that aren't translations.", + "translate-rcfilters-translations-site-label": "Label for the filter for showing customizations of site messages.", + "translate-rcfilters-translations-site-desc": "Description for the filter for showing customizations of site messages.", "translate-rc-translation-filter-no": "Option for filter in [[Special:RecentChanges]]. Selecting this option results in the filter not doing anything. It is the default value.", "translate-rc-translation-filter-only": "Option for filter in [[Special:RecentChanges]]. Selecting this option results in the filter only showing recent changes that are translations.", "translate-rc-translation-filter-filter": "Option for filter in [[Special:RecentChanges]]. Selecting this option results in the filter not showing any recent changes that are translations.", diff --git a/utils/RcFilter.php b/utils/RcFilter.php index 82ce523..2b865b9 100644 --- a/utils/RcFilter.php +++ b/utils/RcFilter.php @@ -28,12 +28,12 @@ * @param FormOptions $opts * @return bool true */ - public static function translationFilter( $pageName, &$tables, &$fields, &$conds, &$query_options, - &$join_conds, FormOptions $opts + public static function translationFilter( $pageName, &$tables, &$fields, &$conds, + &$query_options, &$join_conds, FormOptions $opts ) { - global $wgTranslateMessageNamespaces,
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add option to hide missing pages while searching
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383413 ) Change subject: Add option to hide missing pages while searching .. Add option to hide missing pages while searching Bug: T177469 Change-Id: Ie5fdbe6eacde05473101d480a98eb5f2b3c6251d --- M resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/13/383413/1 diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js index db56bd3..8ddef54 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js @@ -22,6 +22,7 @@ * @cfg {boolean} [showRedirectTargets=true] Show the targets of redirects * @cfg {boolean} [showImages] Show page images * @cfg {boolean} [showDescriptions] Show page descriptions +* @cfg {boolean} [showMissing=true] Show missing pages * @cfg {boolean} [excludeCurrentPage] Exclude the current page from suggestions * @cfg {boolean} [validateTitle=true] Whether the input must be a valid title (if set to true, * the widget will marks itself red for invalid inputs, including an empty query). @@ -44,6 +45,7 @@ this.showRedirectTargets = config.showRedirectTargets !== false; this.showImages = !!config.showImages; this.showDescriptions = !!config.showDescriptions; + this.showMissing = config.showMissing !== false; this.excludeCurrentPage = !!config.excludeCurrentPage; this.validateTitle = config.validateTitle !== undefined ? config.validateTitle : true; this.cache = config.cache; @@ -227,6 +229,9 @@ for ( index in data.pages ) { suggestionPage = data.pages[ index ]; + if ( !this.showMissing && suggestionPage.missing !== undefined ) { + continue; + } // When excludeCurrentPage is set, don't list the current page unless the user has type the full title if ( this.excludeCurrentPage && suggestionPage.title === currentPageName && suggestionPage.title !== titleObj.getPrefixedText() ) { continue; -- To view, visit https://gerrit.wikimedia.org/r/383413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5fdbe6eacde05473101d480a98eb5f2b3c6251d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Use mixins and variables in Less files
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383358 ) Change subject: RCFilters: Use mixins and variables in Less files .. RCFilters: Use mixins and variables in Less files Bug: T156164 Change-Id: Ie979926fe2fb0f840e5bd5dacedf254312a0aa17 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuHeaderWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuOptionWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuSectionOptionWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.HighlightColorPickerWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ItemMenuOptionWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.LiveUpdateButtonWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.MenuSelectWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.TagItemWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ViewSwitchWidget.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.WatchlistTopSectionWidget.less 17 files changed, 80 insertions(+), 62 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/383358/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index ba7a70e..9608ca4 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -1,5 +1,7 @@ @import 'mediawiki.mixins.animation'; @import 'mw.rcfilters.mixins'; +@import 'mediawiki.mixins'; +@import 'mediawiki.ui/variables'; @rcfilters-spinner-width: 70px; @rcfilters-head-min-height: 250px; @@ -84,7 +86,7 @@ display: inline-block; width: 12px; height: 12px; - background-color: #c8ccd1; + background-color: @colorGray12; border-radius: 100%; .animation( rcfiltersBouncedelay 1.5s ease-in-out -0.16s infinite both ); } @@ -128,13 +130,11 @@ 0%, 80%, 100% { - -webkit-transform: scale( 0.7 ); - transform: scale( 0.7 ); + .transform( scale( 0.7 ) ); } 40% { - background-color: #a2a9b1; - -webkit-transform: scale( 1 ); - transform: scale( 1 ); + background-color: @colorGray10; + .transform( scale( 1 ) ); } } @@ -142,13 +142,11 @@ 0%, 80%, 100% { - -moz-transform: scale( 0.7 ); - transform: scale( 0.7 ); + .transform( scale( 0.7 ) ); } 40% { - background-color: #a2a9b1; - -moz-transform: scale( 0.7 ); - transform: scale( 1 ); + background-color: @colorGray10; + .transform( scale( 1 ) ); } } @@ -156,10 +154,10 @@ 0%, 80%, 100% { - transform: scale( 0.7 ); + .transform( scale( 0.7 ) ); } 40% { - background-color: #a2a9b1; - transform: scale( 1 ); + background-color: @colorGray10; + .transform( scale( 1 ) ); } } diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less index 6c44cc4..5e9aa32 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less @@ -1,5 +1,6 @@ @import 'mediawiki.mixins'; @import 'mw.rcfilters.variables'; +@import 'mediawiki.ui/variables'; .animation-delay( ... ) { -webkit-animation-delay: @arguments; // Chrome 4-42, Safari 4-8, Opera 15-29, Android 2.1-4.4.4 @@ -8,7 +9,7 @@ } // This is a general mixin for a color circle -.mw-rcfilters-mixin-circle( @color: #fff, @diameter: 2em, @padding: 0.5em, @border: false, @borderColor: #54595d, @emptyBackground: false ) { +.mw-rcfilters-mixin-circle( @color: #fff, @diameter: 2em, @padding: 0.5em, @border: false,
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Change empty result states
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383176 ) Change subject: Change empty result states .. Change empty result states - Drop minimum height for search results container. - Don't show missing pages while searching in New translation dialog. - Show message when there are no search results for user input query. - Remove red border for validation on New translation dialog input field. - Provide option to close search results on Escape key. - Don't close search results when New translation dialog input field is tabbed out. Bug: T177469 Bug: T177470 Depends-On: I9e7dd451c61a6a88679628acbbf28d45c0a1e0e8 Change-Id: I70cc3fa25e153b29486b0d42adf7bd8cd17d9ee8 --- M extension.json M i18n/en.json M i18n/qqq.json M modules/source/ext.cx.source.selector.js M modules/source/styles/ext.cx.source.selector.less M modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js 6 files changed, 105 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/76/383176/1 diff --git a/extension.json b/extension.json index 0b8226d..e6d0130 100644 --- a/extension.json +++ b/extension.json @@ -369,8 +369,9 @@ "cx-sourceselector-dialog-error-title-in-use", "cx-sourceselector-dialog-error-no-source-article", "cx-sourceselector-embedded-selected-item-pageviews", - "cx-sourceselector-embedded-recent-edits", + "cx-sourceselector-embedded-recent-edits-header", "cx-sourceselector-embedded-recent-edits-no-results", + "cx-sourceselector-embedded-search-no-results", "cx-license-agreement", "cx-error-server-connection" ] diff --git a/i18n/en.json b/i18n/en.json index 41d3cab..f890f7b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -99,8 +99,9 @@ "cx-sourceselector-dialog-error-no-source-article": "The page to translate does not exist in $1", "cx-sourceselector-missing-in-target-language": "Missing in $1", "cx-sourceselector-embedded-selected-item-pageviews": "{{PLURAL:$1|$1 visit per|$1 visits per|0=No visits this}} week", - "cx-sourceselector-embedded-recent-edits": "Recently edited by you", + "cx-sourceselector-embedded-recent-edits-header": "Recently edited by you", "cx-sourceselector-embedded-recent-edits-no-results": "Think of any topic of your interest. You don’t need to be an expert to create a great translation.", + "cx-sourceselector-embedded-search-no-results": "No pages found for '$1' in $2", "cx-mt-abuse-warning-title": "Your translation {{PLURAL:$1|contains}} $1% of unmodified machine-translated text", "cx-mt-abuse-warning-text": "Machine translation is provided only as a starting point. You need to make sure that the content is accurate and reads naturally in your language.", "cx-publish-captcha-title": "Security question", diff --git a/i18n/qqq.json b/i18n/qqq.json index 550145d..98fd369 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -108,8 +108,9 @@ "cx-sourceselector-dialog-error-no-source-article": "Error that indicates there is no page with the specified title in the source language to translate.\n\nParameters:\n* $1 - the source language", "cx-sourceselector-missing-in-target-language": "Label appended to search result in Special:ContentTranslation when using the \"Start new article\" feature, which indicates that matching article is missing in target language.\n\nParameters:\n* $1 - The autonym of the language", "cx-sourceselector-embedded-selected-item-pageviews": "Label appended to selected item in New translation embedded dialog on Content Translation dashboard, used for representing number of page visits in the last week.\n$1 - number of visits per week", - "cx-sourceselector-embedded-recent-edits": "Label used in New translation embedded dialog, above the suggestions based on user's Recently edited pages.", + "cx-sourceselector-embedded-recent-edits-header": "Label used in New translation embedded dialog, above the suggestions based on user's Recently edited pages.", "cx-sourceselector-embedded-recent-edits-no-results": "Message used in New translation embedded dialog, when there are no suggestions based on user's Recently edited pages.", + "cx-sourceselector-embedded-search-no-results": "Message used in New translation embedded dialog, displayed when there are no search results for user's input query.\n\nParameters:\n* $1 - User's input query\n* $2 - Autonym name of currently selected source language", "cx-mt-abuse-warning-title": "Title text shown in machine translation
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add option to hide missing pages while searching
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383174 ) Change subject: Add option to hide missing pages while searching .. Add option to hide missing pages while searching Bug: T177469 Change-Id: I9e7dd451c61a6a88679628acbbf28d45c0a1e0e8 --- M resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/383174/1 diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js index db56bd3..35a8591 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js @@ -32,7 +32,8 @@ // Config initialization config = $.extend( { maxLength: 255, - limit: 10 + limit: 10, + showMissing: true }, config ); // Properties @@ -44,6 +45,7 @@ this.showRedirectTargets = config.showRedirectTargets !== false; this.showImages = !!config.showImages; this.showDescriptions = !!config.showDescriptions; + this.showMissing = !!config.showMissing; this.excludeCurrentPage = !!config.excludeCurrentPage; this.validateTitle = config.validateTitle !== undefined ? config.validateTitle : true; this.cache = config.cache; @@ -227,6 +229,9 @@ for ( index in data.pages ) { suggestionPage = data.pages[ index ]; + if ( !this.showMissing && suggestionPage.missing !== undefined ) { + continue; + } // When excludeCurrentPage is set, don't list the current page unless the user has type the full title if ( this.excludeCurrentPage && suggestionPage.title === currentPageName && suggestionPage.title !== titleObj.getPrefixedText() ) { continue; -- To view, visit https://gerrit.wikimedia.org/r/383174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e7dd451c61a6a88679628acbbf28d45c0a1e0e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change Tagged edits help icon
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382697 ) Change subject: Change Tagged edits help icon .. Change Tagged edits help icon - Change the link that help icon leads to. - Reduce the size of help icon. Bug: T176661 Change-Id: Ifc3b3e9efce00ea601795bd67a2de17c4be3cf6f --- M languages/i18n/en.json M languages/i18n/qqq.json M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuHeaderWidget.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js 4 files changed, 20 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/382697/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 282b906..93e5603d 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1467,7 +1467,7 @@ "rcfilters-view-namespaces-tooltip": "Filter results by namespace", "rcfilters-view-tags-tooltip": "Filter results using edit tags", "rcfilters-view-return-to-default-tooltip": "Return to main filter menu", - "rcfilters-view-tags-help-icon-tooltip": "Learn more about Tagged Edits", + "rcfilters-view-tags-help-icon-tooltip": "Learn more about Tagged edits", "rcfilters-liveupdates-button": "Live updates", "rcfilters-liveupdates-button-title-on": "Turn off live updates", "rcfilters-liveupdates-button-title-off": "Display new changes as they happen", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 4d6cf93..a5b23a4 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1660,7 +1660,7 @@ "rcfilters-view-namespaces-tooltip": "Tooltip for the button that loads the namespace view in [[Special:RecentChanges]]", "rcfilters-view-tags-tooltip": "Tooltip for the button that loads the tags view in [[Special:RecentChanges]]", "rcfilters-view-return-to-default-tooltip": "Tooltip for the button that returns to the default filter view in [[Special:RecentChanges]]", - "rcfilters-view-tags-help-icon-tooltip": "Tooltip for the help button that leads user to [[mw:Special:MyLanguage/Help:New_filters_for_edit_review/Advanced_filters#tags|Help page]] for Tagged Edits", + "rcfilters-view-tags-help-icon-tooltip": "Tooltip for the help button that leads user to [[mw:Special:MyLanguage/Special:Tags|Help page]] for Tagged edits", "rcfilters-liveupdates-button": "Label for the button to enable or disable live updates on [[Special:RecentChanges]]", "rcfilters-liveupdates-button-title-on": "Title for the button to enable or disable live updates on [[Special:RecentChanges]] when the feature is ON.", "rcfilters-liveupdates-button-title-off": "Title for the button to enable or disable live updates on [[Special:RecentChanges]] when the feature is OFF.", diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuHeaderWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuHeaderWidget.less index 83fe189..0fc7260 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuHeaderWidget.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuHeaderWidget.less @@ -4,15 +4,22 @@ &-title { display: inline-block; font-size: 1.2em; - padding: 0.75em 0 0.75em 0.5em; + padding: 0.75em 0.5em; // TODO: Unify colors with official design palette color: #54595d; } &-helpIcon { + .background-image-svg('../../mediawiki/images/help.svg', '../../mediawiki/images/help.png'); + background-position: center; + background-repeat: no-repeat; + background-size: 16px; + position: absolute; top: 50%; .transform( translateY( -50% ) ); + width: 16px; + height: 16px; } &-header { diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js index 1a0c5ff..4fc9020 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js @@ -36,15 +36,14 @@ this.backButton.toggle( this.model.getCurrentView() !== 'default' ); // Help icon for Tagged edits - this.helpIcon = new OO.ui.ButtonWidget( { - icon: 'help', - framed: false, - title: mw.msg( 'rcfilters-view-tags-help-icon-tooltip' ), - classes: [ 'mw-rcfilters-ui-filterMenuHeaderWidget-helpIcon' ], - href:
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Truncate long suggestions descriptions
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382602 ) Change subject: Truncate long suggestions descriptions .. Truncate long suggestions descriptions - Limit the number of lines that suggestion description can have to maximum of three lines. - Show ellipsis when description is longer than three lines. Bug: T117604 Change-Id: Iabadfca8ed1098f98f9b2789d0f40bf4e56ae1c3 --- M modules/dashboard/styles/ext.cx.suggestionlist.less 1 file changed, 50 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/02/382602/1 diff --git a/modules/dashboard/styles/ext.cx.suggestionlist.less b/modules/dashboard/styles/ext.cx.suggestionlist.less index 32ebe38..ba10e4d 100644 --- a/modules/dashboard/styles/ext.cx.suggestionlist.less +++ b/modules/dashboard/styles/ext.cx.suggestionlist.less @@ -98,11 +98,56 @@ } } -.cx-slitem__desc { - color: @colorGray7; - padding: 5px 0; - font-size: 0.8125em; - text-align: left; +.cx-slitem { + &:hover { + .cx-slitem__desc:after { + background-color: #eff3fb; + .transition( background-color 1s ease ); + } + } + + &__desc { + color: @colorGray7; + + overflow: hidden; + clear: both; + position: relative; + + box-sizing: border-box; + width: 100%; + // We want to limit number of lines that description for + // suggestion item takes. Maximum height is thus set to + // get maximum of three line heights. Before and after + // elements are tricks used to provide ellipsis truncation + max-height: 3.6em; // line-height * 3 + margin: 0.5em -1em 0.5em 0; + padding-right: 1em; + + font-size: 0.8125em; + line-height: 1.2; + text-align: justify; + + &:before { + content: '...'; + position: absolute; + bottom: 0; + right: 0; + font-weight: bold; + } + + &:after { + content: ''; + + background-color: #fff; + position: absolute; + right: 0; + width: 1em; + height: 1em; + margin-top: 0.2em; + + .transition( background-color 1s ease ); + } + } } .cx-slitem__details { -- To view, visit https://gerrit.wikimedia.org/r/382602 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iabadfca8ed1098f98f9b2789d0f40bf4e56ae1c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits