Page MenuHomePhabricator

Interwikis on Russian Wikipedia should be collapsed
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  • Log in to Russian Wikipedia.
  • Open an article on Russian Wikipedia that has more than 10 interwikis in Vector 2022.
  • Scroll down to reach the table of contents (TOC) on the left.
  • Notice that the TOC is difficult to reach because of the sidebar's length.

What happens?
Vector 2022, the newest skin, has been default on a lot of Wikis, but not yet on Russian Wikipedia. Some users previously complained that interwiki links were not visible on the left (which is intended behaviour, as they are moved to a collapsed menu at the top). That was a primary reason why Vector 2022 was not adopted as the default.

As a compromise to facilitate the deployment of Vector 2022 on Russian Wikipedia, the interwiki links were duplicated on the left sidebar two weeks ago by OVasileva (WMF) and SGrabarczuk (WMF). You can see an example here:

image.png (1×1 px, 478 KB)

The problem is that these duplicated interwiki links do not collapse, and there is no option to disable them. Consequently, the TOC becomes nearly unreachable. On long articles, a user may have to scroll halfway down the page just to see the TOC:

image.png (868×1 px, 426 KB)

What should have happened instead?

The duplicated interwiki links in the sidebar should not obstruct access to the TOC.

Suggested solutions:

A) Preferable: implement a limit where only a few languages are shown by default, with the rest collapsed under a "more" link. For example, on MediaWiki, the sidebar only displays 9 languages by default, with the rest collapsed:

image.png (1×1 px, 375 KB)

B) Or add a toggle button to collapse/expand the interwiki section in the sidebar.
C) Or make the interwiki portlet scrollable independently of the article content (e.g., a fixed-height container with an internal scrollbar).

Event Timeline

Change #1260057 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/UniversalLanguageSelector@master] Enable compact languages link in Vector 2022 when languages in sidebar

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

Jdlrobson-WMF subscribed.

Thanks for reporting. I've submitted a patch to ULS. I've updated https://ru.wikipedia.org/wiki/MediaWiki:Vector-2022.js to patch this in the mean time.

@Iniquity @Niepodkoloryzowany one thing I wanted to check - most editors complaining about Vector 2022 were complaining that they didn't have the full length language menu in the sidebar in anonymous mode. So I assume this button should only apply for logged in users?

My assumption is for logged out, since main menu is collapsed by default (e.g. not pinned) this is less of a concern. Please confirm before I mark my patch as ready for review.

@Iniquity @Niepodkoloryzowany one thing I wanted to check - most editors complaining about Vector 2022 were complaining that they didn't have the full length language menu in the sidebar in anonymous mode. So I assume this button should only apply for logged in users?

My assumption is for logged out, since main menu is collapsed by default (e.g. not pinned) this is less of a concern. Please confirm before I mark my patch as ready for review.

No, in principle this should be collapsed for everyone, because the main issue with the new Vector was that it was very difficult to access the “most frequently used interwikis,” and it was “collapsed even when there was only one language.” In the current format, where the most popular interwikis are already shown, this problem goes away. That said, a new issue has indeed emerged, as the functionality for pinning interwikis has been broken (T253764); however, even with the full list, this would not help much, since the needed interwiki would still be buried in the middle of a large number of links and would disrupt the layout.

Would it be possible to move the interwikis under the table of contents, or into the tools panel on the right? How difficult would that be, and is it something we could implement ourselves?

From what I can see, the TOC issue has been resolved and the "more" button is now appearing:

image.png (1×1 px, 517 KB)

Currently, the interwiki links in the sidebar are only visible to logged-in users. However, not everyone who requested this feature was logged in; I recall IP users expressing the same preference. Furthermore, several logged-in editors advocated for the sidebar interwikis not just for personal use, but for the benefit of general readers.

Therefore, if I understand the question correctly, I believe both the interwiki sidebar and the new "more" button on the left should be visible to everyone (readers and editors) in Vector 2022. Maybe that should be a new ticket, though.

From what I can see, the TOC issue has been resolved and the "more" button is now appearing:

image.png (1×1 px, 517 KB)

Great! Glad to hear that's working to expectation.

From what I can see, the TOC issue has been resolved and the "more" button is now appearing:

image.png (1×1 px, 517 KB)

Therefore, if I understand the question correctly, I believe both the interwiki sidebar and the new "more" button on the left should be visible to everyone (readers and editors) in Vector 2022. Maybe that should be a new ticket, though.

! In T421023#11745850, @Iniquity wrote:

No, in principle this should be collapsed for everyone, because the main issue with the new Vector was that it was very difficult to access the “most frequently used interwikis,” and it was “collapsed even when there was only one language.” In the current format, where the most popular interwikis are already shown, this problem goes away. That said, a new issue has indeed emerged, as the functionality for pinning interwikis has been broken (T253764); however, even with the full list, this would not help much, since the needed interwiki would still be buried in the middle of a large number of links and would disrupt the layout.

Okay thank you both for the feedback. I've updated the patch for UniversalLanguageSelector and marked it as ready for review. A temporary fix is up until that gets merged.

Would it be possible to move the interwikis under the table of contents, or into the tools panel on the right? How difficult would that be

Difficult. For Commons and Wikidata (and legacy Vector) the language list is attached to the sidebar (e.g. the main menu). We'd have to do quite a bit of refactoring to separate the two concepts. The tools on the right would be a better place but that would mean also updating it for all the third party skins.

is it something we could implement ourselves?

The main worry here would be reflows (e.g. pushing the table of contents up after page load).
You can avoid this by moving it via JavaScript with some defensive site CSS/JS like so (but I defer to you whether the Russian editor community would find that discoverable) - this would result in a repaint but no reflow:

MediaWiki:Vector-2022.css

#vector-main-menu #p-lang { display: none; }
#vector-page-tools .mw-portlet-lang { float: none; }
`

MediaWiki:Vector-2022.js

$('#p-lang').appendTo('#vector-page-tools')

Would that work?

Another thing you could consider is making use of mediawiki.collapsible e.g. $( '#p-lang .vector-menu-content' ).makeCollapsible( { collapsed: true } ); (just sharing in case that's of interest)

Thank you for the detailed explanation — I really appreciate it. I hope the task T301787: [Design spike] Explore options for one-click language switching will be addressed, as the interwikis are currently interfering with the table of contents :(

Change #1260057 merged by jenkins-bot:

[mediawiki/extensions/UniversalLanguageSelector@master] Enable compact languages link in Vector 2022 when languages in sidebar

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

Patch has been merged. I'll remove the site script workaround on Friday after the deploy.