Repository navigation
fix(layout): refuse a colorbar, legend or frame shape value of the wrong type - #3181
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI found no bugs, security issues or performance problems in this PR. I did not run the tests (no shell here), so the claims about test results rest on reading the code. What I checked
Bugs: none found. Security: none found. Performance: none found. Quality
AGENTS.md
Prior concerns: there were no existing review threads on this PR, so none were left alone. Not verified: the PR body's claim that fmt, clippy, nextest and the layers check passed on the commit, and the claim that the two tests expecting new refusals failed before the fix. Change sizeCompared: the whole PR against main (merge base 032e917 to PR head 99d3c55).
|
📖 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 |
|
On the two points: the surfaces are now listed in the description. |
Summary
A colorbar or legend option, or a frame's shape, given with a value of the wrong type was ignored: the command succeeded and kept the value the element already had, or its default (a
shapeof17made a rectangle). It is now refused, naming the key and what it takes, with nothing changed.tickSide,ticks,layerandtitleand a legend'stitleinlayout.addElementandlayout.update, and theshapeoflayout.addFrame.given_nameandgiven_num([Bug]: Layout commands ignore a grid or scale bar value of the wrong type without a word #3110), so the messages for an unknown name stay as they were.layout.updatenow readsticksbefore it changes anything, so a refusal leaves no half-made change.layout.update,titleis checked only for a legend or a colorbar; a chart still says what its own title takes.nullmeans not given, and a number written as text ("7") is still read.ticksincluded, now gets an error. The ribbon and the Format pane already send the right types.Not in this PR: the layer, field and rows of a table or chart (#3180).
Testing
crates/engine/src/tests/layout_typed_values.rs; the two that expect the new refusals failed before the fix.cargo xtask schema --check) passed on the commit.UI evidence
No visible UI change.
Related issue
Closes #3169
Summary by CodeRabbit