Page MenuHomePhabricator

Allow PDF rendering to be triggered only by electron for single-article PDFs
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

When we remove OCG, Electron will be the only option on the selection screen

Acceptance Criteria

  • Remove OCG as a rendering option
  • Remove radio button from single-column option
  • Update https://www.mediawiki.org/wiki/Extension:ElectronPdfService
  • Remove all OCG backend logic from ElectronPDFService extension
  • Bump ElectronPDFService version as this is breaking change
  • Existing instrumentation for Special:ElectronPdf and rendering with the Electron rendering service remains intact

Workflow

tl;dr: https://wikimedia.invisionapp.com/share/WMDH1YGQD#/screens/253241970 (for guideline purposes only - when reviewing form does not need to look exactly like mock)

  1. User selects "Download as PDF".
  2. System displays selection screen with the following:
    • icon
    • heading: Download as PDF
    • article file name (name of article)
    • button: "Download"
  3. User selects "Download"
  4. The PDF download is triggered.

Notes

@phuedx: #6 of the workflow was:

  1. Once download is completed, system navigates user back to original article screen.

AFAIK this is impossible without using newer HTML5 APIs.

  • do not include spinner or back button

Verification steps

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
ovasileva moved this task from Triage to Needs Analysis on the Proton board.
ovasileva triaged this task as High priority.Aug 30 2017, 5:45 PM
ovasileva updated the task description. (Show Details)
ovasileva moved this task from Needs Analysis to Backlog on the Proton board.Sep 6 2017, 6:58 PM
ovasileva added a comment.EditedSep 7 2017, 8:12 PM

@Jdlrobson, @bmansurov- Wait, I think it would be better to just change the title and keep this open. We will need to:

  • trigger electron download not from page with both options but directly from the print to pdf link
  • qa with new styles on production

Is there another task that reflects this?

ovasileva renamed this task from Deploy Electron PDF renderer for single-article PDFs to all projects to Allow PDF rendering to be triggered upon clicking "Print to PDF".Sep 7 2017, 8:13 PM
ovasileva reopened this task as Open.
ovasileva updated the task description. (Show Details)

I see. Then this task is different.

ovasileva updated the task description. (Show Details)Sep 12 2017, 4:18 PM
ovasileva updated the task description. (Show Details)
bmansurov updated the task description. (Show Details)Sep 13 2017, 2:19 PM

@bmansurov - for the difference in renders - we'll get this as a part of T175166: Cleanup and update Electron PDF Service grafana board. We could also combine graphs 1 and 3 and 2 and 4 to have a direct comparison.

@ovasileva - to change this task to removing the double-column option and radio button from original page.

ovasileva renamed this task from Allow PDF rendering to be triggered upon clicking "Print to PDF" to Allow PDF rendering to be triggered only by electron.Sep 13 2017, 4:42 PM
ovasileva updated the task description. (Show Details)

@Nirzar - to add mockup and update to have all information available in T169757: Improve usability of "download as pdf" page

ovasileva moved this task from Backlog to Current Sprint on the Proton board.Sep 14 2017, 3:49 PM
phuedx updated the task description. (Show Details)Sep 14 2017, 5:08 PM
phuedx added a subscriber: phuedx.
ovasileva updated the task description. (Show Details)Sep 14 2017, 5:30 PM
ovasileva set the point value for this task to 5.
pmiazga updated the task description. (Show Details)Sep 14 2017, 5:32 PM
pmiazga updated the task description. (Show Details)
pmiazga updated the task description. (Show Details)Sep 14 2017, 5:35 PM
pmiazga updated the task description. (Show Details)
phuedx updated the task description. (Show Details)Sep 14 2017, 10:06 PM
ovasileva renamed this task from Allow PDF rendering to be triggered only by electron to Allow PDF rendering to be triggered only by electron for single-article PDFs.Sep 15 2017, 2:29 PM
ovasileva moved this task from Current Sprint to Backlog - Q2 on the Proton board.
ovasileva updated the task description. (Show Details)

@ovasileva: What's the rationale for ignoring the spinner/back button in T171956#3610576?

@phuedx - we decided during standup that we'll build the page first so we can retire OCG asap and then continue with additions/improvements. I think @bmansurov had some concerns around adding new functionality to this page as it's based on very old code.

Change 379291 had a related patch set uploaded (by Bmansurov; owner: Bmansurov):
[mediawiki/extensions/ElectronPdfService@master] Remove the option to render books using OCG

https://gerrit.wikimedia.org/r/379291

@ovasileva on Wikipedias where OCG is disabled, the "Download as PDF" triggers a download immediately (as opposed to taking the user to Special:Book). Do we want to keep this behavior? This is something we need to keep in mind when removing OCG completely.

ovasileva added a comment.EditedSep 21 2017, 12:09 PM

@bmansurov - no, that was our initial plan, but we would want the workflow from this task on all projects. i.e. completing this task would remove OCG from the UI on all projects and all projects will be forwarded to special:electronPDF

bmansurov added a comment.EditedSep 21 2017, 12:38 PM

@ovasileva I think there's is a confusion here. Let me try again.

If you go to https://uz.wikipedia.org/wiki/Bosh_Sahifa and click on "Download as PDF", a PDF will be generated immediately. But doing so on enwiki takes the user to the Special:Book Special:ElectronPDF page. Which behavior do we want to keep in the long run?

ovasileva added a comment.EditedSep 21 2017, 2:57 PM

@bmansurov - now I'm a bit confused. Selecting "Download as PDF" on enwiki right now redirects to the selection screen which currently is Special:ElectronPDF:

Then, selecting two columns directs to Special: Book

I think this task was assuming that the changes would be applied in Special:ElectronPDF. Otherwise, we can delete the last page and make them in Special:Book

To confirm, however, selecting "download as PDF" should redirect to the selection screen for all projects.

Sorry, replace "Special:Book" with "Special:ElectronPDF" in my last comment.

Cool, so yeah, this would be for all projects (including the ones that don't redirect to Special:ElectronPDF currently.

FYI, I've renamed 'Selection Screen' to 'Download Screen' in https://grafana-admin.wikimedia.org/dashboard/db/mediawiki-electronpdfservice?orgId=1 as there's no selection in the code anymore.

Jdlrobson updated the task description. (Show Details)Sep 25 2017, 8:07 PM

Change 379291 merged by jenkins-bot:
[mediawiki/extensions/ElectronPdfService@master] Remove option to render books using OCG

https://gerrit.wikimedia.org/r/379291

Jdlrobson updated the task description. (Show Details)Sep 26 2017, 6:48 PM
bmansurov removed bmansurov as the assignee of this task.Sep 26 2017, 6:59 PM

Over to you Anthony.

Looks good on Beta. I tried a few articles and browsers. Only one option for PDF download.

ovasileva closed this task as Resolved.Oct 2 2017, 9:27 AM

looks good to me!

Is this on the train? Or do we have to deploy it separately? @bmansurov, @Jdlrobson?

@ovasileva: Looking at the tag that @ReleaseTaggerBot added, this'll roll out with this week's train. If a task has had a lot of work done to it, then don't trust what @ReleaseTaggerBot is saying though 🙂