Repository navigation
fix(layout): say a publication's scale bar fit loss as a notice (#3111) - #3113
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewThe PR is small: it moves the publication's scale bar fit loss from the answer's Bugs: None found. Security: None found. Performance: None found. Quality:
AGENTS.md: No breaks found. Checked:
Twins checked:
Prior reviews: None on this PR, so nothing was left out as already raised. Not verified: build, clippy, and the test run. Test code was read against Change sizeCompared: the whole PR against main (merge base 418008d to PR head 557c751).
|
|
No code change for the four quality points:
|
📖 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
When
layout.publicationis given a"scaleBar"whose text doesn't fit, the loss is now said as a session notice, aslayout.addElementandlayout.updatesay it, through the samesay_text_fithelper. Before, it was only an entry in the answer'swarnings, so a front end reading the session's notices (the command line, the Assistant, MCP) did not see it among them. The answer'swarningsno longer carries this entry.The change is in the engine command, so it reaches every front end that runs it; the ribbon, undo and the project file are unchanged.
Testing
cargo nextest run -p rustgis-engine -E 'test(publication_parts)': the tests of the scale bar's fit loss now read the notices. The one for a bar too large for the sheet fails without the change and passes with it; the one for a larger text that fits checks that no scale bar notice is said.UI evidence
The Messages pane after
layout.publication {"scaleBar": {"textSize": 100}}, before and after:Related issue
Closes #3111
Summary by CodeRabbit