[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Also set toplinks-collapsed class if no cookie
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380654 ) Change subject: RCFilters: Also set toplinks-collapsed class if no cookie .. RCFilters: Also set toplinks-collapsed class if no cookie If the cookie was not set, the PHP code treated that as "expanded", but the JS code treated it as "collapsed". Fix the PHP code. Bug: T176380 Change-Id: Iff9b865bd20a571ade2ae619cbb5b3a70629003c --- M includes/specials/SpecialRecentchanges.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Sbisson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 34a7714..8c2dd56 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -658,7 +658,8 @@ if ( $this->isStructuredFilterUiEnabled() ) { // Check whether the widget is already collapsed or expanded $collapsedState = $this->getRequest()->getCookie( 'rcfilters-toplinks-collapsed-state' ); - $collapsedClass = $collapsedState === 'collapsed' ? 'mw-rcfilters-toplinks-collapsed' : ''; + // Note that an empty/unset cookie means collapsed, so check for !== 'expanded' + $collapsedClass = $collapsedState !== 'expanded' ? 'mw-rcfilters-toplinks-collapsed' : ''; $contentTitle = Html::rawElement( 'div', [ 'class' => 'mw-recentchanges-toplinks-title ' . $collapsedClass ], -- To view, visit https://gerrit.wikimedia.org/r/380654 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff9b865bd20a571ade2ae619cbb5b3a70629003c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Sbisson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Also set toplinks-collapsed class if no cookie
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380654 ) Change subject: RCFilters: Also set toplinks-collapsed class if no cookie .. RCFilters: Also set toplinks-collapsed class if no cookie If the cookie was not set, the PHP code treated that as "expanded", but the JS code treated it as "collapsed". Fix the PHP code. Bug: T176380 Change-Id: Iff9b865bd20a571ade2ae619cbb5b3a70629003c --- M includes/specials/SpecialRecentchanges.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/54/380654/1 diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 34a7714..8c2dd56 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -658,7 +658,8 @@ if ( $this->isStructuredFilterUiEnabled() ) { // Check whether the widget is already collapsed or expanded $collapsedState = $this->getRequest()->getCookie( 'rcfilters-toplinks-collapsed-state' ); - $collapsedClass = $collapsedState === 'collapsed' ? 'mw-rcfilters-toplinks-collapsed' : ''; + // Note that an empty/unset cookie means collapsed, so check for !== 'expanded' + $collapsedClass = $collapsedState !== 'expanded' ? 'mw-rcfilters-toplinks-collapsed' : ''; $contentTitle = Html::rawElement( 'div', [ 'class' => 'mw-recentchanges-toplinks-title ' . $collapsedClass ], -- To view, visit https://gerrit.wikimedia.org/r/380654 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff9b865bd20a571ade2ae619cbb5b3a70629003c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits