Merge "Show warning when user tries to use enhanced RecentChanges view"

This commit is contained in:
jenkins-bot 2019-07-31 17:34:52 +00:00 committed by Gerrit Code Review
commit bff670e545
3 changed files with 14 additions and 2 deletions

View File

@ -66,5 +66,7 @@
"skin-minerva-mobile-option-MinervaEnableBackToTop": "Jump to top",
"skin-minerva-mobile-option-MinervaEnableBackToTop-description": "Jump to top of the current page using a floating button",
"skin-minerva-mobile-option-MinervaPageIssuesNewTreatment": "Improved page issues treatment",
"skin-minerva-mobile-option-MinervaPageIssuesNewTreatment-description": "Page issues (Template:ambox) will be inlined in the article."
"skin-minerva-mobile-option-MinervaPageIssuesNewTreatment-description": "Page issues (Template:ambox) will be inlined in the article.",
"skin-minerva-recentchanges-warning-enhanced-not-supported": "Unfortunately, grouping results by page is not available on mobile. If you would like to use the group by page feature please visit the desktop site."
}

View File

@ -75,5 +75,6 @@
"skin-minerva-mobile-option-MinervaEnableBackToTop": "Label for jump to top mobile web beta feature",
"skin-minerva-mobile-option-MinervaEnableBackToTop-description": "Description label for jump to top mobile web beta feature",
"skin-minerva-mobile-option-MinervaPageIssuesNewTreatment": "Title for page issues feature flag displayed in Special:MobileOptions",
"skin-minerva-mobile-option-MinervaPageIssuesNewTreatment-description": "Description shown on Special:MobileOptions for page issues beta feature."
"skin-minerva-mobile-option-MinervaPageIssuesNewTreatment-description": "Description shown on Special:MobileOptions for page issues beta feature.",
"skin-minerva-recentchanges-warning-enhanced-not-supported": "Warning message when informing about lack of '''group results by page''' feature availability on on mobile site. Message should recommend visiting desktop site to access grouping results by page."
}

View File

@ -193,6 +193,15 @@ class MinervaHooks {
'skins.minerva.mainMenu.styles',
] );
break;
case 'Recentchanges':
$isEnhancedDefaultForUser = $special->getUser()->getOption( 'usenewrc' );
$enhanced = $request->getBool( 'enhanced', $isEnhancedDefaultForUser );
if ( $enhanced ) {
$out->addHTML( Html::warningBox(
$special->msg( 'skin-minerva-recentchanges-warning-enhanced-not-supported' )
) );
}
break;
case 'Userlogin':
case 'CreateAccount':
// Add default warning message to Special:UserLogin and Special:UserCreate