This is the first task for the mobile PDF functionality with scope of building and instrumenting the download button
- Add new article action - SVG below
- Tapping on the action triggers mobile browser print option
- User returns to article using Native OS controls
and Zeplin https://zpl.io/2vMpr4r
- 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
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
- 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.
The new feature has been enabled on reading web staging.
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.