-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add classes to the odoc HTML page structure. #589
Conversation
1. Classify the root odoc tree (currently a `body` element) as `odoc`. This closes ocaml#298 and will help stylesheet management/composition if ocaml#374 ever becomes a reality. 2. Classify toplevel `nav` as `odoc-nav` (new class) 3. Classify module preamble `header` as `odoc-preamble` (new class) 4. Reclassify the toc `nav` from `toc` to `odoc-toc`. 5. Reclassify the content `div` rom `content` to `odoc-content`. Closes ocaml#298.
The |
The mdx submodule is temporary. The problem is that we're using mdx for some tests, but mdx depends on the odoc comment parser. The solution is to undo the merge of octavius into odoc and distribute the comment parser as a separate project. Mdx can then depend upon that, and odoc can depend upon mdx, and the dependency cycle will be removed. It's a few days work though as the parser is tangled up with the model and it needs a bit of unravelling. |
Dropping the dependency seems a simpler course of action… When I'm testing |
yes, but we |
But this has been a constant source of problems. I'm going to nuke the tests until we can remove the parser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me. 👍
As for the tests .... I fully agree, I already apply your "pro tip", and it's still a real pain. I don't even actually understand the scripting used for testing and why it's so bad. :/
Well I'll let you judge. But frankly migrate them to something simpler. I heard The leaner the tooling, the easiest it is to contribute and maintain. I mean I had to install 2 non-opam packages on my system, a bunch of opam packages including one that has a cyclic dependency on
The parser feels right in |
Right, it’s something I plan on doing in the coming days, just that there seems to be pressing issues that @jonludlam suggested to be addressed before the next |
@jonludlam Are we waiting for the new testing for this ? We could merge it as-is (modulo rebase, ofc). |
I'm going through the PRs now, with some manual testing. |
Thanks @dbuenzli |
/cc @Drup I'm being told by @jonludlam
body
) asodoc
. This closes Replace thecontent
class byodoc
#298 and will help stylesheet management/composition if Allow to generate page fragments #374 ever becomes a reality.nav
asodoc-nav
(new class)header
asodoc-preamble
(new class)nav
fromtoc
toodoc-toc
.div
rom.content
to.odoc-content
.Altogether this allows to replace complicated CSS selectors like:
By:
Besides 1. allows to specify
odoc
page geometry without having to refer to the root tree kind o element (currentlybody
which you won't control if you get embedded).Pro-tip
To deal with the utterly user-friendly expect test system when you change the markup you want:
It's slow but at least you don't have to c&p a cli invocation 50 times. Someone ought to fix that madness (I tried various forms of
--auto-promote
,dune promote
without any success).