User:PPelberg (WMF)/sandbox

List items are fragile in wikitext, and there are many things (e.g., tables and images) that cannot be effectively embedded in lists. The Editing Team and Parsing Team are seeking your input on a proposal to introduce new wikitext syntax that will eliminate the aforementioned constraint and unlock new possibilities for people using wikitext talk pages.

You can find information about what is being proposed and how you can help shape it below.

Participate
The teams need to know what you think about this proposal. Specifically, the team is curious to know how you will answer the following questions:
 * 1) Of the proposals listed below, which do you think would best satisfy the requirements?
 * 2) What alternative approaches do you think should be considered?
 * 3) For each of the proposals listed below, what other advantages, disadvantages and/or unknowns do you think should be considered?

In addition to the above, the teams would also value hearing what other questions and ideas the proposals lead you to think about.

You can provide input by doing the following:
 * Posting on this page's talk page: LINK.
 * Posting to this ticket in Phabricator: LINK.

RFC process
The purpose of a technical RFC is to make a technical decision about MediaWiki or related software. If you are an active participant in the Wikimedia movement, then the tech RFC process is probably very different from the one used on your home wiki. If you are new to technical RFCs, then read Requests for comment. It is normal for technical RFCs to be discussed simultaneously in multiple places. There is no minimum or maximum number of days for a technical RFC. This particular RFC might be open for approximately five to ten weeks.

Please follow the Code of Conduct for technical spaces and bug management etiquette (provide practical information, not just votes for your favorite).

RFC decision
A technical RFC is not a vote, and outcomes are not decided by consensus among participants. The final decision is made in accordance with the developers' view of what's best for the integrity, consistency, stability, and performance of the software and server systems.

Motivation
This section contains information about why this particular change is necessary and why making this change now is a priority.

Existing problems

The lack of explicit syntax for multi-line comments makes it hard to add complex content types within lists, including discussions that use list formatting for visual indentation. Specifically, this means:


 * Contributors are limited in the types of things (e.g., tables and images) they are able to include in properly formatted lists (read: talk page comments). This inhibits them from being able to communicate about and collaborate on components like navboxes, series templates, and infoboxes within indented comments on talk pages. When contributors really need to use such features, they'll sometimes break out of the indentation structure. This makes it harder for readers, bots, and software to understand the structure of a conversation.
 * Contributors face a higher risk of markup errors contained with talk page comments posted using DiscussionTools "leaking out" and corrupting content elsewhere on the talk page.
 * Contributors are not able to create visual line breaks within the list structure without using HTML code or local templates.
 * Contributors who use screen readers have a more difficult time understanding conversations, and subsequently participating in them, because the tools they use are not able to properly narrate/speak/announce the comments in a talk page conversation. Source
 * People using features like the new Reply Tool are not able to use templates, tables and extensions in the tool's  mode.

New opportunities

In addition to the resolving the issues listed above, introducing syntax for multi-line comments would enable people to:


 * Edit specific comments on talk pages. This is functionality that had been planned, but became blocked because of this lack of syntax. For more information, see: T242562#5897905.
 * Build new gadgets that extend talk page functionality because comment parsing would become more reliable.

This example uses a numbered list to make the problem easy to see, but the same problems appear in all lists: bullet lists made with, numbered lists made with  , and definition lists made with   and. This problem is seen in many thousands of pages, especially talk pages.

Requirements
This section contains the requirements any proposal must need for it to be adopted.


 * The new syntax must enable people to include components[i] that span multiple lines within an indented list item.
 * The new syntax must not break existing content on talk pages.
 * The new syntax must be interoperable with existing and future list-item talk page markup.
 * The new syntax must work across all languages and be reasonably convenient to input using different text input methods.
 * The new syntax must be compatible with the core parser.
 * People looking at a diff or the wikitext source for a page must be able to recognize the new syntax as being part of the comment's formatting, and not part of the content.

Proposals
This section contains the different approaches

A) "Heredoc"

 * Example
 * Advantages
 * Generalizes an approach that was already adopted in a previous RfC. See: T114432#5411306.
 * If the  construct were found to be common in existing wikitext, these strings would be easy to lint away.
 * Interoperable with existing talk page markup.
 * Would allow for nesting.


 * Disadvantages
 * Syntax for further nesting might be considered awkward.
 * Editing and reading talk page source could become more difficult since a multi-line comment's "inner lines" would not be indented.


 * Unknowns
 * How general/widely applicable would this syntax be?
 * How would attributes be attached to list items?
 * What would happen if the software were unable to find a corresponding closing bracket?

B) "Wikitext 2.0"[1]

 * Example
 * Advantages
 * No special reply syntax needed.
 * Interoperable with existing talk page markup.
 * Disadvantages
 * Perpetuates the idea that replies are list items.
 * Not obvious how to add attributes or extensions.
 * syntax may already have meaning in some wikis.
 * Editing and reading talk page source could become more difficult since a multi-line comment's "inner lines" would not be indented.
 * Unknowns
 * Where would list item attributes go?
 * Would the default directionality of the "start" / "end" construct work in RTL languages?

C) Email-style lines starting with

 * Example
 * Advantages
 * Follows the pattern email has established for quoting.
 * Many people are likely to be familiar with how to use the syntax and what it means.
 * Reply-specific; does not perpetuate the idea that replies are list items.
 * Repeated brackets make it easy to understand a comment's level of indentation.
 * No closing symbol required, avoids the risk of unclosed replies impacting the rest of the page.
 * Disadvantages
 * Is not compatible with heredoc syntax, so templates and replies will conflict.
 * Not interoperable with existing talk page markup. Read: may not be possible for someone to use existing syntax to respond in a thread containing replies written with this "new" syntax.
 * Unknowns
 * What syntax would be used for attributes?
 * How would multiple replies be posted at the same level? E.g.:

D) Use what already exists

 * Example
 * Advantages
 * Almost works already.
 * Attributes will work.
 * Disadvantages
 * Mixing  and   doesn’t work right now; block tags would be necessary for every indent level (but this could be fixed).
 * without an opening  doesn’t work right now, and it would have to be allowed.
 * Unknowns
 * Pre-save transform (e.g. ) doesn’t work inside normal MediaWiki “XML-style tags”, so it would have to be fixed somehow, or the tag would have to be implemented at the preprocessor level
 * MediaWiki “XML-style tags” also can’t be nested.