Page MenuHomePhabricator

Wrapping and selection of aliases is bad
Closed, ResolvedPublicBUG REPORT

Description

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

Load https://www.wikidata.org/w/index.php?title=Q328&oldid=1641316510&uselang=en

What happens?:
The alias line looks like

ENWP | English-language Wikipedia | Wikipedia in English | Wikipedia (en) | enwiki | en.wikipedia.org | en.wp | en.Wikipedia | enwp | en wiki | English wikipedia | enwikipedia

image.png (162×765 px, 27 KB)

Line wraps are only at the spaces inside of the aliases like

ENWP | English-language Wikipedia | Wikipedia in English | Wikipedia
(en) | enwiki | en.wikipedia.org | en.wp | en.Wikipedia | enwp | en wiki | English wikipedia | enwikipedia

and never at the separation bars (|).

On a select with a double click (word select) neighbor aliases are also selected. The selection contains the aliases without any separators.

On a select with a triple click (line select) all aliases get selected. The selection contains the aliases without any separators like:

ENWPEnglish-language WikipediaWikipedia in EnglishWikipedia (en)enwikien.wikipedia.orgen.wpen.Wikipediaenwpen wikiEnglish wikipediaenwikipedia

What should have happened instead?:
Wrapping should happen on separation bars (|).

A double click (word select) should select a word inside of an alias.

A triple click (line select) should select whole single alias.

Event Timeline

Change 822100 had a related patch set uploaded (by Fomafix; author: Fomafix):

[mediawiki/extensions/Wikibase@master] Use floating objects for wikibase-entitytermsview-heading-aliases

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

Lydia_Pintscher subscribed.

Thank you! I added a screenshot so it's easier to see the issue.

Screenshots for the RTL difference I mentioned in this Gerrit comment:

Without the patch:

image.png (142×966 px, 23 KB)

With the patch:

image.png (142×966 px, 24 KB)

Sorry, nevermind those screenshots. I didn’t have a full localization cache, so the HTML incorrectly contained some dir="ltr" that should really be dir="rtl", and that broke the markup. With the localization cache populated, and the parser cache cleared, the list of aliases looks basically identical with or without the patch – just with very slightly different vertical spacing.

Without the patch:

image.png (136×979 px, 23 KB)

With the patch:

image.png (136×979 px, 23 KB)

Change 822100 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Use floating objects for wikibase-entitytermsview-heading-aliases

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

\o/
Thanks for the patch again, Fomafix!