Repository navigation
feat(layout): a halo behind a north arrow's N (#3645) - #3656
jgregoriorincon wants to merge 2 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Code reviewNo bugs, security issues, performance problems or AGENTS.md breaks found, so no inline comments were posted. I checked by reading only: I had no shell, so the tests and the wasm build were not run. There were no earlier review threads on this PR, so no concerns were left alone. BugsNone found. I traced the add, update, restyle, capability, save/load and render paths for a north arrow's halo and found no logic errors. Confidence: high. SecurityNone found. PerformanceNone found. The halo draws one glyph, bounded by the existing Quality
AGENTS.mdNone found. What I checked:
Twins checked
Change sizeCompared with the base branch: the whole PR, merge base
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
A layout north arrow takes a halo behind its
N, so it stays readable over a dark or busy part of the map.layout.addElementandlayout.updateaccepthalo,haloColorandhaloWidthon a north arrow, with the values a scale bar takes: no colour picks white behind a darkNand dark behind a light one; the width is 0–10 points, 1 by default.Non a turned map. PDF and SVG keep it as text.layout-north-arrow-halo; so does a savedlayout.addElementwith"halo": true. A savedlayout.updatedoesn't, as with a north arrow's font.Not in this PR: halos for layout texts, the legend and grid labels.
layout.publicationis unchanged.Testing
engine/src/tests/layout_north_halo.rs, written first and seen failing: defaults, colour and width reading and limits, off keeping its settings, nothing drawn with no width, clear halo or clearN, damaged files, refusals on bad values and on other elements, SVG output, saved commands,layout.publication.N, north up and turned; no solid ink of the plain arrow is painted over), a Format pane test, and a capability test with the newschema/fixtures/layout_north_arrow_halo.rgis. The scale bar test that listed the north arrow among elements without a halo is updated.cargo fmt,clippy -D warnings, the doctests, the layer and schema checks pass. The full test run found one test of this change (the north arrow's key list in anaddElementrefusal), fixed in the second commit and rerun with the otheradd_elementand halo tests. The sevenrustgis-geolibretests, fourrustgis-ui-eguiframe tests andline_strokes_editor_edits_one_classfail on this machine, outside the lines of this change.ui_shotreplay of the evidence below.UI evidence
A north arrow over a dark box: on
main, with"halo": true, "haloWidth": 3, and with"haloColor": "#FFB000", "haloWidth": 5on a map turned 60°.The Format rows:
Related issue
Closes #3645