Page MenuHomePhabricator

Handling for "fake headings" using ; syntax (<dt> tags)
Closed, ResolvedPublic

Description

Feedback from pl.wp: https://pl.wikipedia.org/wiki/Wikipedia:Kawiarenka/Kwestie_techniczne#Inny_problem_nowego_gadżetu_(numerowane_wypowiedzi?)

On pages like https://pl.wikipedia.org/wiki/Wikipedia:Propozycje_do_Artykułów_na_Medal/Apostoł_Pawieł (a featured article nomination discussion), the discussion is separated into several sections using "fake headings" created with ; syntax in wikitext.

The fake headings are treated as part of the comments, and cause the indentation to be incorrectly detected, and replies to be added in the wrong place:
image.png (2×3 px, 945 KB) image.png (2×3 px, 814 KB)
For comparison, when replying to a comment that isn't directly preceded by the fake heading:
image.png (2×3 px, 945 KB) image.png (2×3 px, 818 KB)

The ; syntax generates <dt> tags in HTML, which has nothing to do with headings and is a mess semantically. Ideally these would be real ==== headings, but they're not. Such is life.

I am wondering if we should have a special case for this. I don't think treating them as real headings would work well (currently, headings in our model correspond to wikitext sections, which is nice). But perhaps we could treat them as non-comments, or separators – similarly to the horizontal lines ---- / <hr>, which came up previously here: T264116#6507021 (and also outdent templates might work the same way?).

Event Timeline

I am wondering if we should have a special case for this. (…) But perhaps we could treat them as non-comments, or separators – similarly to the horizontal lines ---- / <hr>, which came up previously here: T264116#6507021 (and also outdent templates might work the same way?).

We've added support for outdent templates and other separators since I wrote that, in T264116, and it seems to be working well. I think we could easily extend it.

Change 761723 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] [WIP] Improve handling for comments after fake headings using wikitext `;`

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

Change 762010 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Add test case for fake headings using wikitext `;`

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

Change 762010 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Add test case for fake headings using wikitext `;`

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

Change 761723 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Improve handling for comments after fake headings using wikitext `;`

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