Page MenuHomePhabricator

Remove printable version mode
Open, NormalPublic

Description

Printable version had one main purpose: Support browsers that didn't support media queries yet.
That purpose is no longer relevant, as the last browser (IE 5.5/6.0) that required it, is no longer supported.

A secondary purpose has been identified, which was that people didn't really know how to print a web page (ctrl-p or file->print). To slightly accommodate that use case, while not relying on printable version, this link was recently adapted to trigger the print dialog using Javascript.

A 3rd use has been to check how a page will look in print. Many browser's web inspectors have a mode to do this, and for the general public, most operating systems provide a "print preview" feature.

As the printable version feature is not well maintained, has a few quirks and adds complexity that is avoidable, I suggest we start fully removing support for printable version.

Event Timeline

TheDJ created this task.Jun 15 2017, 11:40 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 15 2017, 11:40 AM
Kghbln added a subscriber: Kghbln.Jun 15 2017, 1:16 PM
Cpiral added a subscriber: Cpiral.Oct 3 2017, 7:14 AM

Right now, it seems TheDJ's script (to convert MediaWiki's server "printable version" into a browser "print page" dialog) is in effect. But then 1) shouldn't we first remove the "printable version" selection from the sidebar's Print/export section of tools? 2) Firefox Reader Mode is now not cooperating. (It's gone, but will show up on PHP pages such as from the "Permanent link" tool in the sidebar.)

What is the status of this ticket? Because two days ago, I actually got a printable version that was a MediaWiki preview of Beilin District Suihua and not my browser's print dialog. It was random. Never saw one before or since.

Now I have to update Wikipedia: Printing to tell users who want a beautiful print preview from MediaWiki servers to 1) select "Permanent link". 2) edit the URL, and change &oldid=## to &print=yes. This is the only way at the moment to get a printable version that is 1) in a browser tab, and 2) showing accurate styling instead of a separate window with inaccurate styling, paper on desktop view, borders view, headers, etc. The "print previews" are just too different to want to replace one with the other.

TheDJ added a comment.Oct 3 2017, 8:33 AM

@Cpiral No, that's a different script, that script is still no more than a user script, and gives you a few more options that a standard print does not give you.

  1. You see "Printable version" if your Javascript did not load, and "Print page" otherwise.
  2. I don't see how Firefox reader mode has anything to do with this. If you have problems with when and how reader mode is available on Firefox, you should direct those at Firefox.

" I actually got a printable version"

Currently it's a link to the printable version, which is then enriched with Javascript. But that depends on nothing interfering with that process. If you have broken user scripts enabled (which many long term users do), this may fail, and you might only have the link to the printable version.

The rest of your comments make little sense to me. Can you try to explain better what you are trying to achieve ?

@TheDJ Thanks, now I can update WP:Print description. But as for the web inspector and an OS print preview, I will need to search out more information on those to update it fully.

No, even my Firefox and Chrome IP (no login) gets just the printer dialog, so it can't be my JavaScript customization. So I have posted at printable version.

Yes, I guess a MediaWiki printable version that operates could be

  • for a one-click, in-browser usage, by all. Firefox and Chrome have started spawning an out-of-browser process with many issues to then interface with and then dismiss.
  • for testing by template developers using noprint and selfref CSS classes. Wikipedia needs to resolve a slew of issues revolving around them, print preview is a major tool.
  • for testing by browser developers. Browsers can have inaccurate print-previews. See how the Firefox (version 56) print preview of the info-box is only a semi-box? (Its lines are missing on the second page, while the info just floats.) This does not occur in the MediaWiki printable version. A printable version that was a gold standard for print-related projects is a thing of simple beauty.
  • for quality testing by end-users, wondering if and when to create a book or archive.
  • for saving paper and technical debt. Why print a test page when you already have an accurate electronic rendition in our printable version page?
  • for relieving some of the development obstacles in of other, offline-related projects by helping contribute a simple, quick, accurate standard view.

The difference in print related projects is the accuracy, and the layout and presentation of the views and controls. Printable version should be the simple-to-use, fast, standard.

TheDJ added a comment.EditedOct 4 2017, 10:20 AM

for a one-click, in-browser usage, by all. Firefox and Chrome have started spawning an out-of-browser process with many issues to then interface with and then dismiss.

Print is print. If you have complaints about how print works, please direct them at your Browser or Operating System vendor. If they are shoddy, consider switching to a better vendor.

for testing by template developers using noprint and selfref CSS classes. Wikipedia needs to resolve a slew of issues revolving around them, print preview is a major tool.

This is probably the primary reason to keep the printable mode. However... I would like to point out that browsers have web inspectors and extensions that can easily provide similar functionality (which is closer to the actual printing behaviour).

for testing by browser developers. Browsers can have inaccurate print-previews. See how the Firefox (version 56) print preview of the info-box is only a semi-box?

eh.. Please file a bug with Firefox... Entire features as a workaround for a browser bug is generally not a good plan. Also, on my Mac, this problem isn't limited to Print preview, it's actually broken in physical Print too !

for quality testing by end-users, wondering if and when to create a book or archive.

I don't quite understand this point. Can you further detail the use case ?

for saving paper and technical debt. Why print a test page when you already have an accurate electronic rendition in our printable version page?

Print previewing is a core feature of most operating systems. And most also have Print-to-PDF built in.

for relieving some of the development obstacles in of other, offline-related projects by helping contribute a simple, quick, accurate standard view.

This is too vague to base any decisions on. But if this means what I think it means, then I would say: There is no such thing as a standard view to begin with. There are tons of exceptions for print, mobile, excerpts, javascript, user groups etc etc. If anything, depending on this, likely will give you a false sense of security.

This feature of printable version is incomplete, as T51722: ResourceLoader does not process media queries for printable view with JS-added CSS proofs, and maintaining an infrastructure that is entirely correct for this is more annoying and hard than we would want it to be, which drives the desire to potentially remove the entire mode. This feature is not gone yet, but the fact that we still have some needs for it, says more about the browser vendors than about us :(

Restricted Application added a project: Performance-Team. · View Herald TranscriptFri, Aug 23, 2:11 PM
Krinkle lowered the priority of this task from High to Normal.Fri, Aug 23, 2:11 PM
Krinkle moved this task from Inbox to Backlog on the MediaWiki-ResourceLoader board.