[edit] links should not print in Wikidata
Open, LowPublic

Description

In printout, links to [edit] or [add] a statement should not be visible.

Patch-For-Review:

FriedhelmW updated the task description. (Show Details)
FriedhelmW raised the priority of this task from to Low.
FriedhelmW added a project: Wikidata.org.
FriedhelmW added a subscriber: FriedhelmW.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 17 2015, 8:01 PM
FriedhelmW renamed this task from Wikidata: [edit] links should not print to [edit] links should not print in Wikidata.Jan 23 2015, 7:17 AM
daniel added a subscriber: daniel.Mar 3 2015, 11:11 AM

In EntityParserOutputGenerator, call $options->setEditSection( false ) if $options->getIsPrintable()

FriedhelmW added a comment.EditedMar 3 2015, 3:48 PM

Could this be solved using CSS @media print?

Some CSS similar to

 @media print {
	.wikibase-toolbarbutton {
		display: none;
	}
 }

should fix it.

Change 343851 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
[mediawiki/extensions/Wikibase] Disable editing in printable=yes mode

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

thiemowmde moved this task from Proposed to Review on the Wikidata-Sprint board.Mar 21 2017, 11:47 AM

I demoed this to @Lydia_Pintscher and got approval to add this to Wikidata-Sprint. I spend most time on figuring out why the test behaves different from the production code, and found https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/MediaWiki.php;69fab9a8179350fc01876d9ea3a253d6e080e1db$179 *shudder*. All solved in https://gerrit.wikimedia.org/r/343851.

thiemowmde updated the task description. (Show Details)Mar 21 2017, 11:48 AM

Change 343851 merged by jenkins-bot:
[mediawiki/extensions/Wikibase] Disable editing in printable=yes mode

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

TheDJ added a subscriber: TheDJ.Mar 21 2017, 8:44 PM

Ehm you can print without using printable=yes of course...

This is what CSS media queries are for, not our printable=yes mode...

@TheDJ, that's right.

Some CSS similar to

 @media print {
	.wikibase-toolbarbutton {
		display: none;
	}
 }

should fix it.

thiemowmde closed this task as Resolved.Mar 22 2017, 10:49 AM
thiemowmde moved this task from Review to Done on the Wikidata-Sprint board.
thiemowmde removed a project: Patch-For-Review.

you can print without using printable=yes […] This is what CSS media queries are for […]

Both should work. It appears the later was never a problem, but printable=yes was.

  • When calling a page with printable=yes, section editing is disabled on wikitext pages. The Wikibase UI should respect this and not initialize it's edit toolbars. Fixed with https://gerrit.wikimedia.org/r/343851.
  • When printing a page without calling the printable version first, a print stylesheet is applied, which already works fine, as far as I can see.
thiemowmde updated the task description. (Show Details)Mar 22 2017, 10:50 AM

Well i include a screenshot what of what I currently see when hitting print:

The blocks are a bug with svg images in print mode in Safari, but i clearly get edit buttons atm, I see no evidence that they are being hidden for me. Am I misunderstanding the problem ?

thiemowmde reopened this task as Open.Mar 24 2017, 9:03 AM
thiemowmde edited projects, added Easy; removed Wikidata-Sprint.
thiemowmde removed thiemowmde as the assignee of this task.

I must have done something wrong. You are right, I also see edit buttons in the Firefox print preview now. I'm moving this ticket back because an essential part of it is not done. However, what we needed to do for T160256 in our current Wikidata-Sprint is done.

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptMar 24 2017, 9:03 AM