fix(media): flow_diagram pads to 16:9 at native size, never downscales#2901
Merged
Conversation
The template was shrinking the diagram to fit a fixed 1200x675 canvas, costing resolution and making nodes smaller than needed. It now renders the diagram at full native size and pads the canvas out to a 16:9 aspect ratio around it (a 4-node flow becomes ~1700x957). A named preset applies its aspect ratio at native scale; explicit width/height grows to content instead of clipping. No content is ever downscaled. Smoke test updated to assert aspect ratio + native-size behavior.
779f9e6 to
b3f9f15
Compare
Contributor
Homeboy Results —
|
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.
Summary
flow_diagramfit a fixed 1200x675 canvas by downscaling the diagram, which cost resolution and shrank nodes.presetapplies its aspect ratio at native content scale; explicitwidth/heightgrows to the content rather than clipping.Why
A diagram has a natural size. Fitting an aspect ratio should pad around the content, not shrink it. Downscaling was the wrong default and made featured images softer than necessary.
Test plan