VisualEditor: ↵ is shown when wikicode contains single newline, which is not very WYSIWYG
Open, NormalPublic

Description

Single newlines have no effect on the way a wiki page is displayed.
So they should be ignored in a WYSIWYG editor.

Example: Third line at http://en.wikipedia.org/wiki/Content_Management_Interoperability_Services#Specification_progress_.26_TC_members

Details

Reference
bz48290
bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz48290.

(In reply to comment #0)

Single newlines have no effect on the way a wiki page is displayed.
So they should be ignored in a WYSIWYG editor.

Example: Third line at
http://en.wikipedia.org/wiki/
Content_Management_Interoperability_Services#Specification_progress_.
26_TC_members

Yeah, this is a bit of a mess. In wikitext (except in some circumstances like <pre>s), \n is a whitespace character, rendered as either a space or as nothing depending on the things around it, but \n\n is "</p><p>".

We could:

  • Silently strip non-conformant wikitext syntax like this on ingest, but this would mean that VisualEditor would not play well with other, wikitext-based users.
  • Show the newline as a line break in VisualEditor - in a way that (a) doesn't look like a new paragraph/context has started, and (b) doesn't look like <br />s will look, either, and in some way conveys the fact that it's different.
  • (Current behaviour) Show the newline as a special kind of character in VisualEditor - in a way that (a) doesn't look like a 'real' new line, because it isn't.
  • Silently not show the new line as such (but instead as… a space?), which is prone to having users accidentally alter them without intention, again causing problems for intermixed VisualEditor and wikitext editor sessions.

What are your thoughts?

Same for TAB characters, which are shown as ➞

TAB characters have no meaning in wikicode, and I can't imagine anyone entering them for any purpose (plus they are difficult to enter in an HTML form).
I have never seen a case where they are intended (please point me to any example if I am mistaken).

I personally think TABs are a case where silent stripping would be acceptable.


Newline characters are more debatable, because some people use them to make wikicode more readable.

(In reply to comment #2)

Newline characters are more debatable, because some people use them to make
wikicode more readable.

...and I remmember some people use them to make diffs more readable[citation needed].

  • Bug 61569 has been marked as a duplicate of this bug. ***
  • Bug 50641 has been marked as a duplicate of this bug. ***

Indeed not WYSIWYG, but I happen to love this feature. I practically always remove these links when I see them. I'd say WONTFIX.

  • Bug 65324 has been marked as a duplicate of this bug. ***
  • Bug 68811 has been marked as a duplicate of this bug. ***
  • Bug 57454 has been marked as a duplicate of this bug. ***
Elitre added a subscriber: Elitre.Feb 27 2015, 3:54 PM

I like the idea of showing it as a line break. This might make more sense to less-technical people that have just copy-pasted text out of another document (one of the apparent causes) than the insertion of an unexpected symbol.

I like the idea of showing it as a line break. This might make more sense to less-technical people that have just copy-pasted text out of another document (one of the apparent causes) than the insertion of an unexpected symbol.

I'm not a fan of making VE less like the reading experience, though.

Unless I'm misunderstanding Whatamidoing, I think they mean that we copy
line breaks in as actual linebreaks, so that reading and editing look the
same and no one actually sees that carriage return symbol ever.

*Jared Zimmerman * \\ Director of User Experience \\ Wikimedia Foundation

M +1 415 609 4043 \\ @Jaredzimmerman http://loo.ms/g0

Unless I'm misunderstanding Whatamidoing, I think they mean that we copy
line breaks in as actual linebreaks, so that reading and editing look the
same and no one actually sees that carriage return symbol ever.

Yes, you're entirely missing the point here.

  • Actual reader-visible new paragraphs (from two new lines after each other in wikitext) are shown as new paragraphs.
  • Actual reader-visible line breaks (from a <br /> tag) are shown as line breaks.

This is about how to represent the reader-invisible nonsense wikitext single new line. See T50290#499295 for details; nothing's changed here since May 2013.

@Jdforrester-WMF let me try to rephrase to see if I understand, the
carriage return symbol is shown in VE because a wikitext editor has
included a line break in the editing environment to increase readability of
the wikitext, however this does not affect the presentation of the content
in read mode, and is meaningless and confusing to VE editors.

However there is a worry (by whom?) that not showing the character at all
would make it much easier for a VE editor to accidentally remove the
character because it has no visual representation. On the other hand
visualizing it as an actual line-break causes inconsistency between edit
and read modes (which currently exists in wikitext/read more)

Is that summary clear and factual?

*Jared Zimmerman * \\ Director of User Experience \\ Wikimedia Foundation

M +1 415 609 4043 \\ @Jaredzimmerman http://loo.ms/g0

Neil_P._Quinn_WMF set Security to None.
Krinkle removed a subscriber: Krinkle.May 10 2016, 4:45 PM

Additional feedback from a German editor regarding this issue:
"Wikipedians delete the '↵' in VisualEditor and replace it with a space. But this character '↵' only indicates that a break was added to the source for better readability, which is automatically translated into a space. It's often used in long citation blocks, for example. This' ↵'-character makes the Wikitext / source text more readable. The good readability of the source text in the source editor (Edit window) is still one of the quality indicators explicitly mentioned in our guidelines for good articles. The meaning in the VisualEditor is only that the user should insert a new text not to the left but to the right of the '↵' character. Just simply so that the line break in the source text remains directly behind the left character. But, when looking at the instructions, this subtlety is not mentioned. Also, no warning is displayed when you delete the '↵' character in the VisualEditer. Apparently the character can not be inserted in the VirtualEditor any more, if it was deleted. [...] I would hope that there is a warning when deleting the character or a tooltip when the mouse is hovering above the character. Thank you."

That sounds very project-specific. In my experience, line breaks (shown as '↵' in VisualEditor) on enwiki often mean that someone has copied and pasted the text from another document (e.g., written the text offline in a word processor). It only rarely seems to be done intentionally.

(Also, what if a line break someday stopped being interpreted as a space?)