User story
As reader and editor I want to see the same custom footnote marker styling on both parser outputs and in VisualEditor
Background
Some messages in the i18n system are not used for actual translations but offer a way to manipulate the DOM structure of HTML the the Cite legacy renderer generates. In many cases this is not compatible with Parsoid parsing and VisualEditor. Customization should if possible, be done using CSS rules that apply to all parsers and the VE UI.
This task deals only with the cite_reference_link footnote mark i18n message which is lightly customized on a handful of wikis.
cite_reference_link
Current default message:
<sup id=\"$1\" class=\"reference\">[[#$2|<span class=\"cite-bracket\">[</span>$3<span class=\"cite-bracket\">]</span>]]</sup>
Purpose:
Renders the superscript footnote marker with square brackets and a link.
Known customizations:
3 sites customize this message to achieve:
- Removing square brackets
- Smaller font size ( ur.wp message )
- Custom margin to the text ( es.wp message & es.wp usages )
4 sites only hold a copy of some version of that message without customization. These could be removed right away from the projects.
Suggested alternatives:
- Can be deprecated after T376717: Find a solution for Parsoid read views on projects that prefer `1` over `[1]` is fully deployed. Bracket styling should be applied to .cite-bracket, marker styling should be applied to .reference .
Migration plan
The following general phases can be considered:
- <span class="cite-bracket"> becomes available by default in all rendering views: legacy parser, parsoid, and visual editor. Remaining work: T376717: Find a solution for Parsoid read views on projects that prefer `1` over `[1]`
- Site interface admins add new rules which style the brackets as they wish.
- Site interface admins should remove deprecated messages so that the new Cite HTML structure becomes available.
- Cite legacy parser stops using the i18n message.