Page MenuHomePhabricator

Remove sidebar code from RelatedArticles extension
Closed, ResolvedPublic3 Story Points

Description

No projects in production use it so we should explore phasing this out of the codebase to give us less code to maintain.

Pre sprint checklist

A/C

  • T164765 is resolved meaning Wikivoyage can show more than 3 related articles
  • Related articles always show in the footer
  • wgRelatedArticlesShowInFooter is removed from the extension as a configuration option
  • Bump version number this is a breaking change
  • Remove mediawiki-config variables (cleanup after yourself) - Will be done post deploy

Post merge

Developer notes

  1. After the sidebar-related code is removed, there'll be no reason to distinguish the footer-related code, i.e. RelatedArticles will only be shown in the footer. We should reflect this in the codebase by renaming FooterHooks to Hooks (and other related changes).

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 21 2017, 12:41 PM
Jdlrobson triaged this task as Normal priority.May 22 2017, 9:08 AM
Jdlrobson moved this task from Incoming to Triaged but Future on the Readers-Web-Backlog board.
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)May 25 2017, 6:07 PM

Change 355637 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/RelatedArticles@master] Breaking change: Remove Sidebar code from RelatedArticles

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

Jdlrobson updated the task description. (Show Details)May 25 2017, 6:08 PM
Jdlrobson renamed this task from Remove sidebar code from RelatedArticles extension to [EPIC] Remove sidebar code from RelatedArticles extension.May 26 2017, 5:12 PM
Jdlrobson renamed this task from [EPIC] Remove sidebar code from RelatedArticles extension to Remove sidebar code from RelatedArticles extension.
Jdlrobson added a project: Epic.
Jdlrobson removed a project: Epic.
Jdlrobson changed the task status from Stalled to Open.Jul 6 2017, 10:14 PM
Jdlrobson updated the task description. (Show Details)

No longer stalled.

Jdlrobson updated the task description. (Show Details)Jul 12 2017, 3:47 PM

This task needs a quick conversation about the open questions and an estimation.

An email has been sent to wikitech-l and mediawiki-l asking if anyone objects to this.

Jdlrobson updated the task description. (Show Details)Jul 27 2017, 5:42 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)Aug 8 2017, 4:25 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson set the point value for this task to 3.
phuedx updated the task description. (Show Details)Aug 8 2017, 4:31 PM

JR to add a wikitech-l link.
Baha mentioned as part of this we should merge the code in Hooks.php and SidebarHooks.php

Jdlrobson updated the task description. (Show Details)Aug 9 2017, 4:13 PM

Change 370876 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/RelatedArticles@master] Merge footer hooks with Hooks

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

phuedx assigned this task to Jdlrobson.Aug 10 2017, 1:45 PM

Change 355637 merged by jenkins-bot:
[mediawiki/extensions/RelatedArticles@master] Breaking change: Remove Sidebar code from RelatedArticles

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

Left a comment regarding https://gerrit.wikimedia.org/r/#/c/355637/.

Also, will there be a follow-up patch to clean up mentions of "footer"? As we know, there is sidebar option anymore.

Moving to "needs more work" as we need to work on the post-merge items.

bmansurov: yes, there is a task to clean up hooks: https://gerrit.wikimedia.org/r/#/c/370876/2

About your comment, that's a good point, at first I wanted to keep the wgRelatedArticlesShowInFooter just in case some wiki is using the sidebar feature but I checked wmf-config and wgRelatedArticlesShowInFooter is set to true by default. wgRelatedArticlesShowInSidebar is not used, at least not in wmf-config. Because of that IMHO there is no need to keep those vars.

As @pmiazga mentions https://gerrit.wikimedia.org/r/370876 Merge footer hooks with Hooks is awaiting review. and takes care of the remaining bits.

There is no point in the $wgRelatedArticlesShowInFooter anymore. If RelatedArticles is installed and $wgRelatedArticlesShowInFooter is false then the extension is a noop. The user should just uninstall it.

I'll be cleaning up the config after this has ridden the train and it is safe to do so.

Change 370876 merged by jenkins-bot:
[mediawiki/extensions/RelatedArticles@master] Merge footer hooks with Hooks

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

bmansurov updated the task description. (Show Details)Aug 11 2017, 1:23 PM

Skipping "Needs QA" as the changes are technical and are not user facing.

Remove mediawiki-config variables (cleanup after yourself) - Will be done post deploy

Can be done in a follow up task. @phuedx would you mind signing off the work done here?

Johan added a subscriber: Johan.Aug 17 2017, 12:39 PM

@Jdlrobson This has been tagged with user-notice – could you briefly explain how does it affect the average user and/or local volunteer developer?

The RelatedArticles extension is used on Wikivoyage projects and allows editors to show algorithmically or curated pages that are related to an article. This extension has undergone some design work and now shows these results at the end of the page with associated page image. Historically these were hidden in the sidebar and difficult to discover. This change exposes them more prominently. If any wikis are interested in enabling the extension for any of their skins they should reach out to us via the Wikimedia-Site-requests and RelatedArticles tag.

Jdlrobson reassigned this task from Jdlrobson to phuedx.Aug 17 2017, 5:17 PM

Sam will sign this off.

Johan added a comment.Aug 17 2017, 8:46 PM

@Jdlrobson Thanks! So something like this?

The [[<tvar|related>mw:Extension:RelatedArticles</>|RelatedArticles extension]] shows related pages on Wikivoyages. You can now see the related pages at the end of the article together with an image. Previously the links were in the sidebar. Wikivoyages that want this extension can request it on [[phab:tag/wikimedia-site-requests/|Phabricator]].

Wikivoyages that want this extension can request it on [[phab:tag/wikimedia-site-requests/|Phabricator]].

Clarification: "Any project" not Wikivoyage. Wikivoyage users are already using this. They may not be aware of the change.

I've glanced at the codebase and it resembles what I think it should resemble – I think we'll always be a little unhappy with the factoring of the hook handlers. Also, I've updated the extension page so that it doesn't mention the ShowIn* config variables.

🎉🎉🎉

Change 373043 had a related patch set uploaded (by Phuedx; owner: Phuedx):
[operations/mediawiki-config@master] relatedArticles: Tidy up config

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

The above change was trivial to create. Creating a new task for it would've been more work IMO.

phuedx added a comment.EditedAug 22 2017, 10:33 AM

I've scheduled the change for deployment during today's European Mid-day SWAT window after checking that all of the other changes mentioned in this task have been deployed.

Change 373043 merged by Zfilipin:
[operations/mediawiki-config@master] relatedArticles: Tidy up config

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

Mentioned in SAL (#wikimedia-operations) [2017-08-22T13:44:47Z] <zfilipin@tin> Synchronized wmf-config/CommonSettings.php: SWAT: [[gerrit:373043|relatedArticles: Tidy up config (T165991)]] (duration: 00m 44s)

Mentioned in SAL (#wikimedia-operations) [2017-08-22T13:45:42Z] <zfilipin@tin> Synchronized wmf-config/InitialiseSettings.php: SWAT: [[gerrit:373043|relatedArticles: Tidy up config (T165991)]] (duration: 00m 44s)

phuedx closed this task as Resolved.Aug 22 2017, 1:48 PM
phuedx updated the task description. (Show Details)

All the A/C are met, the production config is as tidy as it can be, and the documentation reflects reality AFAICT.

🎉🎉🎉

Johan moved this task from To Triage to Archive on the User-notice board.Aug 24 2017, 8:31 PM