| 1 | MinervaNeue skin |
| 2 | ======================== |
| 3 | |
| 4 | The MinervaNeue skin is a responsive mobile-first skin for your mediawiki instance. |
| 5 | |
| 6 | Installation |
| 7 | ------------ |
| 8 | |
| 9 | See <https://www.mediawiki.org/wiki/Skin:MinervaNeue> |
| 10 | |
| 11 | Development |
| 12 | ----------- |
| 13 | |
| 14 | ### Coding conventions |
| 15 | |
| 16 | Please follow the coding conventions of MobileFrontend: |
| 17 | <https://www.mediawiki.org/wiki/MobileFrontend/Coding_conventions> |
| 18 | |
| 19 | ### Config |
| 20 | |
| 21 | The following configuration options will apply only to the default mobile skin - Minerva. |
| 22 | |
| 23 | #### $wgMinervaAlwaysShowLanguageButton |
| 24 | |
| 25 | * Type: `Boolean` |
| 26 | * Default: `true` |
| 27 | |
| 28 | Whether to show the language switcher button even if no languages are available |
| 29 | for the page. |
| 30 | |
| 31 | #### $wgMinervaEnableSiteNotice |
| 32 | |
| 33 | * Type: `Boolean` |
| 34 | * Default: `false` |
| 35 | |
| 36 | Controls whether site notices should be shown. |
| 37 | See <https://www.mediawiki.org/wiki/Manual:$wgSiteNotice>. |
| 38 | |
| 39 | #### $wgMinervaShowCategories |
| 40 | |
| 41 | * Type: `Array` |
| 42 | * Default: |
| 43 | ```php |
| 44 | [ |
| 45 | 'base' => false, |
| 46 | 'beta' => true, |
| 47 | ] |
| 48 | ``` |
| 49 | Controls whether the category button should be displayed. |
| 50 | |
| 51 | #### $wgMinervaDonateLink |
| 52 | |
| 53 | * Type: `Array` |
| 54 | * Default: |
| 55 | ```php |
| 56 | [ |
| 57 | 'base' => true, |
| 58 | ] |
| 59 | ``` |
| 60 | |
| 61 | When enabled a donate link will be added to the main menu. The donate link uses the `sitesupport` and `sitesupport-url` mediawiki messages. |
| 62 | |
| 63 | #### $wgMinervaTalkAtTop |
| 64 | |
| 65 | * Type: `Array` |
| 66 | * Default: |
| 67 | ```php |
| 68 | [ |
| 69 | 'beta' => false, |
| 70 | 'base' => false, |
| 71 | 'amc' => true, |
| 72 | ] |
| 73 | ``` |
| 74 | Controls whether the talk option should be displayed at the top of the page. |
| 75 | This will work for all pages except the main page. |
| 76 | |
| 77 | #### $wgMinervaHistoryInPageActions |
| 78 | |
| 79 | * Type: `Array` |
| 80 | * Default: |
| 81 | ```php |
| 82 | [ |
| 83 | 'beta' => false, |
| 84 | 'base' => false, |
| 85 | 'amc' => true, |
| 86 | ] |
| 87 | ``` |
| 88 | Controls whether the history link appears in the page actions menu. |
| 89 | |
| 90 | #### $wgMinervaAdvancedMainMenu |
| 91 | * Type: `Array` |
| 92 | * Default: |
| 93 | ```php |
| 94 | [ |
| 95 | 'beta' => false, |
| 96 | 'base' => false, |
| 97 | 'amc' => true, |
| 98 | ] |
| 99 | ``` |
| 100 | Controls whether the main menu is expanded to contain recent changes and various options |
| 101 | that require login are removed. Note, should be enabled alongside `$wgMinervaPersonalMenu` to avoid losing access to features (in particular logout button). |
| 102 | |
| 103 | #### $wgMinervaPersonalMenu |
| 104 | * Type: `Array` |
| 105 | * Default: |
| 106 | ```php |
| 107 | [ |
| 108 | 'beta' => false, |
| 109 | 'base' => false, |
| 110 | 'amc' => true, |
| 111 | ] |
| 112 | ``` |
| 113 | Controls whether a personal menu appears in the header chrome. This menu contains pages such as Special:Watchlist. Note, should be enabled alongside `$wgMinervaAdvancedMainMenu` to avoid duplicating links to functionality as many of the links duplicate links in the standard main menu. Note a sandbox link will be present if the extension `SandboxLink` is enabled. |
| 114 | |
| 115 | #### $wgMinervaOverflowInPageActions |
| 116 | |
| 117 | * Type: `Array` |
| 118 | * Default: |
| 119 | ```php |
| 120 | [ |
| 121 | 'beta' => false, |
| 122 | 'base' => false, |
| 123 | 'amc' => false, |
| 124 | ] |
| 125 | ``` |
| 126 | Controls whether the overflow link appears in the page actions menu. |
| 127 | |
| 128 | #### $wgMinervaAlwaysShowLanguageButton |
| 129 | |
| 130 | * Type: `Boolean` |
| 131 | * Default: `true` |
| 132 | |
| 133 | Whether to show the language switcher button even if no languages are available for the page. |
| 134 | |
| 135 | #### $wgMinervaABSamplingRate |
| 136 | |
| 137 | * Type: `Number` |
| 138 | * Default: `0` |
| 139 | |
| 140 | On a scale of 0 to 1, determines the chance a user has of entering an AB test. |
| 141 | A test is divided into 3 buckets, "control" "A" and "B". Users that are selected for the |
| 142 | test have an equal chance of entering bucket "A" or "B", the remaining users fall into the |
| 143 | "control" bucket and are excluded from the test. |
| 144 | |
| 145 | 1 - would run test on 100% of users (50% in A and 50% in B, 0 in control). |
| 146 | 0.5 - would run test on 50% of users (25% in A, 25% in B, 50% in control). |
| 147 | 0.05 - would run test on 5% of users (2.5% in A, 2.5% in B, 95% in control). |
| 148 | 0 would disable the test and place all users in "control". |
| 149 | |
| 150 | Group assignment is universal no matter how many tests are running since both |
| 151 | `wgMinervaABSamplingRate` and `mw.user.sessionId()` are globals. |
| 152 | |
| 153 | Group membership can be debugged from the console via: |
| 154 | |
| 155 | ```js |
| 156 | const AB = require('skins.minerva.scripts/AB') |
| 157 | new AB({ |
| 158 | testName: 'WME.PageIssuesAB', |
| 159 | samplingRate: mw.config.get( 'wgMinervaABSamplingRate', 0 ), |
| 160 | sessionId: mw.user.sessionId() |
| 161 | }).getBucket() |
| 162 | ``` |
| 163 | |
| 164 | And since session ID is an input in calculating the group, reassignment occurs |
| 165 | when clearing it: `mw.storage.session.remove('mwuser-sessionId')`. |
| 166 | |
| 167 | #### $wgMinervaNightMode |
| 168 | |
| 169 | * Type: `array` |
| 170 | * Default: |
| 171 | ```php |
| 172 | [ |
| 173 | 'base' => false, |
| 174 | ] |
| 175 | ``` |
| 176 | |
| 177 | Temporary feature flag for enabling the night mode feature. |
| 178 | |
| 179 | |
| 180 | #### $wgMinervaNightModeOptions |
| 181 | |
| 182 | * Type: `array` |
| 183 | * Default: |
| 184 | ```php |
| 185 | [ |
| 186 | "exclude" => [ |
| 187 | "mainpage" => false, |
| 188 | "querystring" => [], |
| 189 | "namespaces" => [], |
| 190 | "pagetitles" => [] |
| 191 | ] |
| 192 | ] |
| 193 | ``` |
| 194 | |
| 195 | Allows the disabling of the night theme on certain pages. |
| 196 | NOTE: Vector skin must be enabled to use this functionality. |