Page MenuHomePhabricator

AMC: add "In other projects" action to page actions overflow menu
Closed, DeclinedPublic

Assigned To
None
Authored By
alexhollender_WMF
Mar 27 2019, 2:29 PM
Referenced Files
F29353027: image.png
Jun 5 2019, 5:14 PM
F29266482: image.png
May 28 2019, 5:48 PM
F29235639: image.png
May 24 2019, 7:30 PM
F28484063: image.png
Mar 27 2019, 2:29 PM
F28484091: image.png
Mar 27 2019, 2:29 PM
Tokens
"Like" token, awarded by Masumrezarock100.

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:

image.png (962×1 px, 700 KB)

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

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

  • 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_WMF 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_WMF created this task.

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:

image.png (1×802 px, 394 KB)

Thoughts?

@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.

ovasileva lowered the priority of this task from Medium 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 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 No, this is very wrong. You shouldn't link to Commons et al. under a hidden menu of "... In other projects", no-one will ever see it there. Do you seriously want to say "WE HAVE A PDF, OR METADATA ABOUT THIS PAGE, OR THINGS THAT RELATE TO THIS PAGE, or some stuff (perhaps quotes or perhaps photos), OR CITE THIS PAGE"?

LGoto subscribed.

This task was closed as part of backlog upkeep. If you believe it was closed in error, please respond on the ticket.