Page MenuHomePhabricator

AMC: add "In other projects" action to page actions overflow menu
Open, LowPublic

Description

Description

When viewing a Wikipedia article, in the side navigation under “Tools” you’ll usually find a link to “Wikidata item”. Further down, under “In other projects”, you’ll find links to any other Wikimedia projects that have a matching page for the respective article:


We’d like to provide access to the “In other projects” experience in AMC. Since these links are page-specific, it makes sense to add these to the page actions menu, rather than the main navigation.

Design

  • tapping "Other projects" will lead to a sub-menu
  • tapping "Back" at the top of the sub-menu will lead back to the more menu
  • the order of the items in the "Other projects" sub-menu should follow the order they appear in on wikipedia.com
  • to reduce complexity for now I've created T224311 to deal with adding icons (it doesn't seem like we currently have SVG icons for all Wikimedia projects so there's a bit of work there)

Developer notes

The item is added via a hook. We need to identify that hook to decide where this code will live (it should not live in Minerva). Integration tests will be important.

We will also need to identify pages where this is not wanted.

In addition to this many pages use templates in the article content to link to other projects. we may want to scrub that content from the output to compensate for the adding HTML this will add to pages.

This is likely to be tricky so let's make sure this is valuable (possibly some data analyst) before adding to the site. We of course would need to support sub menus first which itself is not trivial.

Event Timeline

alexhollender renamed this task from Add "In other projects" menu action to AMC: add "In other projects" action to page actions overflow menu.Mar 27 2019, 2:29 PM
alexhollender created this task.
Jdlrobson moved this task from Inbox to Next up on the User-Jdlrobson board.Mar 27 2019, 10:54 PM
alexhollender added a subscriber: Jdlrobson.

Armchair designer here:
Since the "In other projects" menu link behaves differently than the other menu links, could we differentiate its bit more?
My suggestion would be to add an ">" forward arrow after the text, so it reads "[icon] In other projects [>]" .
Has that already been considered?

p.s.
I'm also not sure if from a technical perspective, this variation would add undo complexity to the menu system.

Armchair designer here:
Since the "In other projects" menu link behaves differently than the other menu links, could we differentiate its bit more?
My suggestion would be to add an ">" forward arrow after the text, so it reads "[icon] In other projects [>]" .
Has that already been considered?

Yea, I did sketch that out. I think you're right, especially given the sub-menu direction here. This is what I had sketched out:

Thoughts?

alexhollender updated the task description. (Show Details)Jun 5 2019, 5:14 PM

@pmiazga, do you think your menu system can show a sub-submenu?

@Niedzielski yes, it's possible, and I thought about that use case when I was working on the Menu system. It's not available right now (because of YAGNI) but we can implement the support for submenus. On the backend we have sth like that:

Group::insertItem( IMenuElement $element)

We can insert anything to the Menu entry, only if implements the IMenuElement. We can make SubGroup that extends Group and implements IMenuEntry`, or just modify the Group to implement IMenuEntry.

Jdlrobson updated the task description. (Show Details)Jul 8 2019, 9:20 PM
ovasileva lowered the priority of this task from Normal to Low.Aug 28 2019, 3:15 PM

Out of curiosity, how does the system determine "matching page" in other projects? Same name, same wikidata, existence of in-page links or templates? Are redirects considered?

@Pelagic I haven't looked into too much detail into how "in other projects" works but I believe it's a wikidata extension so someone there may know.

The links are taken from the connected Wikidata Item's sitelinks. There is also some magic happening to link to the Commons category for a concept instead of the gallery based on a specific property.
@Tpt did most of the work.
@Tpt I can't remember if we ever added the magicword for overwriting and/or removing it on a specific page. Can you help?

A +1 from me. I'd very much like this feature.

Tpt added a comment.Sep 25 2019, 11:43 AM

@Tpt I can't remember if we ever added the magicword for overwriting and/or removing it on a specific page.

No, we have not created one yet at my knowledge.

Jdlrobson moved this task from Next up to Inbox on the User-Jdlrobson board.Tue, Nov 5, 5:35 PM