spec: Experimental switch from shiroa to typst html bundle export - #944
Conversation
…der>, leave a todo about table headers
Kimi Code ReviewAutomated review by Kimi (Moonshot AI) |
Codex Code Review
|
Nope, this is fine, all things state work fine with the bundle, since it's only a single compilation emitting multiple output files.
The outer label is added as an inner label (but without getting an extra numbering level) because outer labels seem to not work properly in html export. The reference goes to the inner label and is as such perfectly resolved. |
erik-3milabs
left a comment
There was a problem hiding this comment.
- I believe the font is too small; I can only read comfortably at 110% zoom.
- the color scheme is 3MI's; should be Aligned/Lambdaclass's (?)
- sidebar:
a. the sidebar minwidth is too small; text wraps when page is made too narrow (but not narrow enough to minimize sidebar)
b. when sidebar is minimized, the word "Navigation" is too close to the hamburger ≡ - lightmode/darkmode:
a. I cannot find a manual toggle; it defaults to the browser setting; I typically prefer darkmode, but not here. 🤷
b. in darkmode, highlighted areas (e.g. Lemma 5, sec 33.3) is barely noticable
c. in darkmode, highlight aroundrawsections (e.g., tags, ranges, var types, etc.) is not noticable. - Re: tables:
a. Range col of virtual overview is too small for DVRM and KECCAK
b. the "About Ecall" section has some weird itemize misalignment issue
c. the tag column is too crammed on 10+ assumption/constraint tables
d. the "range" column is too crammed on ~10 constraint tables - Re: file organization:
a. I'd be inclined to move the .css / .js files to a separate folder. wdyt?
b. perhaps this is also a good moment to clean this folder up and move all section .typ files to a separate folder?
That being said: thanks for taking the time to make this happen. It's great!
| @@ -12,8 +11,6 @@ | |||
| #let chip = load_chip("src/bitwise.toml", config) | |||
|
|
|||
| #let bitwise = raw(chip.name) | |||
|
|
|||
| #show: book-page(chip.name) | |||
There was a problem hiding this comment.
Also, 👏 for the fact that this now runs on my pc without crashing ❤️
Looked fine to me, but I'm used to a small font on my laptop. I'll switch to 18px for now, and we'll see how that looks.
It should be easily configurable, I just went with something working that I had access to, to avoid the ugly greys I had at first.
There is text wrapping, but (imo) not to an unreasonable degree. It's hard to predict the max length of any chapter and avoid any wrapping at any level at all.
True, I'll add a space.
There is (currently) no manual toggle, as I didn't want to have to deal with the pain of figuring out how to do it cleanly and adding the js required for it. For testing purposes, there's a toggle in the devtools.
Both somewhat dependent on (2) atm, but I'll change them to the
Not really a misalignment, as it's not an itemize, but just how
I'll see if I can make the "peripheral" columns take up exactly the space they need, and then we hope that the "central" column doesn't get too cramped.
Fair, I considered it, but didn't feel like I needed it when it was just the single
Perhaps, not sure of a good name yet though. |
Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com>
👍
👍
👍
What devtools are you referring to? I don't see it documented.
👍
👍
👍
👍
👍 |
Kimi Code ReviewAutomated review by Kimi (Moonshot AI) |
Codex Code Review
|
erik-3milabs
left a comment
There was a problem hiding this comment.
This PR looks and feels really solid 👍
Given this, I don't think it is worth me spending more time on reviewing all the tiny tricks you performed to make things look and feel this way.
I'm leaving three minor comments of things that caught my eye as I perused this change list.
| interaction_count.json | ||
| ebook.pdf | ||
| bundle/* | ||
| spec.pdf |
There was a problem hiding this comment.
Is there a reason to just block spec.pdf? Why not just *.pdf?
There was a problem hiding this comment.
A habit of avoiding *.pdf because sometimes you want to include figures as PDF
| @@ -1,3 +1,3 @@ | |||
| #import "/meta.typ": meta, common-formatting, highlights | |||
|
|
|||
| #context assert(target() == "bundle", message: "Please compile this file only with `--format bundle`") | |||
There was a problem hiding this comment.
This doesn't seem to work 100%; executing typst watch bundle.typ doesn't trigger this assert (where I'd expect it does).
There was a problem hiding this comment.
Yeah, I noticed that too, at some point, but I think it's an effect of having a panic inside context, which doesn't really propagate.
I'm not sure how to solve it better, tbh.
| #theme-toggle { | ||
| border: 1px solid var(--text); | ||
| border-radius: 2em; | ||
| width: 2em; | ||
| height: 2em; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| color: var(--gold); | ||
| background-color: var(--text-muted); | ||
| } | ||
|
|
||
| #theme-toggle input ~ span::before { | ||
| content: "⏾"; | ||
| } | ||
|
|
||
| #theme-toggle input { | ||
| display: none; | ||
| } | ||
|
|
||
| @container style(--theme: dark) { | ||
| #theme-toggle { | ||
| background-color: var(--bg-subtle); | ||
| } | ||
|
|
||
| #theme-toggle input ~ span::before { | ||
| content: "☀︎︎"; | ||
| } | ||
| } |
There was a problem hiding this comment.
I would expect the background-color of the button to either
- always match the background of the header, or
- always match the header background color you'd get if you hit the toggle button
i.e., something like
| #theme-toggle { | |
| border: 1px solid var(--text); | |
| border-radius: 2em; | |
| width: 2em; | |
| height: 2em; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: var(--gold); | |
| background-color: var(--text-muted); | |
| } | |
| #theme-toggle input ~ span::before { | |
| content: "⏾"; | |
| } | |
| #theme-toggle input { | |
| display: none; | |
| } | |
| @container style(--theme: dark) { | |
| #theme-toggle { | |
| background-color: var(--bg-subtle); | |
| } | |
| #theme-toggle input ~ span::before { | |
| content: "☀︎︎"; | |
| } | |
| } | |
| #theme-toggle { | |
| border: 1px solid var(--text); | |
| border-radius: 2em; | |
| width: 2em; | |
| height: 2em; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: var(--gold); | |
| background-color: var(--text-muted); | |
| } | |
| #theme-toggle input ~ span::before { | |
| content: "⏾"; | |
| } | |
| #theme-toggle input { | |
| display: none; | |
| } | |
| @container style(--theme: dark) { | |
| #theme-toggle input ~ span::before { | |
| content: "☀︎︎"; | |
| } | |
| } |
or
| #theme-toggle { | |
| border: 1px solid var(--text); | |
| border-radius: 2em; | |
| width: 2em; | |
| height: 2em; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: var(--gold); | |
| background-color: var(--text-muted); | |
| } | |
| #theme-toggle input ~ span::before { | |
| content: "⏾"; | |
| } | |
| #theme-toggle input { | |
| display: none; | |
| } | |
| @container style(--theme: dark) { | |
| #theme-toggle { | |
| background-color: var(--bg-subtle); | |
| } | |
| #theme-toggle input ~ span::before { | |
| content: "☀︎︎"; | |
| } | |
| } | |
| #theme-toggle { | |
| border: 1px solid var(--text); | |
| border-radius: 2em; | |
| width: 2em; | |
| height: 2em; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: var(--gold); | |
| background-color: var(--bg-muted); | |
| } | |
| #theme-toggle input ~ span::before { | |
| content: "⏾"; | |
| } | |
| #theme-toggle input { | |
| display: none; | |
| } | |
| @container style(--theme: dark) { | |
| #theme-toggle input ~ span::before { | |
| content: "☀︎︎"; | |
| } | |
| } |
(I don't know whether/how that debate was settled in the accessibility community...)
What is your reason for having the button's background color stay roughly constant?
There was a problem hiding this comment.
I found the "use the other background color" to be too jarring, and "use the normal background color" to not really stand out enough.
The current choice looked okay to my eyes, with no explicit accessibility reasoning behind it
Yup, this is an actual problem. |

This moves most of the pain of working with shiroa into something more under our control, and additionally gets significant compilation speed improvements.
Minimal required typst version becomes 0.15.0 because of this.