=Weekly reports for WikidataPageBanner extension(GSoC 2015)=
Since some patches were contributed in the Community Bonding Period also, a mention here of them:
* Static banner placeholder: https://gerrit.wikimedia.org/r/#/c/208096/
* Adding 'PAGEBANNER' magic word: https://gerrit.wikimedia.org/r/#/c/209432/
* Adding a template for banner: https://gerrit.wikimedia.org/r/#/c/213576/
==Week 1 May 25-June 1:==
* Got T98152 merged
* Started work on adding options to {{PAGEBANNER}} parser function T100486
* Adding the feature to fetch Wikidata banner under review T98044
* Controlling banner image size from client under review T98031
* Work on adding icons to banner started https://gerrit.wikimedia.org/r/#/c/215029/
==Week 2 June 2-June 9:==
* Feature to fetch Wikidata Banner completed https://gerrit.wikimedia.org/r/#/c/213478/
* First step in adding options to {{PAGEBANNER}} - allow named parameters https://gerrit.wikimedia.org/r/#/c/214672/
* Generating srcset attribute for banner to load image of browser dependent size completed https://gerrit.wikimedia.org/r/#/c/212512/
* phpcs warnings clearned in the extension https://gerrit.wikimedia.org/r/#/c/216108
* Work on adding phpunit tests started https://gerrit.wikimedia.org/r/#/c/216735/
==Week 3 June 10-June 17:==
* Completed providing named parameters for {{PAGABANNER}} function https://gerrit.wikimedia.org/r/#/c/214672/
* Work on php unit tests continuing
* A pertinent issue was custom banners were not seen correctly page preview. This was resolved by adding banner styles to every page on allowed namespace https://phabricator.wikimedia.org/T103140#1383356
* Work on a Table of Contents for the banner was started https://gerrit.wikimedia.org/r/#/c/218672/
==Week 4 June 18-June 25:==
* Work on table of contents was completed and a functional horizontal TOC on banners deployed(https://gerrit.wikimedia.org/r/#/c/218672/) : http://pagebanner.wmflabs.org/wiki/Asia
* Some compatibility issues with TOC are being resolved.
* Ability to add caption image on banner added - https://gerrit.wikimedia.org/r/#/c/214895/
* phpunit tests for banner options and banner added - https://gerrit.wikimedia.org/r/#/c/216735/
==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 - https://gerrit.wikimedia.org/r/#/c/221459/ 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 - https://gerrit.wikimedia.org/r/#/c/215029/
* The function getBannerUrl is making a call to global wfFindFile() and testing it as yet has been a difficulty - https://gerrit.wikimedia.org/r/#/c/220963/
==Week 6: July3-July9==
* Icons for **{{PAGABANNER}}** have now been included with this patch - https://gerrit.wikimedia.org/r/#/c/215029/
* Provision for add Wikidata Banner in parser hook **{{PAGEBANNER}}** now added - https://gerrit.wikimedia.org/r/#/c/223065/
* Some fixes related to skin Minerva introduced so that banners render well on mobile - https://gerrit.wikimedia.org/r/#/c/222693/
* The patch changing hooks and server-side toc needs more work. The primary issue is server side modification of TOC properties so that no Flashing Content occurs on load. However it appears that there's no direct way to modify toc's id's and classnames. Therefore a hack needs to be applied - https://gerrit.wikimedia.org/r/#/c/221459/
==Week 7: July 10-July 17==
* This week was marked by a lot of discussion with the community on http://en.wikivoyage.org/wiki/Travellers%27_pub and soliciting feedback.
* Class names were prefixed with wpb - https://gerrit.wikimedia.org/r/#/c/224089/
* Largest banners made to load when support for srcset poor - https://gerrit.wikimedia.org/r/#/c/223746/
* A major structural change in the way of rendering banners and making a server side toc accomplished by - https://gerrit.wikimedia.org/r/#/c/221459/
* The above change has brought improvement in the sense that any banner is now added only in BeforePageDisplay hook.
* A lot of feedback from the community has helped identify and resolve issues from #wikidata-page-banner board
==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 https://phabricator.wikimedia.org/T98029
As part of the deployment review, the following fixes have been implemented:
* Improve the banner template - https://gerrit.wikimedia.org/r/226574
* Remove call to OOUI\Theme::setSingleton() - https://gerrit.wikimedia.org/r/226558
* Unstyle visited and active links on TOC - https://gerrit.wikimedia.org/r/226341
* Implement proper sanitization of src and href in banner - https://gerrit.wikimedia.org/r/226303
* Remove oojs-ui dependency as it was no longer needed - https://gerrit.wikimedia.org/r/226521
* Since TOC was quite large, its size was appropriately adjusted - https://gerrit.wikimedia.org/r/226229
* Spaces in banner href and src allowed - https://gerrit.wikimedia.org/r/225855
==Week 9: July 26-August 2==
The fixes as per the deployment review follow:
* TOC on some banners might take up to much space, therefore a parameter to shift toc below the banner was added - https://gerrit.wikimedia.org/r/#/c/226762/
* Check to avoid empty icons and empty WikidataProperty(Hygiene) - https://gerrit.wikimedia.org/r/227415 and https://gerrit.wikimedia.org/r/227176
* All globals were prefixed with "WPB"(Hygiene) - https://gerrit.wikimedia.org/r/226919
* The 'articlebanner' property was storing the entire HTML of the banner which was wasteful, as it was not being used directly, therefore articlebanner property was modified to store only the banner name - https://gerrit.wikimedia.org/r/227261
* The extension was moved to use extension.json as its entry point - https://gerrit.wikimedia.org/r/226520
* Improvement of documentation - https://gerrit.wikimedia.org/r/227254
==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 - https://gerrit.wikimedia.org/r/228813
* 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 - https://gerrit.wikimedia.org/r/230050
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 - https://gerrit.wikimedia.org/r/229389
* 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 - https://gerrit.wikimedia.org/r/228785
==Week 11: August 11-August 19==
* The code in WikidataPageBanner.hooks was refactored to WikidataPageBanner.functions for better organization - https://gerrit.wikimedia.org/r/#/c/229389/
* The functionality to provide links on icons to articles they refer to provided by redefining icons - https://gerrit.wikimedia.org/r/229759
* Class "image" added to banner element so that its recognized by MultimediaViewer - https://gerrit.wikimedia.org/r/230975
* A switch for turning on default banner added so that by default the extension would not add any banners - https://gerrit.wikimedia.org/r/230978
* Banners also need to be added to imagelinks table so that global image usage is tracked - https://gerrit.wikimedia.org/r/230643
* The functionality to focus on a specific area of the banner if the banner is too large has been added - https://gerrit.wikimedia.org/r/230050
* .jshintrc and some qunit tests for client coverage added - https://gerrit.wikimedia.org/r/232195
The extension has been deployed on English Wikivoyage.==Week 12: August 19-August 21==
* TOC dropdowns were hidden by a previous change, Its features would be enabled in a step by step manner after testing it at each stepwhich have now been fixed - https://gerrit.wikimedia.org/r/232759
The extension has been deployed on English Wikivoyage. By default,Its feature to fetch wikidata banner has also been enabled. the extension would not do anything on the wiki. See https://phabricator.wikimedia.org/T98029Major migration to the extension would soon happen.
All the discussions can be tracked at http://en.wikivoyage.org/wiki/Traveller's_Pub
All new additions can be seen at the test wiki http://pagebanner.wmflabs.org/