feat: Add an option for /doc/html that renders as HTML#10016
feat: Add an option for /doc/html that renders as HTML#10016martinthomson wants to merge 4 commits intoietf-tools:mainfrom
Conversation
This tries to make the HTML rendering look good, using the native bootstrap styling as much as I can be bothered to do for now.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10016 +/- ##
==========================================
- Coverage 88.55% 88.54% -0.01%
==========================================
Files 317 317
Lines 42343 42387 +44
==========================================
+ Hits 37496 37531 +35
- Misses 4847 4856 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@larseggert, you might have some insight into whether this is complete enough to preview given your experience of how this was put together. |
larseggert
left a comment
There was a problem hiding this comment.
LGTM in terms of the code. (Which wasn't pretty to begin with.) We should somehow remove display options ratehr than adding them, but 🤷.
Nit: Why is the metadata block not left-adjusted? Having it kinda-but-not-quite centered looks weird to me.
|
The metadata block is left-adjusted, but I haven't spent a lot of time tweaking anything here, so some of the sizes are probably off, based on the choice of fonts and other things. So the left padding, which needs to be long enough to handle the longest possible label in that block, is probably a little bit more generous than it needs to be. I spotted a few minor errors like that; there will likely be more, but it might be OK as a non-default option to iterate that way. |
This is a little hacky in that it relies on xml2rfc inserting `<dd class="break"></dd>` after each reference, but that seems to be something that we can rely on consistently across the series. This is, as far as I can tell, character-for-character identical to the placement used in xml2rfc's text generation output. I had to make a small tweak to the layout for regular definition lists as well, but that's fairly minor (it was missing an indent). See martinthomson/rfc-txt-html#13 for a discussion on the fix. Based on ietf-tools#10016, but this could be retargeted at main if that makes more sense.
|
The test failures here seem unrelated:
|
|
@martinthomson, Is your motivation behind this to add an option to display HTML similar to what |
jennifer-richards
left a comment
There was a problem hiding this comment.
My comment about proliferation of styles on #10024 really belongs here, I guess. Another option is ok with me now, but wouldn't want the number to keep growing.
|
@kesara, more or less. Though it's not that simple. The stylesheet needs to integrate with datatracker to pick up things like light/dark modes, colors, and fonts. I acknowledge the style proliferation, but I think we have people who want non-txt-looking HTML, even if the "brand" is monospaced. |
This tries to make the HTML rendering look good, using the native bootstrap styling as much as I can be bothered to do for now.
I've retained the HTML-that-looks-like-text default.
Preview:
Dark: