Page MenuHomePhabricator

RelatedArticles max number of articles limit should be configurable
Closed, ResolvedPublic3 Estimated Story Points

Description

Wikivoyage's use of RelatedArticles predates the reboot done by the reading web team. They have been using the extension to manually curate lists of related articles on a variety of pages. For instance on the page Japan:

Screen Shot 2017-06-13 at 11.35.44 AM.png (519×370 px, 81 KB)

For the community to continue to adopt the new version of the extension which shows cards in the footer... and allow us to remove the legacy sidebar code... on Wikivoyage it should be possible to have more than 3 related pages using the RelatedArticles extension so that it doesn't hide content they've already provided.

Sign off

This can be signed off on 12th July on wikivoyage
1 article: https://en.wikivoyage.org/wiki/The_Jazz_Track
3 articles: https://en.wikivoyage.org/wiki/UNESCO_World_Heritage_List
4 articles: https://en.wikivoyage.org/w/index.php?title=Canada
6 articles: https://en.wikivoyage.org/w/index.php?title=Japan

On https://en.m.wikivoyage.org/wiki/Japan for example there are 5 related pages. All 5 should be shown.

Appearance

3

footer on desktop.png (1×2 px, 299 KB)

4

footer on desktop copy.png (1×2 px, 306 KB)

5
You get the idea

Acceptance criteria

  • The RelatedArticles extension has a configurable limit which defaults to 3
  • The limit is disabled on Wikivoyage projects
  • The limit is 3 on all other projects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Jdlrobson raised the priority of this task from Low to Medium.May 22 2017, 9:11 AM

Bumping priority as this allows us to remove a bunch of code from relatedarticles and yay scope decrease.

This patch should take care of this:

Change 355636 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/RelatedArticles@master] Make number of RelatedArticles configurable

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

After applying the above patch, this is what I see:

Screenshot from 2017-05-25 16-05-00.png (640×1 px, 97 KB)

Jdlrobson added a subscriber: Nirzar.

Ack! Good spot @bmansurov I guess this is not as trivial as first thought.
@Nirzar can you provide some guidance on how it should look on tablets when there are 4 (https://phabricator.wikimedia.org/T164765#3293142)?

Jdlrobson changed the task status from Open to Stalled.May 26 2017, 7:24 PM
Jdlrobson changed the task status from Stalled to Open.

The cards can be laid out like this but can we add a comment somewhere for people who want to configure this saying suggested values 3|6|9?

3

footer on desktop.png (1×2 px, 299 KB)

4

footer on desktop copy.png (1×2 px, 306 KB)

5
You get the idea

I'm not sure where to put the comment, but yeh I can start a conversation on the wiki about how to message that out. This is only Wikivoyage and pages rarely have any related articles at all - so I don't think this is going to be a big problem.

ovasileva added a subscriber: ovasileva.

@Jdlrobson, @Nirzar - did we come to a conclusion on number of cards?

On Wikivoyage it should be possible to have more than 3 related pages using the RelatedArticles extension.

Why?

why do we need max limit here? if we are letting people change it anyways? if someone puts 1000 then they would see 1000 cards, which is expected and I think fine.

Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task from Needs Prioritization to Upcoming on the Readers-Web-Backlog board.

@Jdlrobson

The RelatedArticles extension has a configurable limit which defaults to unlimited

though i said it shouldn't have a limit, we can define the "default" to 3. and let it be configurable to unlimited

@Jdlrobson - what was the final decision on this? How'd it end up in the sprint?

Jdlrobson set the point value for this task to 3.Jun 28 2017, 5:35 PM
  1. The change doesn't integrate – I'm sure this is a minor issue.
  2. There's a question from @pmiazga on PS3 that wasn't answered.
  3. There's now a question from me on PS4 about the search API's handling of limit=-1.

Yeh looks like this doesn't work on the desktop resolution. I'm going to try a different approach with the styling.

The combination of the fixed pixel margin-right and percentage width were causing the issues so I've switched the margin-right to a percentage. Visually it's more or less the same.
Nirzar can you confirm you're okay with the slight change in margins on cards (should not be noticeable)
http://reading-web-staging.wmflabs.org/wiki/Related

I really would like to put work to RelatedArticles to bed...

Patch is here: https://gerrit.wikimedia.org/r/#/c/355636/15

yeah I think % margin works... Thanks for fixing.. let's 📦 it

The main patch has been +2'ed. Do we have a patch for the following requirement?

The limit is disabled on Wikivoyage projects

Change 355636 merged by jenkins-bot:
[mediawiki/extensions/RelatedArticles@master] Make number of RelatedArticles configurable

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

Change 363742 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Wikivoyage projects can show more than 1 related article

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

I can do the swat deploy today in 1hr. Skipping QA as Nirzar has checked this and can check again as part of sign off.

Change 363742 merged by jenkins-bot:
[operations/mediawiki-config@master] Wikivoyage projects can show more than 3 related articles

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

Jdlrobson updated the task description. (Show Details)

Sign off currently blocked till next Wednesday...