⚓ T313349 Allow special pages to register navigation links in skins
Page Menu
Phabricator
Create Task
Maniphest
T313349
Allow special pages to register navigation links in skins
Closed, Resolved
Public
Actions
Edit Task
Edit Related Tasks...
Create Subtask
Edit Parent Tasks
Edit Subtasks
Merge Duplicates In
Close As Duplicate
Edit Related Objects...
Edit Commits
Edit Mocks
Mute Notifications
Protect as security issue
Assigned To
Mabualruz
Authored By
Jdlrobson
Jul 19 2022, 7:02 PM
2022-07-19 19:02:25 (UTC+0)
Tags
MediaWiki-Core-Skin-Architecture (Menus 2.0)
(Backlog)
MediaWiki-Special-pages
(To triage)
Patch-For-Review
Web-Team-Backlog-Archived (Kanbanana-2022-23-Q1)
(Ready for Signoff)
MW-1.39-notes (1.39.0-wmf.28; 2022-09-05)
Referenced Files
F35321978: Screen Shot 2022-07-19 at 11.53.02 AM.png
Jul 19 2022, 7:02 PM
2022-07-19 19:02:26 (UTC+0)
F35321980: Screen Shot 2022-07-19 at 11.53.24 AM.png
Jul 19 2022, 7:02 PM
2022-07-19 19:02:26 (UTC+0)
Subscribers
Agabi10
Aklapper
alexhollender_WMF
Amire80
AMuigai
bwang
cjming
View All 20 Subscribers
Description
Currently special pages render a single "Special" tab. This appears in all skins, but position varies based on skin.
Going forward to support the work in
T286466
we would like to add SpecialPage::getSubpages. This method returns an array of sub pages that can be rendered by the skin in the UI. It works similar to
getSubpagesForPrefixSearch
but will usually be a subset of the pages returned by
getSubpagesForPrefixSearch
and in many cases will be an empty list.
Specification
The feature is opt in. Skins like Vector can continue to work as before
A new method SpecialPage::getRelatedNavigationLinks will be added to describe tabs. A page with no sub page will be described by an empty string. eg.
return ['Special:Watchlist', 'Special:Watchlist/raw'];
on Special:Watchlist would generate two tabs - one link to Special:Watchlist and one to Special:Watchlist/raw. An empty array will mean no tabs should be rendered. By default, the return value will be empty (e.g. no tabs)
A new method SpecialPage::getShortDescription will be added - this will allow special pages to define a label to describe the page that will be rendered as the text of the associated tab. By default it will use
subpagetab--
. For example Special:Watchlist/raw would be described by
subpagetab-watchlist-raw
. It will be stable to override this to change the label.
A new menu will be made available to skins in Skin:: buildContentNavigationUrlsInternal called "associatedPages". This can be used instead of the existing namespace key, but also contain definitions for subpages. This ensures the change is backwards compatible.
Sign off steps
It's important at least one of the special pages in core use this feature. We're targetting the Special:Contributions page as the first consumer (see
T286466
Details
Related Changes in Gerrit:
Subject
Repo
Branch
Lines +/-
Skin: Use camel case for menu name
mediawiki/core
master
+3
-3
LocalisationCache: Remove accidentally checked in code
mediawiki/core
master
+0
-17
SpecialPages: Can formally register navigation links
mediawiki/core
master
+126
-6
SpecialPages: "related" references updated to "associated"
mediawiki/core
master
+11
-11
Customize query in gerrit
Related Objects
Search...
Task Graph
Mentions
Status
Subtype
Assigned
Task
Resolved
ovasileva
T317884
[EPIC] Vector 2022 post-deployment work
Declined
ovasileva
T317632
[EPIC] Visual refinements pt2
Resolved
ovasileva
T313409
Hide article toolbar/tab-bar if there is only one item/tab
Open
None
T286641
Entry points to improve discoverability of Section Translation
Open
None
T296994
Observations from research study for Section Translation on Thai Wikipedia
Open
None
T311647
[Goal] Develop a new menu system API in core
Open
None
T322740
Contribute entry point
Resolved
Jdlrobson
T286466
Persistent contribution entry point on the mobile navigation menu
Resolved
Mabualruz
T313349
Allow special pages to register navigation links in skins
Mentioned In
T310700: Provide a way for extensions to add a "back to X" navigation element (above the page title)
T323309: Support Special page navigation links
T319327: [S] Make Special:Contribute the default entry point in the menu
T297536: Page hierarchy: Native support for navigation bar(links)
T315644: Global blocks should be treated as a subtype of blocks
T315562: [Maintenance request] CentralNotice should not use SkinTemplateNavigation hook to add special page tabs
T315553: AbuseFilter special pages should use new skin tab feature
T313409: Hide article toolbar/tab-bar if there is only one item/tab
Mentioned Here
T286466: Persistent contribution entry point on the mobile navigation menu
Event Timeline
Jdlrobson
created this task.
Jul 19 2022, 7:02 PM
2022-07-19 19:02:25 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
Jdlrobson
moved this task from
Incoming
to
Needs Prioritization (Tech)
on the
Web-Team-Backlog-Archived
board.
Jdlrobson
edited projects, added
Web-Team-Backlog-Archived (Needs Prioritization (Tech))
; removed
Web-Team-Backlog-Archived
gerritbot
added a comment.
Jul 19 2022, 10:37 PM
2022-07-19 22:37:01 (UTC+0)
Comment Actions
Change 813710 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):
[mediawiki/core@master] SpecialPages: Can formally register sub pages to the UI
gerritbot
added a project:
Patch-For-Review
Jul 19 2022, 10:37 PM
2022-07-19 22:37:02 (UTC+0)
Jdlrobson
moved this task from
Backlog
to
Menus
on the
Web-Team-Backlog-Archived (Needs Prioritization (Tech))
board.
Jul 19 2022, 10:37 PM
2022-07-19 22:37:09 (UTC+0)
Jdlrobson
added a parent task:
T313409: Hide article toolbar/tab-bar if there is only one item/tab
Jul 20 2022, 4:50 PM
2022-07-20 16:50:50 (UTC+0)
Jdlrobson
mentioned this in
T313409: Hide article toolbar/tab-bar if there is only one item/tab
Tgr
subscribed.
Edited
Jul 21 2022, 1:12 AM
2022-07-21 01:12:01 (UTC+0)
Comment Actions
Several special pages use
OutputPage::setSubtitle()
for a poor man's navigation menu (e.g.
or
), it would be nice if the new system could replace that. Note that these are not strictly subpages (see e.g. the AbuseFilter example) and might be context-dependent (e.g. if a sufficiently privileged user views
Special:OAuthListConsumers/view/xxx
, the navigation tab will link to
Special:OAuthConsumerRegistration/update/xxx
Special:OAuthManageConsumers/xxx
and
Special:OAuthManageMyGrants/update/yyy
). So maybe better to think of this as a generic navigation menu for special pages, and just fetch titles or URLs instead of subpage names in the API. (Another use case: if there is a navigation system similar to page tabs, I'd want to be able to navigate from Special:Delete/Foo to Foo and Talk:Foo.)
Agabi10
subscribed.
Jul 21 2022, 7:28 PM
2022-07-21 19:28:27 (UTC+0)
Jdlrobson
added a comment.
Jul 21 2022, 8:02 PM
2022-07-21 20:02:42 (UTC+0)
Comment Actions
Thanks for the input here
@Tgr
and the over usecase - that's super useful. Definitely want to get away from "poor man's navigation" so yes AbuseFilter would be a good fit here. It would implement the SpecialPage method (
I am leaning more towards the function being called getNavigationLinks() and expanding it to accept any wiki page title. If I get time I'll amend the core patch with that in mind tomorrow.
Jdlrobson
renamed this task from
Allow special pages to register "subpage tabs" that replace namespaces.
to
Allow special pages to register navigation links in skins
Jul 22 2022, 6:02 PM
2022-07-22 18:02:02 (UTC+0)
gerritbot
added a comment.
Jul 22 2022, 6:26 PM
2022-07-22 18:26:16 (UTC+0)
Comment Actions
Change 816209 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):
[mediawiki/skins/Vector@master] Enable related tabs on Vector
gerritbot
added a comment.
Jul 22 2022, 6:27 PM
2022-07-22 18:27:14 (UTC+0)
Comment Actions
Change 816211 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):
[mediawiki/extensions/AbuseFilter@master] Register AbuseFilter menu as standard tabs
Jdlrobson
added a comment.
Jul 22 2022, 6:28 PM
2022-07-22 18:28:41 (UTC+0)
Comment Actions
@Tgr
I can confirm the architecture now supports use on Special:AbuseFilter.
gerritbot
added a comment.
Aug 17 2022, 8:59 PM
2022-08-17 20:59:24 (UTC+0)
Comment Actions
Change 813710
merged
by jenkins-bot:
[mediawiki/core@master] SpecialPages: Can formally register navigation links
ReleaseTaggerBot
added a project:
MW-1.39-notes (1.39.0-wmf.26; 2022-08-22)
Aug 17 2022, 9:01 PM
2022-08-17 21:01:04 (UTC+0)
Jdlrobson
triaged this task as
Medium
priority.
Aug 18 2022, 6:15 AM
2022-08-18 06:15:01 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
Jdlrobson
edited projects, added
Web-Team-Backlog-Archived (Kanbanana-2022-23-Q1)
; removed
Web-Team-Backlog-Archived (Needs Prioritization (Tech))
Jdlrobson
added a subscriber:
Mabualruz
Comment Actions
Adding to sprint board.
@Mabualruz
I'm wondering if SpecialPage::getRelatedNavigationLinks should be renamed to SpecialPage::getAssociatedNavigationLinks. What do you think?
Jdlrobson
assigned this task to
Mabualruz
Aug 18 2022, 6:16 AM
2022-08-18 06:16:43 (UTC+0)
Mabualruz
added a comment.
Aug 18 2022, 7:01 AM
2022-08-18 07:01:38 (UTC+0)
Comment Actions
In
T313349#8164170
@Jdlrobson
wrote:
Adding to sprint board.
@Mabualruz
I'm wondering if SpecialPage::getRelatedNavigationLinks should be renamed to SpecialPage::getAssociatedNavigationLinks. What do you think?
I think we should that to make it more coherent, Still current gerrit patch is merged should I just open a new one ?
gerritbot
added a comment.
Aug 18 2022, 7:15 AM
2022-08-18 07:15:45 (UTC+0)
Comment Actions
Change 824393 had a related patch set uploaded (by Mabualruz; author: Mabualruz):
[mediawiki/core@master] SpecialPages: Can formally register navigation links
Jdlrobson
mentioned this in
T315553: AbuseFilter special pages should use new skin tab feature
Aug 18 2022, 12:14 PM
2022-08-18 12:14:11 (UTC+0)
gerritbot
added a comment.
Aug 18 2022, 12:33 PM
2022-08-18 12:33:59 (UTC+0)
Comment Actions
Change 824393
merged
by jenkins-bot:
[mediawiki/core@master] SpecialPages: "related" references updated to "associated"
Jdlrobson
mentioned this in
T315562: [Maintenance request] CentralNotice should not use SkinTemplateNavigation hook to add special page tabs
Aug 18 2022, 2:18 PM
2022-08-18 14:18:12 (UTC+0)
Jdlrobson
closed this task as
Resolved
Aug 18 2022, 9:32 PM
2022-08-18 21:32:26 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
Jdlrobson
moved this task from
Needs Analysis
to
Ready for Signoff
on the
Web-Team-Backlog-Archived (Kanbanana-2022-23-Q1)
board.
PatchDemoBot
added a comment.
Aug 23 2022, 9:12 PM
2022-08-23 21:12:24 (UTC+0)
Comment Actions
Test wiki
created
on
Patch demo
by Jdlrobson using patch(es) linked to this task:
PatchDemoBot
added a comment.
Aug 23 2022, 9:42 PM
2022-08-23 21:42:11 (UTC+0)
Comment Actions
Test wiki
created
on
Patch demo
by Jdlrobson using patch(es) linked to this task:
gerritbot
added a comment.
Aug 29 2022, 10:09 PM
2022-08-29 22:09:58 (UTC+0)
Comment Actions
Change 827599 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):
[mediawiki/core@master] LocalisationCache: Remove accidentally checked in code
nshahquinn-wmf
unsubscribed.
Aug 29 2022, 11:27 PM
2022-08-29 23:27:18 (UTC+0)
gerritbot
added a comment.
Aug 30 2022, 4:10 PM
2022-08-30 16:10:18 (UTC+0)
Comment Actions
Change 827599
merged
by jenkins-bot:
[mediawiki/core@master] LocalisationCache: Remove accidentally checked in code
ReleaseTaggerBot
edited projects, added
MW-1.39-notes (1.39.0-wmf.28; 2022-09-05)
; removed
MW-1.39-notes (1.39.0-wmf.26; 2022-08-22)
Aug 30 2022, 5:00 PM
2022-08-30 17:00:45 (UTC+0)
gerritbot
added a comment.
Aug 30 2022, 9:20 PM
2022-08-30 21:20:30 (UTC+0)
Comment Actions
Change 828096 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):
[mediawiki/core@master] Skin: Use camel case for menu name
gerritbot
added a comment.
Aug 30 2022, 10:05 PM
2022-08-30 22:05:12 (UTC+0)
Comment Actions
Change 828096
merged
by jenkins-bot:
[mediawiki/core@master] Skin: Use camel case for menu name
Tgr
mentioned this in
T315644: Global blocks should be treated as a subtype of blocks
Aug 31 2022, 12:51 AM
2022-08-31 00:51:50 (UTC+0)
Jdlrobson
mentioned this in
T297536: Page hierarchy: Native support for navigation bar(links)
Sep 6 2022, 10:41 PM
2022-09-06 22:41:12 (UTC+0)
Lens0021
awarded a token.
Sep 7 2022, 12:24 AM
2022-09-07 00:24:32 (UTC+0)
matmarex
mentioned this in
T319327: [S] Make Special:Contribute the default entry point in the menu
Nov 7 2022, 5:54 PM
2022-11-07 17:54:07 (UTC+0)
Mainframe98
mentioned this in
T323309: Support Special page navigation links
Nov 17 2022, 6:43 PM
2022-11-17 18:43:37 (UTC+0)
PatchDemoBot
added a comment.
Feb 3 2023, 3:42 PM
2023-02-03 15:42:46 (UTC+0)
Comment Actions
Test wiki on
Patch demo
by Jdlrobson using patch(es) linked to this task was
deleted
PatchDemoBot
added a comment.
Feb 3 2023, 3:43 PM
2023-02-03 15:43:10 (UTC+0)
Comment Actions
Test wiki on
Patch demo
by Jdlrobson using patch(es) linked to this task was
deleted
Daimona
mentioned this in
T310700: Provide a way for extensions to add a "back to X" navigation element (above the page title)
Jun 6 2024, 12:59 PM
2024-06-06 12:59:16 (UTC+0)
Log In to Comment
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct.
Wikimedia Foundation
Code of Conduct
Disclaimer
CC-BY-SA
GPL
Credits