Page MenuHomePhabricator

[EPIC] Print styles - desktop
Open, HighPublic

Description

User Story

As a user, I want the ability to save a soft copy of an article from my desktop computer, so that I can read them later when I'm offline.

As a user, I want the ability to print an article in a printer friendly way.

Acceptance criteria:

  • Create PDF style for browser printing
  • Ensure styles are optimal for soft and hard copies (design criteria)

Subtasks

(to be created upon working on this task)

  • The branding will require some changes to ResourceLoaderSkinModule to support display of a different logo in print mode. We'll probably want to look at this PHP code first.
  • Style tweaks in print mode
    • We're going to make some minor tweaks to typography in print mode
    • Broken paddings/margins
    • Hide things such as article indicators such as favourite article
    • Parts of OCG (to be defined by @Nirzar) will be added
    • We will remove certain elements (to be defined)
  • We'll need to resolve T24256

acceptance criteria

  • Implement new print styles for desktop - ensure all subtasks are closed
  • Styles should be feature flagged
  • New styles should be enabled on the beta cluster to allow us to gather feedback from community.
  • Ensure styles are also applied to PDFs

open questions

  • It's unclear how we want to measure this right now, but we are exploring A/B tests (See T169731).

Related Objects

StatusAssignedTask
OpenJKatzWMF
OpenNone
DuplicateNone
OpenJKatzWMF
OpenNone
OpenNone
Resolvedpmiazga
InvalidNone
OpenNone
Resolvedovasileva
InvalidNone
Resolvedphuedx
OpenNone
InvalidNone
InvalidNone
OpenNone
ResolvedNirzar
ResolvedJdlrobson
ResolvedNirzar
Openovasileva
ResolvedJdlrobson
ResolvedNirzar
ResolvedNirzar
ResolvedJdlrobson
ResolvedNirzar
Resolvedovasileva
ResolvedNone
ResolvedTheDJ
DuplicateNone
ResolvedNirzar
ResolvedNirzar
OpenNone
Declinedmobrovac
StalledJdlrobson
DeclinedNone
StalledNirzar
ResolvedNirzar
OpenNirzar
ResolvedNirzar
Resolvedovasileva
Resolvedovasileva
Invalidovasileva
Resolvedovasileva
OpenNone
Resolved Tbayer
Resolvedphuedx
Resolvedphuedx
ResolvedABorbaWMF
Resolvedovasileva
DeclinedNone
ResolvedABorbaWMF
OpenNone
ResolvedABorbaWMF
Resolvedmatmarex
Resolvedphuedx
ResolvedNirzar
OpenNone
OpenNirzar
ResolvedJdlrobson

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 10 2017, 2:18 AM
ovasileva triaged this task as High priority.Jan 10 2017, 5:34 PM
Jdlrobson renamed this task from Print styles - desktop to [EPIC] Print styles - desktop.Apr 18 2017, 11:45 PM
Jdlrobson added a project: Epic.
ovasileva updated the task description. (Show Details)May 9 2017, 5:36 PM

@Jdlrobson - do you know if it's possible set up an a/b test between the new and old styles? Can we send multiple styles to the browser?

Not really. In theory we could do this but it would mean limiting print styles to users with JavaScript and/or double loading them. Since we are targetting users with inferior browsers this might not be the best of ideas.

What would such a a/b test look like anyway? What would be the proposal? Most importantl, why do we feel the need to test this?

@Jdlrobson - since we'll be making a large change to our print styles, we'd like to see if this has any effect on how often people print, with the hypothesis that the new print styles do not cause users to print less often (i.e. we haven't accidentally removed something that was valuable)

I don't think it's worth trying to measure anything else. If we can bucket users, the a/b test would look something like (@Tbayer - feel free to add any corrections to the outline below):

  1. Deploy new styles to all wikis
  2. Assign 50% of users to the new styles and 50% of users to the old styles
  3. Track the rates of usage for each group (how often they print)

If we can't do this with the browser print, perhaps we can also set up something similar to the OCG/Electron rendering test on mediawiki from the printable version link (although we should first double-check if anyone is using this link at all) - randomly assign the old or new styles when the link is clicked and track that. Perhaps we can just set up a grafana board similar to https://grafana.wikimedia.org/dashboard/db/mediawiki-electronpdfservice?orgId=1&from=1484922362966&to=1495290362970

We have no a/b test infrastructure to ship different styles.

Option 1: we can a/b test logged in users (no caching for those users).
2: We can make styles JavaScript only but this would break the experience for users without JavaScript

2 seems irresponsible to me; will probably not go down well with members of community and i wouldnt recommend.

I should remind you that setting up analysis is expensive and may delay the project.

@Nirzar, here is a list of articles for which it would be good to get design input on: T167117. This will help us to know more about print styles before starting work on them.

Nirzar updated the task description. (Show Details)Jul 5 2017, 10:35 PM
matmarex removed a subscriber: matmarex.Aug 1 2017, 5:03 PM
ovasileva updated the task description. (Show Details)Sep 12 2017, 4:09 PM
TheDJ added a subscriber: TheDJ.Oct 18 2017, 4:10 PM

@Nirzar and @Jdlrobson

We should add https://en.wikipedia.org/w/index.php?title=MediaWiki:Print.css&diff=805936765&oldid=805591761 this to the stylesheets. Otherwise pages with lots of floating content like https://en.wikipedia.org/wiki/Template:Didcot,_Newbury_and_Southampton_Railway, have that black bar and licensing info next to the floating element. which isn't particularly nice usually.

@TheDJ sounds good to me. If you submit a patch I can happily merge. Otherwise, hopefully I can remember in 2 weeks time (team is about to pause for an off site)