Closed Bug 2084298 Opened 1 month ago Closed 24 days ago

Mermaid diagrams wider than the page are cut off when printing a source docs page

Categories

(Developer Infrastructure :: Source Documentation, defect)

defect

Tracking

(firefox161 fixed)

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 external file)

Attached image before-after-print.png —

When a source docs page is printed, a Mermaid diagram wider than the page is cut off at the page edge, behind the fade the scroll container uses on screen. The fullscreen button prints over it.

A page with a ZenUML diagram also prints all of its text at a fraction of its size. ZenUML leaves an invisible #zenuml-intersection-detector-container in the body that is wider than the page (2328px on the Mermaid integration page). The body's overflow-x clips it on screen, but in print the browser shrinks the whole page to fit it.

A print stylesheet can drop the fade and its padding, scale the SVG to the page width, hide the fullscreen button and hide the ZenUML element. A ZenUML SVG has no viewBox, only an inline width and height, so it scales only once a beforeprint handler gives it a viewBox matching that size.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Depends on: 2084585

The severity field is not set for this bug.
:Sylvestre, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(sledru)
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f10b237383a5 https://hg.mozilla.org/integration/autoland/rev/a4747cfb5f6a Scale wide Mermaid diagrams to the page width when printing the source docs. r=firefox-source-docs-reviewers,ahal
Flags: needinfo?(sledru)
Status: ASSIGNED → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: