Topic on Talk:VisualEditor/Diffs

Issues : No way identify empty nodes (space or blank) added by extension tags

3
Summary last edited by Elitre (WMF) 14:00, 14 June 2017 6 years ago
197.218.91.181 (talkcontribs)

Problem

Extension tags with no content don't have any visual representation or information in the sidebar.

Steps to reproduce

  1. Go to https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=2455494
  2. Copy them, and paste them into a new page being edited by VisualEditor
  3. Alternatively, just insert those extension tags and add an empty space in each one of them
  4. Press alt + shift + v (trigger diff viewer)
  5. Click visual

Expected

Some indication that there were nodes added to the text, either inline or in the sidebar.

Actual

Green blocks indicating added content with no way to differentiate them from each other.

Extra notes: While most tags were in fact empty and don't have a "visual" representation to speak of, the empty reference tag was invalid, and didn't display properly, while the score extension was empty until saved. It then returned an error.

Elitre (WMF) (talkcontribs)

Is this really different from the current limitations listed on the main page? (I myself noticed instead an added signature doesn't show up yet.)

197.218.80.137 (talkcontribs)

Yes, it is different. If the content added to visualeditor will generate errors when saved, then it should either a) Show errors when first inserted into the visualeditor, b) Show those errors when previewed visually.

So there are two different cases here:

For the citation, the wikitext "<ref> </ref>" generated something like '[1] ' when first inserted. This is entirely valid wikitext (see [1]). But the preview showed the same empty space because it was serialized to "<ref />". In such a case either VisualEditor or the tool that transforms the content into wikitext is causing incorrect output . This could be a separate issue that also affects the visual diff software.

The second problem is that the score tag was inserted without any errors, when previewed showed green blob, and when saved showed an error. The "score" insertion, preview, and saved content should all be similar. In this case, the dialog that inserts the score could prevent insertion of invalid content, and if it is already in the page, then it should render the error properly in visualeditor, and also preview the error visually.

The limitations don't fully apply here because in both these cases errors are shown when such extension tags with spaces (" ") are saved.