Merge "Use a fullscreen help dialog for templates on mobile"

This commit is contained in:
jenkins-bot 2021-11-12 16:25:32 +00:00 committed by Gerrit Code Review
commit d4a25fdbe7
4 changed files with 17 additions and 6 deletions

View file

@ -62,5 +62,8 @@ ve.ui.MWFloatingHelpDialog.prototype.getSetupProcess = function ( data ) {
ve.ui.MWFloatingHelpDialog.prototype.getSizeProperties = function () {
var sizeProps = ve.ui.MWFloatingHelpDialog.super.prototype.getSizeProperties.call( this );
if ( !OO.ui.isMobile() ) {
return ve.extendObject( {}, sizeProps, { width: '350px' } );
}
return sizeProps;
};

View file

@ -32,13 +32,17 @@ ve.ui.MWFloatingHelpElement = function VeUiMWFloatingHelpElement( config ) {
this.windowManager = new OO.ui.WindowManager();
this.windowManager.addWindows( [ this.helpDialog ] );
this.windowManager.$element.addClass( 've-ui-mwFloatingHelpElement-windowManager' );
if ( OO.ui.isMobile() ) {
$( document.body ).append( this.windowManager.$element );
} else {
this.$element.append( this.windowManager.$element );
}
this.$element
.addClass( 've-ui-mwFloatingHelpElement' )
.append(
this.windowManager.$element,
this.helpButton.$element
);
.append( this.helpButton.$element );
};
/* Inheritance */

View file

@ -275,3 +275,7 @@
.ve-ui-mwTransclusionDialog-floatingHelpElement-fieldsetLayout label {
margin-bottom: 16px;
}
.ve-ui-mwTransclusionDialog-floatingHelpElement-fieldsetLayout .oo-ui-buttonWidget {
width: 100%;
}

View file

@ -26,7 +26,7 @@
right: 0;
}
.ve-ui-mwFloatingHelpElement .oo-ui-dialog .oo-ui-panelLayout {
.ve-ui-mwFloatingHelpElement-windowManager .oo-ui-dialog .oo-ui-panelLayout {
padding: 16px;
}