After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 449618 - Top navigation bar is in the way
Top navigation bar is in the way
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.9
Assigned To: Stefan Sauer (gstreamer, gtkdoc dev)
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-20 21:47 UTC by Björn Lindqvist
Modified: 2007-09-22 19:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
different css for screen and print (2.38 KB, patch)
2007-08-08 20:03 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
different css for screen and print (2.58 KB, patch)
2007-08-09 19:08 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Björn Lindqvist 2007-06-20 21:47:04 UTC
I guess a lot of thought went into the navigation bar that gtk-doc puts on every documentation page. It is a nice feature, but it has usability problems.

When you search for a term (using ctrl+f in Firefox), the match may come up behind bar. Firefox finds it but since its hidden behind the bar you wonder why it wasn't found. When printing the bar overwrites the top of all pages and makes the printout unusable. That wouldn't be a problem, except that there is no easy way to make pdfs with gtk-doc :(. And on small screens, the bar steals quite a lot of vertical space. I would be much happier with a navigation bar that is embedded in the page even if it means you have to press Home to access it.
Comment 1 Yeti 2007-07-08 13:45:01 UTC
The navigation bar should be styled out for printing with something like

@media print {
  table.navigation {
    visibility: collapse;
    display: none;
  }
}

in style.css anyway.
Comment 2 Björn Lindqvist 2007-07-08 20:10:26 UTC
That css-code would fix the printing problem, yes. It requires you to regenerate the docs with the modified stylesheet which requires you to have all gtk-doc tools plus the source for the GNOME package which you want to generate documentation for. That becomes an unreasonably big job if you want to print some modules documentation. Alternatively, all GNOME modules could put online printable versions of their documentation, but that is also a lot of work. Easiest way to fix it is, IMHO, just to make gtk-doc more printer-friendly.
Comment 3 Yeti 2007-07-08 20:48:37 UTC
The only thing gtk-doc does is generating the documentation.  Any gtk-doc change to make it more printer-friendly -- actually any gtk-doc change at all -- requires to re-generate the documentation to take effect.  Therefore I fail to see how the fact that one has to re-generate the documentation can be used as an argument against (or for) anything.

I suggested the CSS printing fix (note it should also include the removal of the 3em space as below) because it is easy, noncontroversial (unlike the removal of top bar fixed positioning), and if one really want this, it can be even done easily with already generated documentation by editing a single file per package.  No special tools and no unreasonably big jobs are involved.

In fact, one can equally easily change the top bar from fixed to normally positioned with:

--- style.css   2007-07-08 22:33:10.000000000 +0200
+++ style.css.nf       2007-07-08 22:33:07.000000000 +0200
@@ -30,11 +30,6 @@
   border: solid 1px #ffaaaa;
   margin-top: 0;
   margin-bottom: 0;
-  position: fixed;
-  top: 0;
-  left: 0;
-  height: 2em;
-  z-index: 1;
 }
 .navigation a 
 {
@@ -57,8 +52,6 @@
 div.refentry, div.chapter, div.part, div.book, div.index, div.glossary, div.sect1, div.appendix
 {
   position: relative;
-  top: 3em;
-  z-index: 0;
 }
 div.refnamediv 
 {

I don't know how to make this option easily available for users, though.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-08 20:03:08 UTC
Created attachment 93306 [details] [review]
different css for screen and print

What about this patch? You can easily test changes using preint-preview in the browser.
One thing that needs fixing still is that it hides the document name on the front page (as this uses the top navigation box).
Comment 5 Björn Lindqvist 2007-08-08 21:32:25 UTC
Looks good! I'd still prefer getting rid of the fixed positioning entirely (for the document name issue and other problems), but that patch is better than nothing.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-09 19:08:30 UTC
Created attachment 93390 [details] [review]
different css for screen and print

this keeps the titlepage box visible, but turns it into nonfixed. Is thsi now good enough to close the bug?
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-11 13:53:06 UTC
Björn, please reopen if needed.

2007-08-11  Stefan Kost  <ensonic@users.sf.net>

	* style.css:
	  Hide fixed navigationbar when printing. Fixes #449618