Background
This is the first task for the mobile PDF functionality with scope of building and instrumenting the download button
Design/Flow
- Add new article action - SVG below
- Tapping on the action triggers mobile browser print option
- User returns to article using Native OS controls
Asset
and Zeplin https://zpl.io/2vMpr4r
Acceptance criteria
- Add button to article action bar on mobile
- Button must appear on all article namespace pages except the main page
- When user selects button, Print menu should be triggered
- This article action shows only for UA Android
- The button does not show if you have JavaScript disabled or you are using a grade C browser e.g Opera Mini
Printing on iOS
Note we will exclude this button from iOS as the native browser print there does not provide pdf functionality
Although iOS 11 has print to pdf functionality we are not aware of any way to invoke it programmatically via JS and it does not apply our own print styles (see https://phabricator.wikimedia.org/T177215#3700576)
Archived from previous way to solve this problem
Questions
- Since we don't have a backend, what will clicking the button trigger?
@phuedx: It doesn't really matter.
- Should this be feature flagged? Yes.
@phuedx: In the short term, we could develop this feature in a feature branch and deploy it to the staging server.
There should be a single feature flag that defaults to false.
Testing criteria
The new feature has been enabled on reading web staging.
Visit http://reading-web-staging.wmflabs.org/w/index.php?title=Dave_Gallaher&mobileaction=toggle_view_mobile
A print button should show in all browsers except iOS with the exception of Grade C browsers (e.g. Opera Mini and UTC browser).
Clicking it should print.








