Page MenuHomePhabricator

Remove sidebar code from RelatedArticles extension
Closed, ResolvedPublic3 Estimated 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
Jdlrobson triaged this task as Medium priority.May 22 2017, 9:08 AM
Jdlrobson moved this task from Incoming to Triaged but Future on the Web-Team-Backlog board.
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)

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

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)
Jdlrobson set the point value for this task to 3.

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

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

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

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?

@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 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](https://www.mediawiki.org/w/index.php?title=Extension%3ARelatedArticles&type=revision&diff=2541034&oldid=2538906).

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.

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

🎉🎉🎉