Kaldari has uploaded a new change for review.
https://gerrit.wikimedia.org/r/76659
Change subject: Fixes a bug with the display of the fixed userinfo panel when
the left-nav is open. It now behaves the same as the article content -
squishing at large screen sizes and clipping on small screens.
......................................................................
Fixes a bug with the display of the fixed userinfo panel
when the left-nav is open. It now behaves the same as the article
content - squishing at large screen sizes and clipping on small
screens.
Also changing 'Thank' button to use capitalized string.
Also consolidating css for #mw-mf-diffview #mw-mf-userinfo.
Depends on having the Echo and Thanks extensions installed.
Dependency: Ibc6916640840b5c1f05297f8f05ee44746f37b9d
Change-Id: I41ef2e80001ae3eb8fd012d554430076b3bc0e3d
---
M includes/Resources.php
M includes/specials/SpecialMobileDiff.php
M javascripts/modules/thanks.js
M less/specials/mobilediff.less
M stylesheets/specials/mobilediff.css
5 files changed, 30 insertions(+), 24 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/59/76659/1
diff --git a/includes/Resources.php b/includes/Resources.php
index 5c36378..41a5fce 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -724,8 +724,8 @@
'javascripts/modules/thanks.js',
),
'messages' => array(
- 'thanks-thank',
- 'thanks-thanked',
+ 'thanks-button-thank',
+ 'thanks-button-thanked',
'thanks-error-invalidrevision',
'thanks-error-ratelimited',
'thanks-error-undefined',
diff --git a/includes/specials/SpecialMobileDiff.php
b/includes/specials/SpecialMobileDiff.php
index 1ef8597..1fe1e05 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -210,8 +210,11 @@
$output = $this->getOutput();
$output->addHtml(
- Html::openElement( 'div', array( 'id' =>
'mw-mf-userinfo',
+ Html::openElement( 'div', array( 'id' =>
'mw-mf-userinfo-container',
'class' => 'position-fixed' ) )
+ );
+ $output->addHtml(
+ Html::openElement( 'div', array( 'id' =>
'mw-mf-userinfo' ) )
);
$userId = $this->rev->getUser();
@@ -255,6 +258,9 @@
$output->addHtml(
Html::closeElement( 'div' )
);
+ $output->addHtml(
+ Html::closeElement( 'div' )
+ );
}
function listGroups( User $user ) {
diff --git a/javascripts/modules/thanks.js b/javascripts/modules/thanks.js
index 7fad52e..bcc6f80 100644
--- a/javascripts/modules/thanks.js
+++ b/javascripts/modules/thanks.js
@@ -43,7 +43,7 @@
$user.data( 'user-name' ) !== mw.config.get(
'wgUserName' ) )
{
$( '<button class="mw-mf-thank-button">' )
- .text( mw.msg( 'thanks-thank' ) )
+ .text( mw.msg( 'thanks-button-thank' ) )
.on( 'click', function() {
var $thankLink = $( this ),
name = $user.data( 'user-name'
),
@@ -53,7 +53,7 @@
if ( !$thankLink.hasClass( 'thanked' )
) {
thankUser( name, rev, gender
).done( function() {
$thankLink.addClass(
'thanked' ).attr( 'disabled', true );
- $thankLink.text(
mw.message( 'thanks-thanked', mw.user ).escaped() );
+ $thankLink.text(
mw.message( 'thanks-button-thanked', mw.user ).escaped() );
} );
}
} )
diff --git a/less/specials/mobilediff.less b/less/specials/mobilediff.less
index 86c720f..60ee6b8 100644
--- a/less/specials/mobilediff.less
+++ b/less/specials/mobilediff.less
@@ -85,11 +85,14 @@
margin-left: 0.5em;
}
- #mw-mf-userinfo {
+ #mw-mf-userinfo-container {
min-height: @userInfoHeight;
- padding: 1em;
+ width: 100%;
background-color: #f0f0f0;
border-top: solid 1px #c0c0c0;
+ bottom: 0;
+ left: 0;
+ right: 0;
&::before {
content: "";
@@ -114,6 +117,10 @@
display: block;
width: 0;
}
+ }
+
+ #mw-mf-userinfo {
+ padding: 1em;
.mw-mf-user {
line-height: 14px;
@@ -173,14 +180,6 @@
.revision-history-links {
font-size: 0.9em;
margin-top: 8px;
- }
-}
-
-#mw-mf-diffview {
- #mw-mf-userinfo {
- bottom: 0;
- left: 0;
- right: 0;
}
}
diff --git a/stylesheets/specials/mobilediff.css
b/stylesheets/specials/mobilediff.css
index 474e0d4..769b23e 100644
--- a/stylesheets/specials/mobilediff.css
+++ b/stylesheets/specials/mobilediff.css
@@ -79,13 +79,16 @@
display: inline-block;
margin-left: 0.5em;
}
-#mw-mf-diffview #mw-mf-userinfo {
+#mw-mf-diffview #mw-mf-userinfo-container {
min-height: 5em;
- padding: 1em;
+ width: 100%;
background-color: #f0f0f0;
border-top: solid 1px #c0c0c0;
+ bottom: 0;
+ left: 0;
+ right: 0;
}
-#mw-mf-diffview #mw-mf-userinfo::before {
+#mw-mf-diffview #mw-mf-userinfo-container::before {
content: "";
position: absolute;
top: -10px;
@@ -96,7 +99,7 @@
display: block;
width: 0;
}
-#mw-mf-diffview #mw-mf-userinfo::after {
+#mw-mf-diffview #mw-mf-userinfo-container::after {
content: "";
position: absolute;
top: -9px;
@@ -106,6 +109,9 @@
border-color: #f0f0f0 transparent;
display: block;
width: 0;
+}
+#mw-mf-diffview #mw-mf-userinfo {
+ padding: 1em;
}
#mw-mf-diffview #mw-mf-userinfo .mw-mf-user {
line-height: 14px;
@@ -164,11 +170,6 @@
.alpha .revision-history-links {
font-size: 0.9em;
margin-top: 8px;
-}
-#mw-mf-diffview #mw-mf-userinfo {
- bottom: 0;
- left: 0;
- right: 0;
}
.mw-mf-thank-button {
float: right;
--
To view, visit https://gerrit.wikimedia.org/r/76659
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I41ef2e80001ae3eb8fd012d554430076b3bc0e3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits