Page MenuHomePhabricator

Create a Special:Namespaces page
Open, LowPublic

Assigned To
None
Authored By
MJL
Sep 22 2020, 2:07 AM
Referenced Files
None
Tokens
"Like" token, awarded by Dringsim."Love" token, awarded by apaskulin."Love" token, awarded by MJL."Like" token, awarded by Mainframe98."Yellow Medal" token, awarded by Kizule."Doubloon" token, awarded by Reedy.

Description

Look, there are a lot of namespaces across many more wikis. It's hard to keep track of them all and their various properties, so I just want to see something like Special:ListGroupRights for namespaces.

I'm looking for a table that would be (using Scots Wikipedia as an example):

IndexNamespaceProperties
0Main$hooks
1TalkAssociated talk page for Main
2User$hooks
3User talkAssociated talk page for User
4Wikipedia$hooks
5Wikipedia talkAssociated talk page for Wikipedia
6File$hooks
7File talkAssociated talk page for File
8MediaWiki$hooks
9MediaWiki talkAssociated talk page for MediaWiki
10Template$hooks
11Template talkAssociated talk page for Template
12Help$hooks
13Help talkAssociated talk page for Help
14Category$hooks
15Category talkAssociated talk page for Category
100Portal$hooks
101Portal talkAssociated talk page for Portal
102Define$hooks
103Define talkAssociated talk page for Define
828Module$hooks
829Module talkAssociated talk page for Module
2300Gadget$hooks
2301Gadget talkAssociated talk page for Gadget
2302Gadget definition$hooks
2303Gadget definition talkAssociated talk page for Gadget definition
IndexNamespaceProperties
-1Special???
-2MediaFiles/Images.

Related/Other open tasks

Event Timeline

What are $hooks?

I suspect if we're going to do something like this, it should list aliases too

It's all public information, and is available through the API - https://sco.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces|namespacealiases

Might be worth including other information that API module includes too... Namespace protections, content models, subpages etc. Basically anything that someone might want to know, but it shouldn't require a human to poke the API, or look at the wiki config to find out

Shouldn't be too difficult to implement though!

@Reedy if I send a patch, would you be willing to review?

@Reedy if I send a patch, would you be willing to review?

Yeah. I think it's something reasonably valuable to have

DannyS712 triaged this task as Low priority.

Might be worth thinking about maybe adding a "description" message for the namespace and it's user talk too

Especially if they're implemented by extensions and such, being able to link to docs on what they do etc

And then for site specific stuff, we can add messages to WikimediaMessages

(Yes, scope creep)

I'm thinking something like

idCanonical nameLocal nameDescriptionProperties
0(main)(main)Main namespace
1TalkTalkTalk pages for the main namespace
8MediaWikiMediaWikiNamespace controlling the display interfaceNamespace protection: editinterface
2302Gadget definitionGadget definitionDefinitions of site gadgetsDefault content model: GadgetDefinition

(for English, Canonical=Local so maybe don't include the canonical column?)
We can also include under properties if there are subpages enabled, if it is a content namespace, and if it is nonincludable

Messages for the descriptions should be added by extensions that add the namespaces, falling back to the default of something like "Custom namespace from an installed extension"

Love it.

@DannyS712 Maybe for 0 it could make use of the message from MediaWiki:Blanknamespace, since that's what folks will locally see most often. I can imagine '' would be useful for the literal sense.

I made this task on a whim without any expectation that people would actually review it. I can't believe there's a chance it might get implemented! [0_0]

I'm so excited now!! <3

I must admit, this is one of these "Why haven't we done this already?" ;)

Change 637656 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Add Special:NamespaceInfo

https://gerrit.wikimedia.org/r/637656

I'm sorry that I haven't handled this task. I recently returned from a long bout of unexpected inactivity, and while I plan to resume my contributions here on Phabricator its unfair to claim tasks that I might not work on when others may be interested in handling them. I'm removing myself as the assignee in a batch-action, but if someone feels that I really should be the one to handle this task feel free to re-assign me and I'll take a look.

I just encountered Template:Namespaces on https://en.wikipedia.org/wiki/Wikipedia:Administration#Data_structure_and_development (and other pages), and I immediately thought it should exist as a Special: page on all wikis. In the past, I've struggled with figuring out the actual namespaces and their IDs for mediawiki.org and wikitech.wikimedia.org (especially because on the latter there are some pages with titles that masquerade as namespaces, like Portal:). Having an easily accessible list of namespaces like this would make it easier to understand and manage content on our technical wikis...without having to "poke the API or look at the wiki config". Also, even if you do poke the API or look at the config, the template's table format is just so much lovelier and easier to quickly understand.

Test wiki created on Patch demo by 沈澄心 using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/5f89f222b0/w