Page MenuHomePhabricator

noprint content is hidden
Closed, ResolvedPublic

Description

Author: chris

Description:
https://github.com/hcatlin/wikimedia-mobile/commit/e833f5364048254761d9206f17b3b1ccd5791ddd

The above commit adds .noprint to the list of items to be removed from the page. Presumably its intention is to hide {{invitation to edit}} templates. However, some (e.g. time-dependent) content marked as noprint is desirable on mobile.

It would probably be better to add a more specific class to the table in the template, which can then be removed by the mobile parser. Best guess would be editsection, which is already removed by the parser anyway.


Version: 1.20.x
Severity: normal

Details

Reference
bz29157

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 11:31 PM
bzimport set Reference to bz29157.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.May 26 2011, 7:56 PM
  • Bug 33189 has been marked as a duplicate of this bug. ***

Copying this comment from bug 33189 comment 1:

Re-using the "noprint" class is clever, but ultimately unwise. Sometimes you want things to not be on mobile and sometimes you want things to not be on print. They're distinct categories, with some overlap. Luckily, CSS supports multiple classes.

There should be a "nomobile" class that should be used when people want to hide things from mobile. Currently it looks like people are inserting dummy classes to trick the mobile parser (cf. https://en.wikipedia.org/w/index.php?tiitle=Template:Birth_date_and_age&diff=479816119&oldid=436607844). This is bad.

+1 to MZMcBride's comment such a convention would also help problems in the mobile site (for example bug 20030)

so we need

.nomobile
.noscreen
.noprint

  • Bug 36742 has been marked as a duplicate of this bug. ***

changing component to MediaWiki. Issue is not only "mobile" related.

(In reply to comment #4)

so we need
.nomobile
.noscreen
.noprint

Is there ever a case for content to be not on the screen?

(In reply to comment #7)

(In reply to comment #4)

so we need
.nomobile
.noscreen
.noprint

Is there ever a case for content to be not on the screen?

Yes. I have a case in my enterprise wikis:

I show a shortcut Url in a specific form

+ screen url=http://tinyurl.com/xyz" text="tinyurl/xyz" (to keep text as short as possible on screen)
+ print url=text="http://tinyurl.com/xyz"

in the print version.

(In reply to comment #8)

(In reply to comment #7)

(In reply to comment #4)

so we need
.nomobile
.noscreen
.noprint

When we fix this issue, we should simply add such a ".noxyz" class for any media xyz in a standardised form.

andy wrote:

We should not have classes like "noprint" (which is a presentational description). Instead we should class elements descriptively, like "time-sensitive", "navigational", etc; and then style such classes to print, or not, as appropriate.

Probably too late now, though...

(In reply to comment #10)

Probably too late now, though...

Certainly too late for 1.20 tarball.

Aklapper lowered the priority of this task from Normal to Low.Mar 25 2015, 4:07 PM
TheDJ closed this task as Resolved.Nov 5 2015, 10:04 PM
TheDJ claimed this task.
TheDJ added a subscriber: TheDJ.

Closing this. It was originally a problem in the original mobile proxy, that no longer exists. The problem also was copied into MobileFrontend but has been fixed there for quite a while.