JGonera has submitted this change and it was merged.
Change subject: Tweak: Position fixed elements and open navigation panel
......................................................................
Tweak: Position fixed elements and open navigation panel
add class position-fixed-element to all fixed position elements
alter positioning when menu opened/closed
Change-Id: I52d4bc965d585442c8fc09b0264667ae0cb88d3a
---
M includes/specials/SpecialMobileDiff.php
M javascripts/common/mf-notification.js
M stylesheets/common/mf-navigation.css
M stylesheets/less/common/mf-navigation.less
M templates/photoUploadPreview.html
5 files changed, 21 insertions(+), 8 deletions(-)
Approvals:
JGonera: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/includes/specials/SpecialMobileDiff.php
b/includes/specials/SpecialMobileDiff.php
index 206854b..63a6a5f 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -127,7 +127,8 @@
$output = $this->getOutput();
$output->addHtml(
- Html::openElement( 'div', array( 'id' =>
'mw-mf-userinfo' ) )
+ Html::openElement( 'div', array( 'id' =>
'mw-mf-userinfo',
+ 'class' => 'position-fixed' ) )
);
$userId = $this->rev->getUser();
diff --git a/javascripts/common/mf-notification.js
b/javascripts/common/mf-notification.js
index 26009d8..418e335 100644
--- a/javascripts/common/mf-notification.js
+++ b/javascripts/common/mf-notification.js
@@ -23,6 +23,7 @@
$( '#mf-notification div' ).html( html );
calculatePosition();
return $( '#mf-notification' ).removeAttr( 'class' ).
+ addClass( 'position-fixed-element' ).
addClass( classes ).show();
}
@@ -45,7 +46,9 @@
}
function init( firstRun ) {
+ // FIXME: turn into view with template
var el = $( '<div
id="mf-notification"><div></div></div>' ).hide().
+ addClass( 'position-fixed-element' ).
appendTo( document.body )[ 0 ];
if ( M.getConfig( 'beta' ) ) {
diff --git a/stylesheets/common/mf-navigation.css
b/stylesheets/common/mf-navigation.css
index bb1b1dd..bc263cb 100644
--- a/stylesheets/common/mf-navigation.css
+++ b/stylesheets/common/mf-navigation.css
@@ -199,8 +199,9 @@
width: 80%;
right: 20%;
}
+.navigationEnabled .position-fixed,
.navigationEnabled #mw-mf-page-center {
- left: 80%;
+ left: 80% !important;
overflow-x: hidden;
}
.navigationEnabled.navigationFullScreen #mw-mf-page-left {
@@ -529,14 +530,18 @@
}
}
@media all and (min-width: 700px) {
+ .navigationEnabled .alpha #mw-mf-page-left,
.navigationEnabled .beta #mw-mf-page-left {
width: 20%;
display: block;
right: 80%;
}
+ .navigationEnabled .alpha .position-fixed,
+ .navigationEnabled .beta .position-fixed,
+ .navigationEnabled .alpha #mw-mf-page-center,
.navigationEnabled .beta #mw-mf-page-center {
- left: 20%;
- right: 0;
+ left: 20% !important;
+ right: 0 !important;
width: 80%;
overflow: auto;
}
diff --git a/stylesheets/less/common/mf-navigation.less
b/stylesheets/less/common/mf-navigation.less
index 1493f95..1f2d452 100644
--- a/stylesheets/less/common/mf-navigation.less
+++ b/stylesheets/less/common/mf-navigation.less
@@ -94,8 +94,9 @@
right: 20%;
}
+ .position-fixed,
#mw-mf-page-center {
- left: 80%;
+ left: 80% !important;
overflow-x: hidden; // prevent horizontal scroll on chrome
}
@@ -477,15 +478,18 @@
}
@media all and (min-width: 700px) {
+ .navigationEnabled .alpha,
.navigationEnabled .beta {
#mw-mf-page-left {
width: 20%;
display: block;
right: 80%;
}
+
+ .position-fixed,
#mw-mf-page-center {
- left: 20%;
- right: 0;
+ left: 20% !important;
+ right: 0 !important;
width: 80%;
overflow: auto;
}
diff --git a/templates/photoUploadPreview.html
b/templates/photoUploadPreview.html
index a60dae3..9da5a07 100644
--- a/templates/photoUploadPreview.html
+++ b/templates/photoUploadPreview.html
@@ -3,7 +3,7 @@
<textarea name="description"
placeholder="{{descriptionPlaceholder}}"></textarea>
<div class="license">{{{license}}}</div>
</div>
-<div class="buttonBar">
+<div class="buttonBar position-fixed">
<button class="cancel">{{cancelButton}}</button>
<button class="submit" disabled>{{submitButton}}</button>
</div>
--
To view, visit https://gerrit.wikimedia.org/r/51210
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I52d4bc965d585442c8fc09b0264667ae0cb88d3a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits