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 updated the task description. (Show Details)

@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)

@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)
ovasileva set the point value for this task to 5.
pmiazga updated the task description. (Show Details)
pmiazga updated the task description. (Show Details)
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.

@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

@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?

@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:

Screen Shot 2017-09-21 at 4.56.31 PM.png (437×1 px, 63 KB)

Then, selecting two columns directs to Special: Book

Screen Shot 2017-09-21 at 4.55.47 PM.png (387×1 px, 114 KB)

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.

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

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

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

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 🙂