Repository navigation
fix(engine): refuse unread parameters on layout.addElement grid and extentIndicator (#2890) - #3060
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewScope: Bugs
Security
Performance
Quality
AGENTS.md
Checked and fine
Change sizeCompared with the base branch (merge base b985666 to PR head dae5ce6).
|
📖 Docs previewCommit |
Since main's opengeos#3060 they refuse any key they don't read; the help says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…engeos#2872) * feat(layout): section lines on a map frame (opengeos#2863 part 1) A map frame keeps section lines, as it keeps its grid: each across the whole frame, straight on the page, through a place it follows when the frame is panned, turned or rescaled, with its name at both ends (A and A'), a colour, a width and a dash, clipped to the frame's shape. Commands, undo and the Format pane change them; one whose place the frame doesn't show isn't drawn, which they and exports say. A frame without one keeps its bytes; one with any requires layout-section, in projects, layout files and saved commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): a section line on a frame whose map is missing is said; its name boxes keep its transparency Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(layout): section lines' Format pane rows move to a part of their own (opengeos#2863) The layout view's notice of the section lines it doesn't draw stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): layout.addElement refuses what a section doesn't read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): a removed section line takes no change; a line missing for two reasons counts once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): spaces round a section name are not counted as cut Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(capabilities): a sample for layout-section The check main brought wants one sample per command capability. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): a report says the section lines its layout page can't draw - report.export says the section lines a report's layout page leaves out, once a layout, as the layout's own export does. - report.existingTemplate requires layout-section when its layout file has section lines, as layout.import does. - A section's name box stays inside its frame across the line too, and the frame's credit keeps clear of every name, not only the right and bottom ones. - Clearer wording for Section::free_name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(layout): each section test under its own doc comment Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(layout): a grid or an extent indicator refuses a section's name Since main's opengeos#3060 they refuse any key they don't read; the help says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): section names on short lines, the credit beside them, and Mercator's reach - A vertical line's names are both right labels to the credit, which goes left of them rather than above them out of the frame. - On a line too short for both names at their size, they are drawn smaller (down to 0.4 of it), each clear of the other. - A place a flat projection holds to its reach (Web Mercator past 85.05°) isn't drawn at the latitude it is held to; the notice says it. - The grid and extent indicator arms no longer call say_name_ignored, which their key checks made unreachable. - Each render section test under its own doc comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): one report notice for the section lines its layouts leave out - A report with several layouts that each leave a section line out says it once, counting them all, each line named with its layout (AGENTS.md: one notice per kind with a count). - layout.addElement's help says a section adds no element: the reply's "element" is its frame and "section" its name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: elpidioassinaturas <elpidiofilho@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
opengeos#2863 part 1b) (opengeos#3140) * feat(layout): section lines on a map frame (opengeos#2863 part 1) A map frame keeps section lines, as it keeps its grid: each across the whole frame, straight on the page, through a place it follows when the frame is panned, turned or rescaled, with its name at both ends (A and A'), a colour, a width and a dash, clipped to the frame's shape. Commands, undo and the Format pane change them; one whose place the frame doesn't show isn't drawn, which they and exports say. A frame without one keeps its bytes; one with any requires layout-section, in projects, layout files and saved commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): a section line on a frame whose map is missing is said; its name boxes keep its transparency Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(layout): section lines' Format pane rows move to a part of their own (opengeos#2863) The layout view's notice of the section lines it doesn't draw stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(layout): section lines in the Format pane (opengeos#2863 part 1b) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(layout): section lines dragged in the layout view (opengeos#2863 part 1b) A section line of the selected map frame can be dragged across itself. Its place keeps where it is along the line; off the frame, its ground or its projection, the line stays where it was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): layout.addElement refuses what a section doesn't read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): a removed section line takes no change; a line missing for two reasons counts once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): spaces round a section name are not counted as cut Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(capabilities): a sample for layout-section The check main brought wants one sample per command capability. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): a report says the section lines its layout page can't draw - report.export says the section lines a report's layout page leaves out, once a layout, as the layout's own export does. - report.existingTemplate requires layout-section when its layout file has section lines, as layout.import does. - A section's name box stays inside its frame across the line too, and the frame's credit keeps clear of every name, not only the right and bottom ones. - Clearer wording for Section::free_name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(layout): each section test under its own doc comment Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(layout): a grid or an extent indicator refuses a section's name Since main's opengeos#3060 they refuse any key they don't read; the help says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): section names on short lines, the credit beside them, and Mercator's reach - A vertical line's names are both right labels to the credit, which goes left of them rather than above them out of the frame. - On a line too short for both names at their size, they are drawn smaller (down to 0.4 of it), each clear of the other. - A place a flat projection holds to its reach (Web Mercator past 85.05°) isn't drawn at the latitude it is held to; the notice says it. - The grid and extent indicator arms no longer call say_name_ignored, which their key checks made unreachable. - Each render section test under its own doc comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): one report notice for the section lines its layouts leave out - A report with several layouts that each leave a section line out says it once, counting them all, each line named with its layout (AGENTS.md: one notice per kind with a count). - layout.addElement's help says a section adds no element: the reply's "element" is its frame and "section" its name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): a section line's drag lets go when a command changes the frame's lines A drag keeps the line it took as well as its index: one removed, moved or replaced meanwhile (a command, an undo, a script) is let go, and the drop moves no other line in its place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): a section line's drag keeps its name, and a drop off the frame stays A drag takes the line's name as well as its place: a line put at the same place under another name meanwhile is let go, not moved in its stead. And a drop with the pointer off the frame (beside it, at a height inside it) lands nowhere, as the cursor then says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(layout): a section line dropped outside a round or polygon frame's shape stays A drop counts as on the frame only within the frame's shape (a circle, an ellipse or a polygon, turned with the frame), not anywhere in its box. Tests also cover a rename to a name another line has: refused, and said. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: elpidioassinaturas <elpidiofilho@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
ADD_EXTENT_INDICATOR_KEYSandADD_GRID_KEYS) andonly_add_keysvalidation incrates/engine/src/cmd/layout.rsforlayout.addElement"extentIndicator"and"grid".layout.addElement: a grid takes no "..." (it reads ...)/layout.addElement: an extent indicator takes no "..." (it reads ...)).nullvalues for unread keys continue to be accepted as not given, while earlier kind-specific checks (ONLY_FILL,ONLY_OUTLINE,NO_OVERLAY_BACKGROUND,ONLY_DASH,ONLY_SCALE_BAR_DETAILS, etc.) keep their existing behavior and messages.Surfaces reached
ui-touch), Assistant/MCP, plugins: all invokelayout.addElementthroughrustgis-engine. No ribbon/shortcut/dialog surface is added or changed.Testing
cargo test -p rustgis-engine --lib cmd::layout::tests— passed (including 3 new regression tests:add_element_grid_refuses_unread_parameters_without_mutating,add_element_extent_indicator_refuses_unread_parameters_without_mutating,add_element_grid_and_extent_indicator_allow_null_unread_keys_and_all_valid_keys_silently)cargo test -p rustgis-engine --lib tests::hostile_params_never_panic— passed (8 test shards)cargo test -p rustgis-engine --lib command_surface_matches_the_snapshot— passedcargo test -p rustgis-engine --tests— passed (all unit + integration tests)cargo clippy -p rustgis-engine --all-targets -- -D warnings— passedcargo xtask test-hygiene,cargo xtask layers,cargo xtask rows— passedRUSTFLAGS='-D warnings' cargo check --locked --target wasm32-unknown-unknown -p rustgis-web— passedcargo fmt --check— passedUI evidence
No visible UI change.
Related issue
Fixes #2890
Follow-up: #3074 tracks extending per-kind unread-parameter allow-lists to the remaining
layout.addElementkinds.Summary by CodeRabbit
nullvalues are accepted for options these elements do not use. Invalid options no longer change the layout or undo state.