Closed
Bug 2068546
Opened 2 months ago
Closed 2 months ago
Document Mermaid diagrams in the documentation skill
Categories
(Developer Infrastructure :: AI for Development, task)
Developer Infrastructure
AI for Development
Tracking
(firefox157 fixed)
RESOLVED
FIXED
157 Branch
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 2 open bugs)
Details
Attachments
(1 external file)
docs/conf.py enables sphinxcontrib.mermaid, so a mermaid block is a supported way to draw a diagram in firefox-source-docs, but the documentation skill says nothing about them: not layout, not arrow labels, not color. Each of the following cost time while adding two flowcharts to browser/components/sessionstore/docs/events.md (bug 2066123), so they are gotchas with a case behind them rather than a reading of the mermaid source:
- A mermaid block always builds, since Sphinx only emits the source into a
<pre class="mermaid ...">and the browser renders it from a CDN at load time../mach docsucceeding says nothing about the diagram, and every failure below is invisible until the built page is opened. - Mermaid emits
<svg style="max-width: <intrinsic>px" width="100%">and the Read the Docs body column is about 700px wide, so a wider diagram is scaled down proportionally: at 1800px intrinsic the text renders at about 40% and is unreadable.flowchart LRandsequenceDiagramreach that with eight participants carrying Firefox-length names, soflowchart TDis the default and the fix is the layout rather than the font size. - A label containing an unbroken word of about 25 characters or more renders as an empty box in Firefox (mermaid#5785). A
wrappingWidth: 400frontmatter config block works around it. - A label starting with
1.is parsed as markdown and renders as the literal textUnsupported markdown: list. A colon instead of the period avoids it. - Distinguishing two kinds of node by fill color alone fails for a colorblind reader and on a low-quality display, so vary the shape too: the stadium
(["text"])reads clearly against["text"], while the rounded rectangle("text")has only a 5px radius.classDeftakesrx/ryfor an intermediate radius, but only with a CSS unit --rx:14is emitted into the style attribute and silently ignored,rx:14pxapplies. - Directive options must be contiguous, immediately after the opening fence: a blank line between
:align:and:caption:ends the option block, and the stray:caption:line then renders as diagram source.
Bug 2068532 inserts an "API references from source comments" section immediately before "Best Practices", which is the natural spot for this one too, so whichever lands second rebases.
Both copies of the skill have to stay identical; ./mach lint -l agent-skills-sync --fix mirrors them.
| Assignee | ||
Comment 1•2 months ago
|
||
Updated•2 months ago
|
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Pushed by dgottwald@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/9d04bc308341
https://hg.mozilla.org/integration/autoland/rev/9d37628b0afa
Document mermaid diagrams in the documentation skill. r=ai4dev-reviewers,padenot DONTBUILD
Comment 3•2 months ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
status-firefox157:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
| Assignee | ||
Updated•1 month ago
|
See Also: → sessionstore-docs
| Assignee | ||
Updated•1 month ago
|
Blocks: sessionstore-docs
See Also: sessionstore-docs →
You need to log in
before you can comment on or make changes to this bug.
Description
•