Minerva provides a config flag [[ https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/README.md#wgminervapageactions | MinervaPageActions ]] which can be used to hide some UI elements (for example the Talk action).
On the standard mode the Talk action is accessible via talk button near page footer. When the MinervaPageActions is set to not show TALK action, the button is not visible.
The AMC mode provides a nicer way and it shows tabs just below page Title. Sadly those tabs do not respect the config flag, and even when we remove the `talk` option from `MinervaPageActions` flag, the `Discussion` tab still appears.
Reproduction steps:
- remove `talk` from `MinervaPageActions` config
- log in as AMC user
- go to any article
Expected result: `Discussion` tab shouldn't be visible
Current result: `Discussion` tab is visible.
This bug is related to the PHP, issue will exist in any browser. No need to verify different browsers behavior.
####Developer notes
The tabs are generated from `$tpl['content_navigation']['namespaces']` array. The `content_navigation` array is created by [[ https://github.com/wikimedia/mediawiki/blob/67d01c452da591faced0a4be7940acf4f3292928/includes/skins/SkinTemplate.php#L879 | SkinTemplate::buildContentNavigationUrls ]].
Most probably, the easiest way to handle this is to
- overlad the `buildContentNavigationUrls` in `SkinMinerva` class
- use `Minerva.Permissions` to verify `isAllowed( TALK )`
- when it's not allowed, unset the talk related keys from `content_navigation']['namespaces']`
That approach is necessary, because extensions like GrowthExperiments use `SkinTemplateNavigation::Universal` hook to override talk tabs,