Page MenuHomePhabricator

Weekly reports for WikidataPageBanner extension
Closed, ResolvedPublic


Weekly reports for WikidataPageBanner extension(GSoC 2015)

Since some patches were contributed in the Community Bonding Period also, a mention here of them:

Week 1 May 25-June 1:

Week 2 June 2-June 9:

Week 3 June 10-June 17:

Week 4 June 18-June 25:

Week 5 June26-July2:

  • TOC added above is manipulated client-side using jquery, which is giving Flash Of Unstyled Content. A better approach was suggested to add TOC on server side, which however was not possible with current mechanism of adding banner. Therefore a change of that mechanism is being undertaken in the patch - which does the following modifications:
    • Adds the banner only just before page display(i.e BeforePageDisplay hook).
    • This is beneficial because that that point we have all the properties for generating a banner, such as a TOC, together.
    • The parser function only adds banner options to ParserOutput object which are then passed to the OutputPage object, using OutputPageParserOutput hook.
    • Since the parser function is now not returning anything, it can be made to return wikitext such as [[Category:foo]] which would solve the problem of adding categories to page depending upon banner.
  • For icons, it was suggested to use OOUI, and the patch has been suitably modified for the same -
  • The function getBannerUrl is making a call to global wfFindFile() and testing it as yet has been a difficulty -

Week 6: July3-July9

Week 7: July 10-July 17

Week 8: July 18-July 25

The extension received wide support from the wikivoyage community on the Wikivoyage Traveller's Pub. Consequently the deployment review of the extension has been started. Tracking at
As part of the deployment review, the following fixes have been implemented:

Week 9: July 26-August 2

The fixes as per the deployment review follow:

Week 10: August 3-August 10

  • The remaining issue to be tackled was that banners were very small on screens < 400px( their aspect ratio being 7:1 ). Therefore, a fake cropping of banners has been implemented wherein a min-height has been set on banners and any overlapping is handled by cropping the banner. By default the banner is centered -
  • In order to generalize the banner cropping mechanism to allow cropping of banner of any aspect ratio, a focus parameter has been also added which is used on client-side to appropriately focus a particular image at a spot -

Note that this would mean that editors no longer need to force their banners to be of aspect ratio 7:1. They can simply use any banner and focus it appropriately. Cropping would be done automatically.

  • Also a major patch to move non-hook methods from WikidataPageBanner.hook to WikidataPageBanner.functions was introduced -
  • The banners are made responsive using "srcset". However this property has limited support currently. Consequently, to avail the feature to the fullest, a polyfill for srcset has been introduced -

Week 11: August 11-August 19

Week 12: August 19-August 21

The extension has been deployed on English Wikivoyage. Its feature to fetch wikidata banner has also been enabled. Major migration to the extension would soon happen.
All the discussions can be tracked at's_Pub
All new additions can be seen at the test wiki

Event Timeline

Sumit assigned this task to Niharika.
Sumit claimed this task.
Sumit raised the priority of this task from to Medium.
Sumit updated the task description. (Show Details)
Sumit set Security to None.
Sumit added subscribers: Sumit, Aklapper, Niharika.
Sumit updated the task description. (Show Details)