Page MenuHomePhabricator

Add an image: suggestion reason
Closed, ResolvedPublic

Description

The content in the image inspector starts with the suggestion reason. It should say one of these three things, depending on the source of the suggestion in the API. It should not have any prefix, i.e. it does not start with "Suggestion reason:" like in the mockups.

====NOTE: Final copy updated below - see relevant tab for corresponding QQQ in the copy spreadsheet:====

  • Other Wikipedias
    • If found in one other Wikipedia...
      • Text: Used in the same article in $Lang1.
    • If found in two other Wikipedias...
      • Text: Used in the same article in 2 other languages: $Lang1 and $Lang2.
    • If found in three other Wikipedias...
      • Text: `Used in the same article in 3 other languages: $Lang1, $Lang2, and 1 other"
    • If found in four or more other Wikipedias...
      • Text: `Used in the same article in $TotalOther other languages: $Lang1, $Lang2, and $(TotalOther - 2) others"
      • Ideally, we want to intelligently choose these two wikis by using language fallbacks or logic from ULS (universal language selector). But if using that logic is too challenging, we can display whichever wikis are returned first by the API.
  • Wikidata
    • Text: "Image"
  • Commons category
    • "One of several images linked to the Wikidata item for this article."

Event Timeline

@MMiller_WMF @RHo Here is the task for the suggestion reason text.

MMiller_WMF added subscribers: kostajh, Tgr, DMburugu.

@mewoph -- I wrote out exactly how I think we should do this and put the task in Ready for Development. Please let me know if I committed any oversights.

  • The two displayed wikis should be whatever is returned first by the API.

hi @Tgr - per team discussion, is there a way to display a "smarter" order of the wikis? For example based on proximity of similar languages (like ULS), or size/age of the article in the other languages?

@RHo @Tgr -- I updated the task description based on our conversation.

Change 734740 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] [WIP] Add an image: Suggestion reason

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

1 Wikipedia:

Screen Shot 2021-10-27 at 3.10.12 PM.png (594×702 px, 185 KB)

2 Wikipedias:

Screen Shot 2021-10-27 at 3.29.17 PM.png (622×692 px, 152 KB)

3 Wikipedias:

Screen Shot 2021-10-27 at 3.09.01 PM.png (632×698 px, 154 KB)

4 Wikipedias:

Screen Shot 2021-10-27 at 3.30.25 PM.png (628×696 px, 153 KB)

Wikidata:

Screen Shot 2021-10-27 at 3.13.20 PM.png (630×698 px, 188 KB)

Commons:

Screen Shot 2021-10-27 at 3.12.04 PM.png (628×700 px, 189 KB)

Change 734740 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add an image: Suggestion reason

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

@mewoph - I do not see wrapping for "One of several images linked to the Wikidata item for this article." on betalabs (checked the real devices - iOS 375x667 and Android 360x740):

Screen Shot 2021-11-04 at 1.43.42 PM.png (1×762 px, 286 KB)

Change 736896 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] Add an image: allow suggestion reason to wrap

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

Thanks @Etonkovidova — it looks like this is from a newer version of Minerva (I had an older version before). I posted a patch to make sure that the text wraps w/the latest version.

Change 736896 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add an image: allow suggestion reason to wrap

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

Checked in betalabs - the wrapping is in place; moving to Test in Production.