Background
It is not possible for extensions to extend the page actions menu in Minerva. This means it's currently not possible to add the bookmark link to the desired place in Minerva.
User story
As a developer of the reading list I want to add a bookmark to the menu next to the edit icon (or to replace the watch star).
Requirements
The following code adds a bookmark icon to the Vector skin with the desired markup:
$wgHooks['SkinTemplateNavigation::Universal'][] = function ( $t, &$s ) {
$s['views']['bookmark'] = [
'icon' => 'bookmark',
'text' => 'bookmark',
'href' => '/wiki/Foo'
];
};On mobile it has no effect.
The MediaWiki\Minerva\Menu\PageActions\ToolbarBuilder::getGroup method currently ignores the hook and provides custom logic for its construction. This should be revised so that any defined link which has an icon is included.
BDD
Feature: Extend Minerva page actions menu for custom links
Scenario: Default page actions appear in the Minerva menu
Given I visit a page using the Minerva skin
When the page loads
Then the page actions menu displays the download PDF, watch, and edit icons
Scenario: Custom bookmark icon is added via extension
Given the extension hook for adding a bookmark link is enabled
When I visit a Minerva page
Then the page actions menu displays a bookmark icon with the correct markup
Scenario: Ellipsis menu appears when AMC is enabled
Given AMC is enabled
When I view the page actions menu in Minerva
Then an ellipsis menu is displayedTest Steps
Test Case 1: Verify default page actions in Minerva menu
- Visit any page using the Minerva skin.
- Confirm that the page actions menu displays the download PDF, watch, and edit icons.
- AC1: Confirm that these default icons are present.
⸻
Test Case 2: Verify custom bookmark icon via extension hook
- Enable the following hook code in LocalSettings or a test extension:
$wgHooks['SkinTemplateNavigation::Universal'][] = function ( $t, &$s ) {
$s['views']['bookmark'] = [
'icon' => 'bookmark',
'text' => 'bookmark',
'href' => '/wiki/Foo'
];
};- Visit a page using the Minerva skin.
- Confirm that the page actions menu now includes the bookmark icon with the correct icon and link.
- AC2: Confirm the bookmark icon is visible next to the existing actions.
⸻
Test Case 3: Verify ellipsis menu appears with AMC enabled
- Enable AMC (the relevant configuration for AMC) on the test environment.
- Visit a page using the Minerva skin.
- Confirm that an ellipsis menu appears in the page actions menu.
- AC3: Confirm the ellipsis menu is present when AMC is enabled.
Design
- Add mockups and design requirements
Acceptance criteria
In the Minerva skin:
- The download pdf, watch, edit icons are in the menu
- When the code in requirements is run a bookmark icon also shows
- when amc is enabled I see an ellipsis menu
Communication criteria - does this need an announcement or discussion?
- Add communication criteria
Rollback plan
- What is the rollback plan in production for this task if something goes wrong?
QA Results - Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T388909#10702071 |
| 2 | ✅ | T388909#10702071 |
| 3 | ✅ | T388909#10702071 |
QA Results - Prod
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T388909#10711291 |
| 2 | ✅ | T388909#10711291 |
| 3 | ✅ | T388909#10711291 |
This task was created by Version 1.2.0 of the Web team task template using phabulous



