-
Notifications
You must be signed in to change notification settings - Fork 99
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
HTML markup, move away from tables #614
Comments
The latex backend uses the exact same heuristic: inline when it's less than a paragraph, block otherwise. We can reuse the logic (and probably move it to We can probably use a touch of flexbox to make the display more reactive too (regardless if we use |
@dbuenzli the HTML part is implemented here : https://github.com/Drup/odoc/tree/heuristic-docsrc |
I wonder in what kind of trap you are trying to get me into :-) but yes I can do that. How do you want to proceed ? |
:innocent look: Just trying to be efficient! Just take the commits and make a PR with them. I fixed a bug about the various |
Ok ! (Not sure I'll do it today though) |
That didn't work so well. :p I'll make a PR and then other people can chime in for the CSS. |
Oups sorry I completely forgot about that. A bit on other deadliny things right now. But yes starting by doing the PR could motivate me to find a bit of time. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. The main purpose of this is to keep the issue tracker focused to what is actively being worked on, so that the amount and variety of open yet inactive issues does not overwhelm contributors. An issue closed as stale is not rejected — further discussion is welcome in its closed state, and it can be resurrected at any time. odoc maintainers regularly check issues that were closed as stale in the past, to see if the time is right to reopen and work on them again. PRs addressing issues closed as stale are as welcome as PRs for open issues. They will be given the same review attention, and any other help. |
Do we still use any table in the html generator ? I'd like to confirm the status of this issue as it was closed by the bot. |
Thanks! |
Tables are being used for documenting type cases and record fields.
This doesn't work in practice for the same reasons mentioned here for module synopses; basically don't use table/alignement if you don't know how long things are going to be beforehand.
Here's an example with two stylesheets that show the problem and how ugly it is no matter the page width:
https://b0-system.github.io/odig/doc/biniou/Bi_inbuf/index.html
https://b0-system.github.io/odig/[email protected]/biniou/Bi_inbuf/index.html
I propose to move to ordered lists
ol
, with oneli
per definition and a twist (if the logic is easy to implement):span
it after the code.div
it.Basically we move from:
to
With appropriate styling this allows HTML renderers to
The scheme should be able to accomodate short and long styles of documenation:
Rendering the thing as:
Besides by using:
user-select:none
on.def-doc
it should be possible to reasonably c&p the definitions; but unfortunately not the content of the doc strings themselves becomes no longer selectable, but from an ergonomic point of view I think you are interested in selecting the definitions most of the time (e.g. because you want to c&p to pattern match on all the cases of a value).Note that applying this to the example mentioned above this will result in 1. which will be ugly. But we argue that the authors should introduce paragraphs. In fact the source already has them albeit not with the blank line that this supposed to separate them.
/cc @Drup
The text was updated successfully, but these errors were encountered: