Page MenuHomePhabricator

armorFrenchSpaces not applied in sidebar TOC in 2022 Vector skin
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
Normal spaces (U+0020) shown instead of non-breaking spaces (U+00A0) before ? ! : ; » and after «.

<span class="sidebar-toc-numb">2</span>Renommer la page « Informatique durable » en « Numérique responsable » ?</div>

Capture d’écran 2022-12-08 à 15.27.51.png (310×438 px, 41 KB)

What should have happened instead?:
Non-breaking spaces (U+00A0) should have been applied before ? ! : ; » and after « instead of normal spaces (U+0020).

<span class="sidebar-toc-numb">2</span>Renommer la page «&nbsp;Informatique durable&nbsp;» en «&nbsp;Numérique responsable&nbsp;»&nbsp;?</div>

Capture d’écran 2022-12-08 à 15.29.21.png (318×452 px, 41 KB)

Other information
The issue doesn't happen in the body of the page, where the non-breaking spaces are correctly applied in the headings:

<span id="Renommer_la_page_.C2.AB_Informatique_durable_.C2.BB_en_.C2.AB_Num.C3.A9rique_responsable_.C2.BB_.3F"></span><span class="mw-headline" id="Renommer_la_page_«_Informatique_durable_»_en_«_Numérique_responsable_»_?" data-mw-thread-id="h-Renommer_la_page_«_Informatique_durable_»_en_«_Numérique_responsable_»_?-20221208080700"><span data-mw-comment-start="" id="h-Renommer_la_page_«_Informatique_durable_»_en_«_Numérique_responsable_»_?-20221208080700"></span>Renommer la page «&nbsp;Informatique durable&nbsp;» en «&nbsp;Numérique responsable&nbsp;»&nbsp;?<span data-mw-comment-end="h-Renommer_la_page_«_Informatique_durable_»_en_«_Numérique_responsable_»_?-20221208080700"></span></span>

QA Results - Prod

ACStatusDetails
1T324763#9570306

Event Timeline

Thibaut120094 renamed this task from armorFrenchSpaces not applied in TOC in 2022 Vector skin to armorFrenchSpaces not applied in sidebar TOC in 2022 Vector skin.Dec 8 2022, 2:46 PM
Thibaut120094 updated the task description. (Show Details)

Not entirely unrelated to T303855: Page-wide language conversion rules are ignored in the ToC -- conversion and french spacing should be done on the SectionData json before that is stored in the ParserOutput.

Jdlrobson subscribed.

Can replicate at 1292px

For "Renommer la page « Informatique durable » en « Numérique responsable » ?"

Screenshot 2023-12-04 at 9.45.29 AM.png (155×301 px, 13 KB)

Note: it breaks after "en <<", instead it should break after "en"

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

[mediawiki/core@master] Parser: Convert wikitext entities to HTML entities in TOC

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

(I found this task by accident when searching for bug reports similar to T355386, and realized that it's a different bug but the same root cause.)

Change 1002605 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Add parser tests for TOC behavior with french spacing and HTML entities

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

Change 991877 merged by jenkins-bot:

[mediawiki/core@master] Parser: Convert wikitext entities to HTML entities in TOC

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

Change 1002605 merged by jenkins-bot:

[mediawiki/core@master] Add parser tests for TOC behavior with french spacing and HTML entities

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

Test Result - Prod

Status: ✅ PASS
Environment: frwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

Log out or enable the Vector 2022 skin in your preferences.
Go to any page on any French-language wiki that shows a table of contents with ? ! : ; « » in headings.
Example: https://fr.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:Le_Bistro/8_d%C3%A9cembre_2022&oldid=199326295
❓ AC1: Non-breaking spaces (U+00A0) should have been applied before ? ! : ; » and after « instead of normal spaces (U+0020).
@Jdlrobson I cannot get the same TOC to appear as shown in the expected result in the task description.

<1000

screenshot 555.png (184×528 px, 17 KB)

width >=1200

screenshot 553.png (196×326 px, 16 KB)

1000<= width <1200

screenshot 554.png (227×266 px, 15 KB)

@Edtadros I can get the "expected results" with a browser-width of 1280px:

image.png (1×2 px, 746 KB)

In any case the important thing is that the « isn't separated from the word before and !, », and ? aren't separated from the word before them.