Repository navigation
doc renderers: changelog entries as highlighted IDL lines, and a theme toggle - #103
Merged
Merged
Conversation
added 3 commits
November 1, 2026 22:38
…e toggle Each changelog entry renders as a severity badge, a short title linking to the unit's anchor, then core's old and new IDL lines (− / +), highlighted at render time as classed spans; a kind with no IDL gets a sentence instead of a field dump. The same entry HTML is inlined into compare.js for the two-version view, and the grid's badges carry the titles as tooltips. The Markdown renderer shows a heading line and a fenced diff block. The changelog heading is just "Changelog". Every HTML page's header gets a theme toggle (auto, light, dark), kept in localStorage when allowed and applied before first paint. Pins comline-core on core#162's branch.
So the generators can depend on this commit's conformance crate with one comline-core in their graph; the generator pins follow once they're on it.
comline-rust and comline-typescript on their deps/core-changelog-idl-lines branches, which pin core#162 and this branch.
This was referenced Nov 1, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two improvements to
comline doc's renderers, on core#162'sold/newchangelog lines.Changelog entries. Each entry renders as:
major/minor/patch, from the list core put it in), a short title (Orders.place: signature changed) whose subject links to the unit's anchor in that version (a function's own anchor for a protocol member; no link when the unit is gone);−old (removed styling) and+new (added styling); an addition shows only+, a removal only−;Shared in
comline_codegen::doc_model:Entry/entries/entry(titles and sentences),unit_target, and a lexical IDL tokenizer (tokens: keywords, types, names, punctuation, literals, annotations, comments). The HTML renderer highlights at render time as classed spans, no JS, with colours for both themes.compare.jsgets each entry's rendered HTML inlined in its data (no rules in JS); the grid's badges carry the entries' titles as tooltips. The Markdown renderer writes a heading line (#### MAJOR · [Orders.place](api.md#orders-place): signature changed) and a fenceddiffblock. The changelog heading is now just "Changelog" in both.Theme toggle. Every HTML page (version pages, the site index and
compare.html) has a header button cycling auto → light → dark, with an icon, label andaria-label. The choice is kept inlocalStorage(try/catch, so blocked storage andfile://work) and applied by a tiny inline<head>script before first paint. CSS: tokens on:root, dark under@media (prefers-color-scheme: dark)guarded by:root:not([data-theme="light"]), and again under:root[data-theme="dark"].Goldens re-blessed; the fixtures carry
old/new(and a changed signature).Pins. comline-core on core#162's branch (codegen and conformance); conformance's generator pins on comline-rust / comline-typescript's matching bumps. Merge after core#162, then the generator PRs.