Use a fullscreen help dialog for templates on mobile

Bug: T294839
Change-Id: I1effb6ea70bcf5e9ce4e84e65431765d0d2f8125
This commit is contained in:
Andrew Kostka 2021-11-09 17:47:43 +01:00
parent 72641151e4
commit da2df5a118
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 );
return ve.extendObject( {}, sizeProps, { width: '350px' } );
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;
}