Page MenuHomePhabricator

Consider using colour/etc. to denote that tabs displayed as arrows / newlines as returns are not the raw Unicode character
Open, NormalPublic1 Story Points

Description

https://www.mediawiki.org/wiki/VisualEditor/Gadgets/Creating_a_custom_command?veaction=editsource has some TAB characters in the code. These are displayed as arrows. IMHO this is confusing. In many places, tabs are replaced by spaces, so the problem is really minor, but as you can see, there are ways to put tabs in the wikitext.

Details

Related Gerrit Patches:
VisualEditor/VisualEditor : masterDisable whitespace replacement in source mode
mediawiki/extensions/CodeMirror : masterDon't replace whitespace characters in VE

Event Timeline

Schnark created this task.Dec 16 2016, 10:59 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 16 2016, 10:59 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I'm not sure what you're asking? You are correct that wikitext allows tabs (though they're pretty rare as it's hard to enter one). We intentionally show these with a special glyph (since 2012, I think) to make clear that they're not just one or more spaces. (In visual mode, we also do this for ineffective newlines which don't cause a paragraph break.) Do you think we should reverse this decision? It would make it harder to spot this and fix it.

Perhaps use gray color instead of the normal black to show that these arrows aren't arrows but glyphs for TABs?

Wargo added a subscriber: Wargo.Jan 17 2017, 2:47 PM

This is good function. But if someone thinks not - maybe adding button like in external editors to show/hide markings for non-visible elements like tabs, newlines?

On a related point, when I copied and pasted a long list, all of the newlines were replaced by little carriage-return arrows like ↵ and all the content was run onto a single line. When it saved, Parsoid fixed everything (thank you, Parsing team!), but it was quite impossible to read, and I nearly discarded the changes to avoid corrupting the page.

Jdforrester-WMF renamed this task from NWE: Tabs being displayed as arrows is confusing to Consider using colour/etc. to denote that tabs displayed as arrows / newlines as returns are not the raw Unicode character.Feb 21 2017, 8:23 PM
Jdforrester-WMF triaged this task as Normal priority.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.

On a related point, when I copied and pasted a long list, all of the newlines were replaced by little carriage-return arrows like ↵ and all the content was run onto a single line. When it saved, Parsoid fixed everything (thank you, Parsing team!), but it was quite impossible to read, and I nearly discarded the changes to avoid corrupting the page.

That's a separate issue, which is fixed now, I think it https://gerrit.wikimedia.org/r/c/VisualEditor/VisualEditor/+/335086 was the change that fixed it.

Change 550952 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Disable whitespace replacement in source mode

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

Change 550956 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/CodeMirror@master] Don't replace whitespace characters in VE

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

Change 550952 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Disable whitespace replacement in source mode

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