Page MenuHomePhabricator

Make linebreak behaviour consistent regardless of indentation level
Open, Needs TriagePublic

Description

Newlines are handled differently depending on if indentation is required:

Unindented

wikitext
foo
bar

baz
output
foo bar
baz

Indented

wikitext
:foo
:bar
:
:baz
output
foo
bar
<!-- invisible extra list item -->
baz

The problem here is going to be working out user intention. If the user puts in two line breaks (with a clear empty line) we can safely remove it in the indented version, but if they only enter one linebreak, it is not clear if the user intends there to be a break. Hopefully the live preview will help with this.

Event Timeline

Esanders created this task.Dec 13 2019, 6:04 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 13 2019, 6:04 PM
Esanders renamed this task from Make linebreak consistent regardless of indentation level to Make linebreak behaviour consistent regardless of indentation level.Dec 13 2019, 6:07 PM
Jc86035 added a subscriber: Jc86035.EditedDec 13 2019, 6:28 PM

Does the editor currently output any comments without indentation? Currently it can only be used through the “reply” button, so there will always be a parent comment, and so under this behaviour it would always prefix at least one indent.

JTannerWMF added a subscriber: JTannerWMF.

We can't work on this until we understand user expectation, which should happen after feature deployment.

JTannerWMF moved this task from Incoming to Freezer on the Editing-team board.Mar 10 2020, 3:50 PM

Does the editor currently output any comments without indentation? Currently it can only be used through the “reply” button, so there will always be a parent comment, and so under this behaviour it would always prefix at least one indent.

Not yet, but starting new threads is something we will be working on soon. It is also currently the case that linebreaks behave differently to regular article editing, so that itself may already be confusing.

Pols12 added a subscriber: Pols12.Apr 16 2020, 5:50 PM

Displaying colons starting each line may be sufficient to recall expert editors how new lines work there.
(no need to make the colons editable)

For wikitext-newbie users, future visual editor would workaround this issue.