Page MenuHomePhabricator

Inappropriate line breaks inserted when editing in the visual mode
Open, Needs TriagePublic

Description

There are unwanted line breaks in the middle of this reply: https://en.wikipedia.org/w/index.php?title=Talk:Investigations_into_the_origin_of_COVID-19&diff=1008382587&oldid=1008382503

The message looked normal when I clicked the 'Reply' button to post it.

There are unwanted line breaks in this article: https://en.wikipedia.org/w/index.php?title=Investigations_into_the_origin_of_COVID-19&diff=prev&oldid=1008213302

The paragraph looked normal when I saved the page.

Event Timeline

There are unwanted line breaks in the middle of this reply: https://en.wikipedia.org/w/index.php?title=Talk:Investigations_into_the_origin_of_COVID-19&diff=1008382587&oldid=1008382503

Presumably, the complaint is about this diff?

So, those additional list items (at the same level) in the middle of that reply looks like something that the Discussion Tools inserted. I cannot think of a scenario where Parsoid would on its own add new list items. But, we should see if there is way to reproduce this in isolation and see what HTML that DT sends back Parsoid.

As for the second one, again, we should see if we can reproduce it and see what HTML is posted to Parsoid.

Presumably, the complaint is about this diff?

I think it's more-specifically about this diff -- the other one just shows the undoing of the specific error.

It's weird, because we're not sure what scenario would result in a correct visual preview, but output HTML that results in the italics being pushed to a newline in the wikitext.

From Slack, the comment was made that "I can kind-of reproduce that when using the API directly, by just passing html parameter without a wrapping <p> tag. I have no idea how to cause that when using the normal editing surface though."

matmarex added subscribers: matmarex, Esanders.

I was able to reproduce by typing *testing'''testing'''testing in wikitext mode (note the list item), then switching to visual, changing the list to normal text (place cursor at the start and press Backspace), then saving the reply. It may also be reproducible by doing other stuff with lists or tables and then removing them.

This seems to be caused by how generated wrapper paragraphs work in VisualEditor (change https://gerrit.wikimedia.org/r/c/VisualEditor/VisualEditor/+/747875 made me think of this).

matmarex added a project: Editing QA.

After merging that patch, I can't reproduce any more by following those steps. This is probably fixed.

ppelberg claimed this task.
matmarex raised the priority of this task from High to Needs Triage.Dec 28 2022, 11:14 PM
matmarex moved this task from Triaged to Backlog on the DiscussionTools board.

This is clearly not happening regularly, and I can't reproduce it, but it seems likely related to wrapper paragraph logic. We did change this recently to fix a similar bug (T348467), but there is an instance form 2022 that pre-dates this.

@JTannerWMF, do you remember anything specific about the way you composed the message, e.g. copying and pasting from an external editor like GDocs?