jenkins-bot has submitted this change and it was merged.

Change subject: Fix share tabs
......................................................................


Fix share tabs

The share/embed tab bar used some hacks to disable MenuSelectWidget's
normal behavior of disappearing once a selection has been made; after
the last OOUI update this doesn't work anymore.

This commit makes some small changes to make it work again:
* replace .show() with .toggle() as the widget uses a custom
  show/hide mechanism now
* reorder some calls - .toggle() has no effect as long as the menu has
  no options
* disable autoHide which would hide the menu when the user clicks
  outside (didn't test if it is really needed but seemed reasonable)

Also undoes some CSS changes that came with the update.

Bug: T89531
Change-Id: I3688ec21250bf2eb8dbfd67e306e857028d71fc7
---
M resources/mmv/ui/mmv.ui.reuse.dialog.js
M resources/mmv/ui/mmv.ui.reuse.dialog.less
2 files changed, 8 insertions(+), 4 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mmv/ui/mmv.ui.reuse.dialog.js 
b/resources/mmv/ui/mmv.ui.reuse.dialog.js
index 7981d5b..b41199b 100644
--- a/resources/mmv/ui/mmv.ui.reuse.dialog.js
+++ b/resources/mmv/ui/mmv.ui.reuse.dialog.js
@@ -61,12 +61,10 @@
                }
 
                this.reuseTabs = new oo.ui.MenuSelectWidget( {
+                       autoHide: false,
                        classes: [ 'mw-mmv-reuse-tabs' ]
                } );
-
-               // MenuSelectWidget has a nasty tendency to hide itself, maybe 
we're not using it right?
-               this.reuseTabs.hide = $.noop;
-               this.reuseTabs.$element.show().appendTo( this.$dialog );
+               this.reuseTabs.$element.appendTo( this.$dialog );
 
                this.tabs = {
                        share: new mw.mmv.ui.reuse.Share( this.$dialog ),
@@ -83,6 +81,10 @@
                        this.ooTabs.embed
                ] );
 
+               // MenuSelectWidget has a nasty tendency to hide itself, maybe 
we're not using it right?
+               this.reuseTabs.toggle( true );
+               this.reuseTabs.toggle = $.noop;
+
                this.selectedTab = this.getLastUsedTab();
 
                // In case nothing is saved in localStorage or it contains junk
diff --git a/resources/mmv/ui/mmv.ui.reuse.dialog.less 
b/resources/mmv/ui/mmv.ui.reuse.dialog.less
index 2a06377..3ded381 100644
--- a/resources/mmv/ui/mmv.ui.reuse.dialog.less
+++ b/resources/mmv/ui/mmv.ui.reuse.dialog.less
@@ -12,6 +12,8 @@
 
                position: static;
                box-shadow: none;
+               padding-bottom: 0; // OOUI override
+               border: none; // OOUI override
                border-bottom: @divider-border-height solid @divider-color;
                .box-round(@border-radius @border-radius 0 0);
 

-- 
To view, visit https://gerrit.wikimedia.org/r/191057
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3688ec21250bf2eb8dbfd67e306e857028d71fc7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.25wmf17
Gerrit-Owner: Gilles <gdu...@wikimedia.org>
Gerrit-Reviewer: Gilles <gdu...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to