Repository navigation
fix(ui): a map's text draft, spectral points, dialogs and import follow it when it moves (#2959) - #2975
Conversation
…ow it when it moves (opengeos#2959)
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI found no bugs, security issues or AGENTS.md breaks in the changed code. The change swaps the map-place key (
I did not build or run the tests, since this environment has no shell. The judgments above come from reading the code. FindingsBugs
Security
Performance
Quality
AGENTS.md
Earlier concerns left alone: 0. No prior review threads exist on this PR. Change sizeCompared with the base branch (merge base 77c573c to PR head fc1f200).
|
Code reviewScope: 7 files in Bugs: None found. The key comparisons still refuse the cases the PR says they refuse. The import's Security: None found. Performance: None significant. Quality:
AGENTS.md: No breaks found. There is no Prior reviews: 1 earlier thread (the weak Change sizeCompared with
|
…Source follow their map when it moves (opengeos#2959)
📖 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 performance problems in this PR. One readability point is posted inline, and a few nits are grouped below. I could not compile or run the tests (no shell here), so this is a read-only review of the diff and the surrounding code. Bugs: none found (confidence: high).
Security: none. Performance: none. Quality:
AGENTS.md: no breaks found. No commands or parameters were added, so the command-surface snapshot is unaffected. No user-visible strings were added. The description covers the surfaces the change reaches, and the new tests fail on the old comparisons. Prior reviews: 3 earlier concerns left alone, because this head already addresses them. The serviceui test gap now has Change sizeCompared with the base branch (merge base 77c573c to PR head 81d86ec). Sizes are in KB (1 KB = 1024 B).
|
Code reviewReviewed the whole diff (7 files in Bugs: None found. Checked:
Security: None found. No new input parsing, no new commands, no new file or network access. Performance: None found. The new keys are a Quality: Nothing that needs a change in this PR.
AGENTS.md: No breaks found. The new code adds no user-visible literals, so Concerns left alone: 1 prior concern was left alone because it is still present and already raised: the Inline comments: None posted, because no finding met the bar for a comment. Change sizeCompared with main (merge base 77c573c to PR head 2817aec). The table counts files, and the sizes are file sizes in bytes, not diff lines.
|
Code reviewI read the full diff, the base AGENTS.md, and the four prior review threads. I also checked the code the PR depends on: Bugs
Security
Performance
Quality
AGENTS.md
Coverage and checks
Change sizeCompared: the whole PR against main (merge base 77c573c to PR head 2817aec).
|
Summary
Part 1 of #2959 (the maps). Several pieces of open UI state remembered the active map by its place in the project (
active_map) and dropped themselves when it no longer matched. Since #2806 that place changes whenever the map in view is moved (its tab, Move Up/Down,map.move), or another map moves past it, although the map in view is the same one. Each now keeps the map's identity,Map::instance_id()(the onetable.rsandreadjob.rsalready use), and compares it with the map in view:graphicformat.rs)spectralui.rs)dialogs.rs)dialogs.rs)serviceui.rs)repairsource.rs)labelpane::layer_key)The dialogs, the import and the repair form share one helper,
dialogs::map_key(identity plus name, as they already compared name); Define Projection, the GeoPackage prompt and the repair form keep the project they opened on beside it in onedialogs::MapOwner, whoseholdsis the one check. A different map, a copy (map.duplicaterenews the identity), a deleted or replaced map and a replacement project still refuse or cancel, as before.No new state: the fields that held an index hold an identity.
Not in this PR:
LayoutView.formatted,nudgedand the Model Builder'sview_key, which all sit inlayoutview.rsor depend on it): part 2 of [Bug]: Moving the map in view throws away a map text being typed, the spectral profile's points and open dialogs #2959, after feat(layout): section lines on a map frame (#2863 part 1) #2872 and the assistant's work there;It reaches the desktop app and the browser build (the same egui code); commands, CLI, Python, scripts, plugins, the assistant, the ribbon and shortcuts, and the phone interface (
ui-touchuses none of the changed modules) are untouched, and undo is unchanged.Testing
graphicformat::tests::moving_the_map_keeps_the_text_being_typed(the typed text was lost);spectralui::tests::moving_the_map_keeps_the_points(0 points kept, expected 1);define_projection::dialog_applies_after_its_map_is_moved(Apply refused);labelpane::tests::a_layers_state_follows_its_map_when_the_map_moves(the key changed with the map's place), and that a copy is another key;serviceui::tests::an_import_follows_its_map_when_it_moves, ondialogs::map_key(the key changed from(0, "World")to(1, "World")): the same map moved is the same key, another map isn't. The GeoPackage prompt and Repair Data Source compare through this helper and have their own tests:dialogs::tests::the_gpkg_prompt_follows_its_map_when_the_map_moves;repairsource::tests::the_form_follows_its_map_when_the_map_moves(its stale check is nowrepairsource::gone);serviceui::tests::an_import_in_flight_goes_on_when_its_map_movesrunspollon an import in flight.All four fail with the old position-based key.
dialog_rejects_a_different_map_with_the_same_layer_idanddialog_rejects_a_replacement_project_with_the_same_map_and_layer.checks.sh 2959 rustgis-ui-egui: fmt, clippy, nextest (9610 passed),cargo check -p rustgis-web --target wasm32-unknown-unknown, doctests, layers andschema --checkall exit 0.UI evidence
No visible UI change.
Related issue
Part of #2959.
Summary by CodeRabbit