Page MenuHomePhabricator

Show wikitext warning for sequences disabled in Reply Tool's visual mode
Closed, ResolvedPublic

Description

This task is about making sure the Wikitext markup detected feedback message [i] is shown when someone types a "sequence" in the Reply Tool's visual mode that is not currently supported.

Behavior

  1. Open the Reply Tool in visual mode
  2. Type one of the sequences below (e.g. ==)

Current

  1. The typed sequence appears within the Reply Tool's text input area; nothing else happens

Desired

  1. ✅The typed sequence appears within the Reply Tool's text input area AND the Wikitext markup detect warning appears [i]

Sequences

  • == (only at the start of a line)
  • {{
  • {|
  • : (only at the start of a line)

Done


i.

Screen Shot 2021-02-16 at 10.25.51 AM.png (270×576 px, 41 KB)

Event Timeline

Change 664640 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Show wikitext warnings for sequences not in reply tools

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

Change 664640 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Show wikitext warnings for sequences not in reply tools

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

ppelberg added a subscriber: Esanders.

@Whatamidoing-WMF, I see you added the "(only at the start of a line)" condition to the ==, : and {| sequences.

To me, this condition seems intuitively valuable for the == and : sequences. The value this condition has for the {| is not as clear to me...can you share what's leading you to think it's imprtant to suppress the Wikitext markup detected warning when {| is typed anywhere besides the start of a line?

Is it because table, "...marks must start on a new line, except the double marks (|| and !!) for optionally adding consecutive cells to a single line.` [i]


i. https://en.wikipedia.org/wiki/Help:Table#Basic_table_markup_summary

Is it because table, "...marks must start on a new line, except the double marks (|| and !!) for optionally adding consecutive cells to a single line.` [i]

Yes, however:

{| is a sequence in VE that can be triggered from anywhere, e.g. I can type Hello {| and it will insert a table on a new line after your text.

Additionally, {| is quite a rare sequence (more so than == or :), so it's less problematic to warn when we see it anywhere.

As discussed in code review:

image.png (256×924 px, 38 KB)