Repository navigation
fix(engine): a legend's lists bind every layer of a name they give - #3622
Conversation
Code reviewSmall, focused change: Bugs
Security
Performance
Quality
AGENTS.md
Twins checked
Prior review threads: none existed, so nothing was left out as already raised. Change sizeCompared with main (merge base d75248d to PR head 9ccc55d), the whole PR.
|
Code reviewI read the diff, the surrounding code ( Bugs
Security
Performance
Quality
AGENTS.md
Twins checked
Prior concerns
Change sizeCompared with the base branch: the whole PR against
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI found no bugs, security issues or AGENTS.md breaks in this PR. The change does what the description says: a legend's Bugs: none found. Confidence: high.
Security: none. No input handling or secret handling changed. Performance: nothing significant. The name chain is re-walked per layer, which costs little at legend list sizes (the one nit I posted inline). Quality:
AGENTS.md: no breaks. No command or parameter changed, so Twins checked: the only callers of Prior review threads: I left 2 earlier concerns alone.
Change sizeCompared: the whole PR against main (merge base d75248d to PR head 0cf923f).
|
📖 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 |
Code reviewI found no bugs, security issues or AGENTS.md breaks in this PR, and posted no inline comments. The change is small: Bugs: none found. I checked that:
Security: none found. Performance: none. The cost is layers × names over in-memory metadata, and only ids are pushed. Quality (low confidence, not raised as a comment):
Prior review threads (4 in total): I left all of them alone. Two were fixed in the head commit: the duplicate push, and the test helper that repeated the production filter. The collect-names nit on the filter is still open, but the author answered it and the code there hasn't changed, so I did not post it again. AGENTS.md: the change stays within the rules. It needs no schema or command-surface update, and the PR description states which surfaces it reaches. Change sizeCompared with main (merge base d75248d to PR head 0cf923f), the whole PR.
|
Summary
A legend's
exclude,layerOrder,columnBreaks,labelsandclassLabelsname layers, and the legend applies each name to every layer of the frame's map that has it, in any case. The inputs oflayout.addElementandlayout.updatetook only the first of those layers, so an exact approval didn't bind the others.legend_inputs, which both commands and all five lists go through, now binds every layer of a named name in the frame's map.Map::layer_by_nameis unchanged, and so is what a table, chart or colorbar binds, which each read one layer.Surfaces: the change is in the shared engine, in what
layout.addElementandlayout.updatebind when a plan is approved, so the Assistant, MCP and any other surface that plans these two commands get it, whichever app it runs in. No command, option or tool description changed, and there is nothing to add to the ribbon, shortcuts, command search or any pane. Nothing saved or undone changes.Testing
crates/engine/src/tests/layout_legend_shared_names.rs: with two layers named Rivers, each of the five lists (and another case of the name) binds both, through both commands; with one, only that layer is bound, a same-named layer in another map isn't, and a call that gives no list binds none. The first test fails without the fix (left: [(2, 4)],right: [(2, 3), (2, 4)]).rustgis-geolibreand theline_strokes_editor_edits_one_classsmoke test, [Bug]: smoke test line_strokes_editor_edits_one_class fails on main #3411). After a last change to one new test, the 62layout_legendtests, fmt and clippy ofrustgis-enginepass again.UI evidence
No visible UI change.
Related issue
Closes #3288.
Summary by CodeRabbit