Page MenuHomePhabricator

Hiding TOC should hide TOC in printout
Closed, ResolvedPublic

Description

Author: pbirken

Description:
If you hide the TOC, the word "Content" is still there, together with "show", to make the TOC appear again. So far so good, but this stuff will appear on a printout, without any meaning. It would be nice to remove it in the printversion alltogether.

Happy new year everybody!


Version: 1.14.x
Severity: enhancement

Details

Reference
bz16869

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:28 PM
bzimport set Reference to bz16869.
bzimport added a subscriber: Unknown Object (MLST).

pyr0 wrote:

(In reply to comment #0)

If you hide the TOC, the word "Content" is still there, together with "show",
to make the TOC appear again. So far so good, but this stuff will appear on a
printout, without any meaning. It would be nice to remove it in the
printversion alltogether.

Happy new year everybody!

printable version shows full TOC table without the possibility to hide at all. Is this the desirable behavior?

I agree to Pyr0: The only way to disable printing the TOC in the article is to disable displaying the TOC everywhere (NOTOC) as toggeling is realized with JavaScript. Otherwise, the TOC is printed completely. So in my opinion, we should close this bug report as there is no bug ;).

But using your user CSS should allow you to hide the TOC with the following code:
@media print { table.toc { display: none; } }

pbirken wrote:

There seems to be a misunderstanding: Go to an article with a TOC. Hide the TOC. Print the article (not via the print version, but via browser). The word "Content" will be in the printout.

Ah, ok. Spontaniously, I only can think of adding a “toggled” class to fix this bug. Maybe someone else has a better idea, otherwise I’ll see how to implement this. The other question is if we have to fix it. Actuallay, you shouldn’t use the browser’s but Wikipedia’s print version…

pbirken wrote:

Personally I would prefer that if I hide the TOC, it should be hidden in both Wikipedia's print version, as well as the browsers, to have a consistent behavior. But what you suggest would certainly be an improvement.

I just wondered why it worked with the trunk version but not with the an older release I had on my laptop… so this will be fixed in version 1.16.

  • This bug has been marked as a duplicate of bug 482 ***