Repository navigation
fix(layout): keep a legend's Reset in reach when it lists no layer but leaves one out - #3375
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewNo bugs, security, performance or AGENTS.md problems found in the changed lines. I left no inline comments because I found nothing that needs one. Bugs: none found.
Security: none found. No new input handling; Performance: none found. Quality: none worth an inline comment.
AGENTS.md: no violations.
Twins checked: the touch interface ( Prior reviews: the review-thread file lists no threads, so there were no earlier concerns to leave alone. Change sizeCompared: the whole PR against main (merge base 92594ee to PR head 4614666).
|
📖 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 legend's Format › Layers section showed only when the legend could list a layer or had an order of its own. A legend that listed none (a map whose only layer is a raster on a color ramp) but left one out had no section, so no Reset, and only a script could clear the name left out.
The section now also shows while the legend leaves out a layer the map still has. With nothing to list it holds just Reset, which clears the names left out; the section then goes away. A name left out that is no longer on the map doesn't bring the section up. Legends that list layers are unchanged.
Reach: the change is in the shared Format pane (
ui-egui), so it applies wherever that pane shows, in the desktop app and the browser. The touch interface (ui-touch) has no legend layer list. The command line, Python, scripts, the assistant and plugins already clear the names withlayout.update("exclude": []), so no command, parameter or tool description changes. Reset is one undo step, as before.Testing
a_legend_listing_no_layer_can_still_be_resetnow covers a layer left out as well as an order of its own. It fails without the fix (no Reset to click) and passes with it. It also pins that a left-out name the map no longer has brings no section up.cargo fmt --check, clippy,cargo nextest(11049 passed, 29 skipped), doctests,cargo xtask layersandcargo xtask schema --checkpass locally; after the later test-only changes, fmt,rustgis-ui-eguiclippy and this test again.ui_shotreplay on a map holding one raster on a ramp, left out of the legend, before and after.UI evidence
The bottom of the legend's Format pane. From left to right: before; after; after Reset.
Related issue
Closes #3358
Summary by CodeRabbit