Repository navigation
fix(layout): a publication legend that fits exactly isn't said to overflow - #749
Conversation
…rflow The legend's box is its rows' size plus the padding; the inside is the box less the padding again, which can come out a rounding error short of the rows. With macOS's fonts a one-layer legend did, so publication_surrounds_keep_off_the_data failed there on main. Compare with a tolerance.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Code reviewI reviewed the 2-file diff, which changes Bugs
Security
Performance
Quality
AGENTS.md
Change sizeCompared: the whole PR against main (merge base 2502d90 to PR head 6e4f2a2).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. |
…-legend # Conflicts: # crates/engine/src/cmd/layout.rs
Code reviewI found nothing that needs changing. I reviewed the PR statically: I read the diff and the two changed files in full, with no build or test run. What changed
Bugs
Security
Performance
Quality
AGENTS.md
Change sizeCompared: the whole PR against main (merge base 694e6f8 to PR head c42e94d)
|
Fixes the macOS failure on main (run 39977755541):
publication_surrounds_keep_off_the_datagot an unexpected "the legend lists more than fits its corner" warning.The legend's box is sized to its rows' width plus 2 × padding, then the inside is computed as the box width less 2 × padding, which can land one ulp short of the rows' width. Which widths hit that depends on the font, so with macOS's system font the one-layer legend in that test did, and on Linux it didn't. The overflow checks (rows and colorbar) now compare with a 1e-6 mm tolerance.
Regression test
a_publication_legend_sized_to_its_rows_fits_themruns the publication layout for 300 layer names of different widths; without the fix it fails on Linux too ("aRb7").Summary by CodeRabbit