WMDE Technical Wishes/Line Numbering

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Line Numbering
Status Deployed on all wikis with syntax highlighting; only for the template namespace
Focus area Templates
Phabricator T267911
Responsible Technical Wishes Team

This page is for documenting the development progress, research and discussions about the project "Line numbering for the wikitext editor". Comments and questions are welcome on the talk page!

Description[edit]

As of June 2018, Syntax highlighting uses color to make it easier to visually separate article text from the code for links, references and templates, when editing wikitext. Syntax highlighting mode can be turned on and off in the editing toolbar with the OOjs UI icon highlight.svg highlighter icon. The CodeMirror software behind it is also the basis for the highlighting of matching brackets.

CodeMirror also provides the simple ability to display line numbering. This brings two main benefits - especially helpful for templates, but also applicable to other types of pages:

  • It makes it easier to refer to a line in discussions
  • It shows where line breaks are at a glance

The Technical Wishes team has therefore enabled line numbering when syntax highlighting (CodeMirror) is turned on. On most wikis, it is only available in the template namespace, and on some wikis in all namespaces. If you want your wiki to have line numbering in all namespaces, please reach out to us on the talk page.

Implementation[edit]

If syntax highlighting is enabled in the editor, a gray bar with line numbering is displayed on the left edge of the editor. If syntax highlighting is disabled, then line numbering is also disabled.


Status and roadmap[edit]

  • Green tickYApril 13-15, 2021: deployment
    • on all wikis which have syntax highlighting (CodeMirror extension). Right-to-left wikis currently aren't using CodeMirror.
    • only for the template namespace
  • Green tickYSeptember 29, 2021: deployment on all namespaces for these wikis:
    • German Wikipedia
    • Catalan Wikipedia
    • Wikitech
    • all group 0 wikis (including mediawiki.org and testwiki)
    • If your wiki wants line numbering on all namespaces as well, let us know on the talk page!