Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005544OCamlOCamldocpublic2012-03-16 23:282012-05-07 11:43
Reportervfiack 
Assigned Toguesdon 
PrioritynormalSeveritytrivialReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005544: improve produced html so we can build better stylesheets
DescriptionSummary of the patch:

* no empty h1 in the main index, use a default title
* navbar present in all pages, with classes added to pre/up/post links
* span with class instead of font with fixed color for deprecated module info
* variants with constructors are also in a

* ul in index link list
* removed <center> and useless
tags

+ css modifications (less important, discard if you want)
Additional Informationsample result: http://vfiack.fr/ocaml/doc/ [^]
TagsNo tags attached.
Attached Filesdiff file icon odoc_html.ml.diff [^] (13,300 bytes) 2012-03-16 23:28 [Show Content]
? file icon odoc_html.ml.diff2 [^] (13,580 bytes) 2012-03-17 13:31

- Relationships

-  Notes
(0007097)
protz (manager)
2012-03-16 23:33

That's pretty cool. However, the formatting seems to be off at least on <http://vfiack.fr/ocaml/doc/Gc.html>. [^] Is that intentional?
(0007098)
dbuenzli (reporter)
2012-03-16 23:46

Yes. It would be nice if all the br and hr could be removed and the markup generation could be reviewed for better semantic markup, adding approriate class names where needed. For the record here are the various hacks I have to use with the current markup in my stylesheet :

hr, hr + br, div + br, center + br, span + br, ul + br, ol + br, pre + br
{ display: none } /* annoying */

code br { display: inline } /* because of the above span + br rule */
pre + code { white-space:nowrap; /* in code examples we don't wrap. */
             line-height:1.375em; } /* and the line height is too large. */
code + pre { margin-bottom:1.375em} /* after code example we introduce space. */
center { text-align: left }
center + br + pre { margin-bottom:1.375em} /* Toplevel module description */
div.info + br + code { display:block; margin-top: 1.375em} /* Records */

Also generating valid html could also make the task easier for consistency across different browsers see PR 0005111.
(0007099)
vfiack (reporter)
2012-03-17 13:30

The formatting in Gc wasn't intentional, I forgot to close a pre tag for record types. This is fixed.
(0007101)
gasche (developer)
2012-03-19 15:01

I don't like the fact that code examples that are part of the comments have a red background like signature items. See for example (let f () = "foo") in http://vfiack.fr/ocaml/doc/String.html [^]

It seems the generated HTML makes it impossible to do the difference. Maybe you could tweak it again to get different classes for those?

PS: there are two ways to put code in ocamldoc's formatted comment, preformatted {[ foo ]} and verbatim {v foo v}. Both should be handled, possibly with even finer class distinctions to be able to distinguish them, but I'm not sure that's terribly important.
(0007104)
vfiack (reporter)
2012-03-19 22:21

added a "codepre" and "verbatim" classes + the css to reset the background & border.

new patch is here : http://vfiack.fr/ocaml/odoc_html.ml.diff [^]
(0007106)
meyer (developer)
2012-03-20 02:56

+1

I like the proposed doc style quite much - it's pleasant and readable.

Did anybody try it on a different browsers than Firefox?
(0007117)
vfiack (reporter)
2012-03-20 18:48

I've tested it on chrome, IE 8, and an android phone browser.

The first column of the module index table wasn't grey in IE (:first-child isn't supported). I've changed the generator to add a css class to fix this.

Everything else seems ok.

The patch is up to date.
(0007418)
guesdon (manager)
2012-05-07 11:43

Partially applied patch in revision 12434. What was not applied: some of the style to keep original display, except for table of modules.
Thanks for the patch.

- Issue History
Date Modified Username Field Change
2012-03-16 23:28 vfiack New Issue
2012-03-16 23:28 vfiack Status new => assigned
2012-03-16 23:28 vfiack Assigned To => guesdon
2012-03-16 23:28 vfiack File Added: odoc_html.ml.diff
2012-03-16 23:33 protz Note Added: 0007097
2012-03-16 23:46 dbuenzli Note Added: 0007098
2012-03-17 13:30 vfiack Note Added: 0007099
2012-03-17 13:31 vfiack File Added: odoc_html.ml.diff2
2012-03-19 15:01 gasche Note Added: 0007101
2012-03-19 22:21 vfiack Note Added: 0007104
2012-03-20 02:56 meyer Note Added: 0007106
2012-03-20 18:48 vfiack Note Added: 0007117
2012-05-07 11:43 guesdon Note Added: 0007418
2012-05-07 11:43 guesdon Status assigned => closed
2012-05-07 11:43 guesdon Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker