Page MenuHomePhabricator

Implement bracket matching in CodeMirror behind a feature flag
Closed, ResolvedPublic8 Estimated Story Points

Description

Background
This feature is part of the WMDE TechWish project "Making working with templates easier". It is specifically about improving template syntax and the ability to create and maintain templates. It will be implemented as a part of the syntax highlighter of the CodeMirror extension.

Requirements

  • Enable standard bracket matching CodeMirror add-on
  • Highlight a single bracket and its match/pair, including [ { ( type brackets, when cursor is next to a bracket (standard behavior)
  • Add section highlighting, where a cursor at an arbitrary position highlights the two most innermost brackets, see mock below.
  • All of the above requirements must be fully functional in the 2010 wikitext editor, looking and behaving the same way
  • Implement behind feature flag
  • Enable in syntax highlighter by default
Bracket matchingSection highlighting

Scope
Excludes:

  • VisualEditor, see T269094
  • Highlighting groups of linked brackets in either pairs or triples, for example {{{ }}} or [[ ]]
  • Tag matching
  • Unmatched bracket error highlighting

Implementation plan
Release on small number of wikis first (see T270238), validate, then roll out to all wikis.

Release schedule is still TBD (likely Jan/Feb 2021). Do not release until date has been set by Product.

Communication
Project page on meta

Notes:

Existing commits from prototyping

Related Objects

Event Timeline

Lena_WMDE renamed this task from Implement bracket matching on the beta cluster to Implement bracket matching.Sep 7 2020, 10:14 AM
Lena_WMDE updated the task description. (Show Details)
Lena_WMDE renamed this task from Implement bracket matching to Implement bracket matching on first wikis.Nov 16 2020, 10:28 AM
Lena_WMDE updated the task description. (Show Details)
Lena_WMDE renamed this task from Implement bracket matching on first wikis to Implement bracket matching in CodeMirror extension on first wikis.Nov 16 2020, 10:48 AM
Lena_WMDE updated the task description. (Show Details)
Lena_WMDE set the point value for this task to 8.Dec 1 2020, 10:21 AM

Change 647320 had a related patch set uploaded (by Svantje Lilienthal; owner: Awight):
[mediawiki/extensions/CodeMirror@master] Added bracket matching

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

thiemowmde renamed this task from Implement bracket matching in CodeMirror extension on first wikis to Implement bracket matching in CodeMirror behind a feature flag.Dec 16 2020, 9:17 AM
thiemowmde updated the task description. (Show Details)

Change 647320 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Added bracket matching

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