From 97ef584e207b7bc200dc9c1d95aaf0894fdb9746 Mon Sep 17 00:00:00 2001 From: Andrew Kostka Date: Thu, 9 Sep 2021 12:26:40 +0200 Subject: [PATCH] Rename showSidebar to expandSidebar for consistency Bug: T274554 Change-Id: Ia0611fe10492e05e4625eb743c66eac7d0235dc5 --- .../ui/dialogs/ve.ui.MWTransclusionDialog.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js index da85803418..ecf4ca87a3 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js @@ -295,42 +295,42 @@ ve.ui.MWTransclusionDialog.prototype.getPageFromPart = function ( part ) { * @private */ ve.ui.MWTransclusionDialog.prototype.autoExpandSidebar = function () { - var showSidebar; + var expandSidebar; if ( this.useInlineDescriptions ) { var isSmallScreen = $( window ).width() <= this.constructor.static.smallScreenMaxWidth; - showSidebar = !isSmallScreen; + expandSidebar = !isSmallScreen; this.$otherActions.toggleClass( 'oo-ui-element-hidden', !isSmallScreen ); this.$content.toggleClass( 've-ui-mwTransclusionDialog-small-screen', isSmallScreen ); } else { - showSidebar = !this.isSingleTemplateTransclusion(); + expandSidebar = !this.isSingleTemplateTransclusion(); } - this.toggleSidebar( showSidebar ); + this.toggleSidebar( expandSidebar ); }; /** * Set if the sidebar is visible (which means the dialog is expanded), or collapsed. * - * @param {boolean} showSidebar + * @param {boolean} expandSidebar * @private */ -ve.ui.MWTransclusionDialog.prototype.toggleSidebar = function ( showSidebar ) { - if ( this.isSidebarExpanded === showSidebar ) { +ve.ui.MWTransclusionDialog.prototype.toggleSidebar = function ( expandSidebar ) { + if ( this.isSidebarExpanded === expandSidebar ) { return; } - this.isSidebarExpanded = showSidebar; + this.isSidebarExpanded = expandSidebar; this.$content - .toggleClass( 've-ui-mwTransclusionDialog-collapsed', !showSidebar ) - .toggleClass( 've-ui-mwTransclusionDialog-expanded', showSidebar ); + .toggleClass( 've-ui-mwTransclusionDialog-collapsed', !expandSidebar ) + .toggleClass( 've-ui-mwTransclusionDialog-expanded', expandSidebar ); var dialogSizeSidebarExpanded = this.useInlineDescriptions ? 'larger' : 'large'; var dialogSizeSidebarCollapsed = this.useNewSidebar ? dialogSizeSidebarExpanded : 'medium'; this.ignoreNextWindowResizeEvent = true; - this.setSize( showSidebar ? dialogSizeSidebarExpanded : dialogSizeSidebarCollapsed ); + this.setSize( expandSidebar ? dialogSizeSidebarExpanded : dialogSizeSidebarCollapsed ); - this.bookletLayout.toggleOutline( showSidebar ); + this.bookletLayout.toggleOutline( expandSidebar ); this.updateTitle(); this.updateModeActionState();