Page MenuHomePhabricator

Remove HTML markup for language fallback indicators for fallback variants
Closed, ResolvedPublic

Description

[I’m filing this proposal with my volunteer hat on, but it’s also related to my work at WMDE and when I say “we” I’m referring to the Wikidata team ^^]

Threescore and a dozen months ago, we implemented T174318: Don’t display language fallback indicators for variant fallbacks: If the user interface is en-gb, but an item only has an en label, don’t show the language fallback indicator, because en-gb is just a variant of en. At the time, we implemented this by adding CSS styles to hide the element with the class that marks a fallback from a variant language, which makes it possible for users to override those styles and restore the indicators in their common.css if they want (P5929); I don’t remember if anybody actually asked for this – my suspicion is that it just seemed like a neat idea at the time. (Also, the class already existed, so adding CSS to hide it was probably easier than changing the PHP code to stop emitting the HTML.) But ever since then, there’s been a steady stream of issues with the fallback indicators not being hidden when they should be, because the CSS .wb-language-fallback-variant { display: none; } wasn’t getting loaded: see T267502 (diff, undo), T291817 (Special:ConstraintReport), T322687 (Special:NewLexeme), T328150 (mobile), T345881 (Ranker tool, which is why I’m interested in this as a volunteer), and possibly others I’ve forgotten. Notice that several of these are still open.

As far as I can tell from a search, only one user, @Mbch331, actually uses this ability to restore the indicators. With all due respect to him – a valued Wikidata contributor and admin for many years – I don’t think it’s worth keeping this ability just for one user. Not only does it keep causing bugs when the indicator shows up where it shouldn’t, it also means we’re sending more markup over the wire (for this long item, the en-gb render is 4% bigger than the en render, which I expect is mostly due to the markup for the invisible fallback indicators), storing those extra bytes in the parser cache, and so on. I think we should completely remove these indicators instead of merely hiding them via CSS.

Related Objects

Event Timeline

That makes sense to me. @Mbch331: How much of a problem would this be for you?

That makes sense to me. @Mbch331: How much of a problem would this be for you?

No problem for me. Don't even know why I added it.

Cool. Thanks!
Then all good from my side.

Change 955965 had a related patch set uploaded (by Lucas Werkmeister; author: Lucas Werkmeister):

[mediawiki/extensions/Wikibase@master] Remove fallback indicator for variant and mul fallbacks

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

Change 960167 had a related patch set uploaded (by Lucas Werkmeister; author: Lucas Werkmeister):

[mediawiki/extensions/WikibaseCirrusSearch@master] Temporarily skip fallback indicator tests

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

Change 960168 had a related patch set uploaded (by Lucas Werkmeister; author: Lucas Werkmeister):

[mediawiki/extensions/WikibaseCirrusSearch@master] Reenable + update fallback indicator tests

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

Change 960169 had a related patch set uploaded (by Lucas Werkmeister; author: Lucas Werkmeister):

[mediawiki/extensions/WikibaseLexeme@master] Temporarily skip fallback indicator tests

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

Change 960170 had a related patch set uploaded (by Lucas Werkmeister; author: Lucas Werkmeister):

[mediawiki/extensions/WikibaseLexeme@master] Reenable + update fallback indicator tests

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

Hi Lucas, from what I can see, mul is already included in this, correct? I would then close my two tasks about this (T312105 and T345396) as duplicates.

Change 977263 had a related patch set uploaded (by Lucas Werkmeister; author: Lucas Werkmeister):

[mediawiki/extensions/Wikibase@master] Remove unused styles for hiding variant fallbacks

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

Change 960167 merged by jenkins-bot:

[mediawiki/extensions/WikibaseCirrusSearch@master] Temporarily skip fallback indicator tests

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

Change 960169 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Temporarily skip fallback indicator tests

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

Change 955965 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove fallback indicator for variant and mul fallbacks

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

Change 960170 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Reenable + update fallback indicator tests

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

Change 960168 merged by jenkins-bot:

[mediawiki/extensions/WikibaseCirrusSearch@master] Reenable + update fallback indicator tests

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

Michael subscribed.

Not sure where to move this. We can pick it up again in the new year and click +2 on the change that drops the styles.

Michael set Due Date to Dec 31 2023, 11:00 PM.Nov 28 2023, 9:18 AM

Change 977263 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove unused styles for hiding variant fallbacks

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

LucasWerkmeister claimed this task.

I think this is completely done now :)