From 4782987a7f4b42eab54343228eaf3e365d622c29 Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Mon, 18 Jul 2022 16:36:37 +0200 Subject: [PATCH] Rename confusing "isSet" to "active page indicator" We would love to name this state "selected", but that term is already used for a template parameter that is checked/used. The idea of "set" was to have a list of parameters where one is "set". But the word is confusing. I suggest "active page" because the entire purpose of the blue selection is to highlight the currently active page (i.e. the one you currently interact with on the right side of the dialog) in the sidebar. Change-Id: I5a16ab4c193ea05c21bb3bf89ada2ef550d8d6bc --- .../styles/widgets/ve.ui.MWTransclusionOutlineWidget.less | 6 +++--- .../ve.ui.MWTransclusionOutlineParameterSelectWidget.js | 4 ++-- .../widgets/ve.ui.MWTransclusionOutlineParameterWidget.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/ve-mw/ui/styles/widgets/ve.ui.MWTransclusionOutlineWidget.less b/modules/ve-mw/ui/styles/widgets/ve.ui.MWTransclusionOutlineWidget.less index 830b857763..7325c82605 100644 --- a/modules/ve-mw/ui/styles/widgets/ve.ui.MWTransclusionOutlineWidget.less +++ b/modules/ve-mw/ui/styles/widgets/ve.ui.MWTransclusionOutlineWidget.less @@ -148,9 +148,9 @@ color: @on-click-text-color; } - &.ve-ui-mwTransclusionOutlineParameterWidget-isSet, - &.ve-ui-mwTransclusionOutlineParameterWidget-isSet:hover, - &.ve-ui-mwTransclusionOutlineParameterWidget-isSet.oo-ui-optionWidget-highlighted { + &.ve-ui-mwTransclusionOutlineParameterWidget-activePage, + &.ve-ui-mwTransclusionOutlineParameterWidget-activePage:hover, + &.ve-ui-mwTransclusionOutlineParameterWidget-activePage.oo-ui-optionWidget-highlighted { background-color: @selected-background; color: @selected-text-color; } diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterSelectWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterSelectWidget.js index acce5eeaeb..1a28ef22ac 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterSelectWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterSelectWidget.js @@ -123,10 +123,10 @@ ve.ui.MWTransclusionOutlineParameterSelectWidget.prototype.setParameter = functi this.itemSet = paramName; if ( currentItem ) { - currentItem.setParameter( false ); + currentItem.toggleActivePageIndicator( false ); } if ( newItem ) { - newItem.setParameter( true ); + newItem.toggleActivePageIndicator( true ); } }; diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterWidget.js index 1f1099cc37..4981c79cba 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterWidget.js @@ -76,8 +76,8 @@ ve.ui.MWTransclusionOutlineParameterWidget.prototype.setSelected = function ( st /** * @param {boolean} state */ -ve.ui.MWTransclusionOutlineParameterWidget.prototype.setParameter = function ( state ) { - this.$element.toggleClass( 've-ui-mwTransclusionOutlineParameterWidget-isSet', state ); +ve.ui.MWTransclusionOutlineParameterWidget.prototype.toggleActivePageIndicator = function ( state ) { + this.$element.toggleClass( 've-ui-mwTransclusionOutlineParameterWidget-activePage', state ); }; /**