[meta] Mermaid bugs / improvements
Categories
(Developer Infrastructure :: Source Documentation, task)
Tracking
(Not tracked)
People
(Reporter: dao, Assigned: dao)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: meta)
The Firefox source docs write diagrams as text, a mermaid block beside the prose, and the documentation build does not draw them. It copies the diagram source into the published page, and JavaScript draws it in the reader's browser, so a diagram's legibility is settled only after the build has finished. This effort makes a diagram render the way its author laid it out: at its own size, centered while it fits the column, in the reader's color scheme, reachable by keyboard, drawn at all when the author wrote valid source, and available in the notations mermaid supports.
The build cannot see any of these defects. It exits zero whatever the diagram does, so a broken diagram reaches the published site and is visible only to someone who opens the page. The diagrams went unreadable on the live site while every build was green, and a diagram can publish its own source instead of drawing with no error anywhere in the build log.
The size defect was the one readers hit most. The page drew every diagram at the width of the body column, whatever size its author laid it out at, so a small diagram was stretched and a large one squeezed until its labels were unreadable. Authors compensated by laying diagrams out for the column instead of for their content, and this effort corrects that advice too.
Progress at a glance
| Phase | Goal | Bug | Status |
|---|---|---|---|
| 1 | Stop the published diagrams rendering too small and in the wrong colors | bug 2070769, bug 2070774 | DONE |
| 2 | Write the rendering model and its traps into the author guidance | bug 2068546 | DONE |
| 3 | Draw each diagram at the size its author laid out | bug 2071258 | DONE |
| 4 | Make a diagram wider than the column visible and keyboard reachable | bug 2071267, bug 2071268 | DONE |
| 5 | Center narrow diagrams horizontally | bug 2072107 | DONE |
| 6 | Bring the author guidance up to the new rendering behavior | bug 2071289 | DONE |
| Caption trap | Catch a diagram that publishes its own source instead of drawing | bug 2071286 | DONE |
| ZenUML | Enable ZenUML diagrams, handle overflow, update the docs skill | bug 1931724, bug 2073571, bug 2073570 | DONE |
| Mermaid 12 | Update to the current Mermaid release, keeping how diagrams look | bug 2084585 | DONE |
| Handle overflowing diagrams when printing | bug 2084298 | DONE | |
| ELK | Turn on the ELK layout engine for dense flowcharts | bug 2084613 | DONE |
| Neo look | Switch to Mermaid 12's default look and theme | bug 2084689 | DONE |
| Text | Render diagram text in the page's size and font | bug 2088432 | DONE |
| 7 | Fix problems discovered by a systemic regression check | bug 2088675, bug 2088683, bug 2088498 | IN REVIEW |
References
- Mermaid Integration
- Firefox Source Docs — where each of these changes shows up once it lands
| Assignee | ||
Updated•2 months ago
|
Description
•