Page MenuHomePhabricator

JSON-based page list
Open, Needs TriagePublicFeature


Feature summary (what you would like to be able to do and where):

Allow users to store JSON-based page lists in (both local and Commons) data namespace (see: T252711, T305571). A page list is a JSON list, which each entries having the following information: (either Title or QID is required)

  • Title - The displayed name of the entry (without disambiguation); by default the label of the Wikidata item
  • QID - The Wikidata QID of the topic
  • page name - Name of local pages of the entry; by default the sitelink of the Wikidata item (may be non-existent, see T123021), or if QID is not defined, the title
  • Any other fields users may define, including free-form Wikitext (T134658: Allow wiki markup data type)
    • This may include some fields that are populated by Wikidata, but can be overrided locally

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

To populate lists like

A more complex case is, which is a table-based list, and contains an extract of one of its section in plain list form.

This will allow user to create lists like Currently they can only be edited as raw Wikitext (and there are cases that some careless edits will mess up the wikitable syntax). Wikitable is not machine-readable either. With a JSON-based page list, spreadsheet-like cell editing can be used (T134618: Epic: Implement spreadsheet-like cell editing for tabular data)

Benefits (why should this be implemented?):

  • Allow the same list be included in different pages
  • Allow building navboxes from a given list, or a part thereof (e.g. most of navboxes in can be extracted from Wikipedia articles)
  • A more user-friendly editing interface
  • Wikidata-based error checking (both ways - a report of inconsistency may indicate errornous or outdated data in local wiki or Wikidata)
  • List will be machine-readable, and importable/exportable (T134617: Implement CSV/TSV import/export for tabular data set)
  • Reduce the workload of disambiguation (e.g. if a name exists in 10 lists, moving the page will require changes to 10 pages; also see the list of navboxes of Chuck Schumer above, if the page is moved all navboxes must be updated manually)

Note this is different from Wikidata-based automatic list (T67626: [Epic] Support for queries on-wiki (automated list generation)) in the following ways:

  • Wikidata does not allow user to store free form Wikitext but many lists such as contains free form Wikitext.
  • Wikidata-based automatic list require users to match all entries to Wikidata items (and create one if not exists), which is difficult for existing lists (e.g. list of members of organizations, such as List of 2016 United States presidential electors above) with hundreds of entries. (In Chinese Wikipedia, there are hundreds of such navboxes.)
  • Some lists are either stable (such as List of 2016 United States presidential electors above; the actual entries never changes, though the page names may be moved due to disambiguation), or updated very infrequently (such as list of US presidents). Use a stable list will reduce the potential of vandalism.