Skip to content

feat(ui): the map's coordinate system from its entry in the layer list, and a status bar button that looks like one - #3067

Merged
Mavrick-F merged 1 commit into
opengeos:mainfrom
Mavrick-F:feat/map-crs-entry
Nov 27, 2026
Merged

Mavrick-F merged 1 commit into
opengeos:mainfrom
Mavrick-F:feat/map-crs-entry

Conversation

@Mavrick-F

@Mavrick-F Mavrick-F commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Summary

The map's coordinate system is changed from View › Projection or from a label in the status bar. That label is clickable, but it is drawn as small dim text, so it doesn't look like it. Right-clicking the map's entry at the top of the layer list, where people also look for it, offers only Paste Layer.

  • The map's entry in the layer list now opens the map's menu, the one its tab and the Browser show: Rename…, Duplicate, Paste Layer, Move Up, Move Down, Delete (which asks first).
  • That menu gains Coordinate System…, which opens the existing dialog. The menu is shared, so the row is on the tab's and the Browser's menus too. The dialog changes only the map in view, so for any other map the row is greyed, with that reason on hover.
  • Status bar: the coordinate system and the pointer coordinates beside it are now small framed buttons with the theme's hover and pressed fills. Their text, tooltips and clicks are as before.
  • So that the framed readout doesn't look switched off, a live position is now in the normal text color and a kept one (pointer off the map) is dimmed, instead of dim and disabled.
  • The two buttons' padding is made up by narrower gaps around them, so the bar's height and width stay as they were.

No new command, parameter, saved field or dependency. The user guide names the two new ways in.

Surfaces

  • Desktop and browser: both, from ui-egui.
  • Phone: not affected. ui-touch has its own layer list and no status bar.
  • Command line, Python, Assistant/MCP, plugins, command search, shortcuts, ribbon: not affected. The dialog and its command are unchanged.
  • Never hold the window / memory: only menus and buttons.
  • Interface text: two new strings, the greyed row's reason (tl!) and the layer list entry's accessible name, "Map: {name}" (i18n::fmt), which keeps it apart from the view tab's. "Coordinate System…" is an existing one.

Testing

  • cargo fmt --all --check: clean.
  • New test panes::tests::right_clicking_the_map_entry_offers_its_coordinate_system right-clicks the map's entry with pointer events, clicks Coordinate System…, and checks that the dialog opens and the menu closes. It also checks that the row is disabled in the menu of a map that isn't in view.
  • Green: cargo test -p rustgis-ui-egui --lib right_clicking_the_map_entry_offers_its_coordinate_system → 1 passed.
  • Red: the same command with the context_menu call removed → FAILED, No nodes found matching the query at the click on the row.
  • cargo test -p rustgis-ui-egui --test integration coordinate_readout:: → 8 passed, including the tests that click the status bar readout to switch formats.
  • cargo test -p rustgis-ui-egui --test smoke map_and_layout_tabs_rename_from_their_menus → 1 passed: the view tab is still the one control named by the map alone.
  • ui_shot renders of the menu and of the status bar. A scripted click on the status bar button opened the dialog.
  • CI on Linux, with clippy, the workspace tests and the wasm build: passed on this commit in the fork.
  • Not tested: a hand-run desktop or browser window, touch input, macOS and Windows.

UI evidence

The menu on the map's entry in the layer list (before, it held only Paste Layer):

The map's menu open on its entry in the layer list, with Coordinate System

Status bar at 1480 wide:

Status bar before and after, on hover and in the dark theme

Status bar at 900 wide, the smallest desktop window. The bar already overlaps itself there on main: Messages covers the end of the coordinate system and the selection count. This change doesn't move that overlap and doesn't fix it.

Status bar before and after in a narrow window

Related issue

Part of #2944

Summary by CodeRabbit

  • New Features
    • The Layers pane’s map menu now includes options to move maps up or down and open the Coordinate System dialog for the map in view.
    • The status bar’s pointer coordinates and coordinate-system control are now presented as buttons.
  • Documentation
    • Updated the user guide with where to change a map’s coordinate system, access map actions, and open Messages from the latest notice.

…t, and a status bar button that looks like one

The map's entry at the top of the Layers pane now has the map's menu, as
its tab and the Browser do, and that menu gains Coordinate System…. The
row is greyed, with the reason, for a map that is not in view, as the
dialog changes only the map in view.

The coordinate system and the pointer coordinates in the status bar are
small framed buttons. Narrower gaps around them make up for their padding.
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The status bar presents the pointer-coordinate readout and coordinate-system control as buttons. The Layers pane map entry uses the shared map context menu, which includes a Coordinate System action for the map in view. The user guide describes these controls and related map-menu actions.

Changes: Map entry context menu

Layer / File(s) Summary
Layers pane map menu
crates/ui-egui/src/panes.rs, docs/user-guide/maps.md, docs/user-guide/workspace.md
The Layers pane map entry now uses the shared map menu and has the accessible label Map: {name}. The menu includes a Coordinate System action, enabled only for the map in view. The UI test checks that the action opens the dialog and is disabled for another map. The guides describe the map menus and related actions.
Status bar controls
crates/ui-egui/src/chrome.rs, docs/user-guide/index.md
The pointer-coordinate readout and coordinate-system control are buttons. The status bar sets spacing and padding around these controls, then restores the prior values. The guide clarifies how to open the dialog and that clicking the latest notice opens Messages.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related issues

  • Issue 2944: This change adds the Coordinate System action to the map entry’s menu and presents the status-bar coordinate-system readout as a button.

Suggested reviewers: pick2510, jgregoriorincon

Merge Risk: Minimal · up to 138de

This adds a Coordinate System menu entry for the map and restyles two status-bar readouts as buttons, with matching guide updates. It does not change the dialog or its command. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the map's coordinate system becomes reachable from its layer-list entry, and the status bar gets a button-style control. It is one sentence, but it is long (115 charac…
Description check Passed The description follows the template sections: Summary, Testing, UI evidence, and Related issue. It explains the change, lists the tests run with results, and includes before/after screenshots. The Re…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the map's coordinate system becomes reachable from its layer-list entry, and the status bar gets a button-style control. It is one sentence, but it is long (115 characters, 21 words) and uses a colon-free, slightly awkward phrasing. Its main point matches the changeset, and the status bar restyling is also covered.

Full details: Description check

Explanation

The description follows the template sections: Summary, Testing, UI evidence, and Related issue. It explains the change, lists the tests run with results, and includes before/after screenshots. The Related issue section links to Part of #2944. The UI evidence section is filled in, so it does not use the 'No visible UI change' line. The Summary covers the menu, the status bar styling, and the user guide update, and it gives a clear scope of affected surfaces.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit taps the map-menu gate,
The coordinate dialog opens straight.
A status button shines nearby,
While little paws go hopping by.
The map’s new choices greet the day.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 7ab549ac-dd35-4538-bf23-ea6db32ae103
Commits

Reviewing files that changed from the base of the PR and between 09f7541 and 138deb8.

Files selected for processing: 5

  • crates/ui-egui/src/chrome.rs
  • crates/ui-egui/src/panes.rs
  • docs/user-guide/index.md
  • docs/user-guide/maps.md
  • docs/user-guide/workspace.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

Code review

I found no bugs, security problems, performance problems or AGENTS.md breaks in this PR. No inline comments were posted, because I found nothing that needs a line-level comment. There were no earlier review threads, so no concerns were skipped as already raised.

I read the full diff and the surrounding code, and I did not build or run the tests. Each check below is from reading the code, so confidence is high but not verified by compilation.

Bugs: none found.

  • The status bar's spacing is restored on every path (chrome.rs:472-507). There is no early return between the set and the restore.
  • Sense is still used in chrome.rs and paste_layers_button still has a caller (panes.rs:903), so there are no unused imports or dead code for the -D warnings gates.
  • The layer-list menu's Delete goes through the global confirm_delete (mapview.rs:5099), so the confirmation applies there too.
  • The layer-list paste now calls layer.paste {"map": m} where the old path sent a null argument. For the map in view these are equivalent.
  • The disabled "Coordinate System…" row for other maps matches the dialog, which only changes the map in view.

Security: none found. No new input parsing, commands, or saved fields.

Performance: none found. The changes are menus and buttons only.

Quality (nits, not worth inline comments):

  • chrome.rs:469-471: the spacing comment doesn't say what the old padding was, so a reader can't check the "about as wide" claim from the code alone. Low priority.
  • docs/user-guide/workspace.md:236: the new text makes one wrapped line much longer than its neighbours. Reflow when convenient.

AGENTS.md: none found. I checked these rules against the diff:

  • No unwrap or expect in non-test code.
  • Interface strings use tl! or i18n::fmt.
  • No new dependencies, commands, parameters or saved fields, so command-surface.txt, the schema and the fixtures don't need updating.
  • The PR states which surfaces it reaches and why the rest don't apply.
  • Commands are not affected, and the touch interface is out of scope.
  • The new test has no timer waits and no identical assert_eq! sides.

Change size

Compared with the base branch: the whole PR against main (merge base 09f7541 to PR head 138deb8).

Measure Value
Files changed 5 (added 0, modified 5, removed 0, renamed 0)
Size before 811.1 KB
Size after 814.8 KB
Total size change +3.8 KB
Path Before After Change
crates/ui-egui/src/panes.rs 504.8 KB 507.6 KB +2.8 KB
crates/ui-egui/src/chrome.rs 127.1 KB 127.7 KB +610 B
docs/user-guide/maps.md 79.6 KB 79.7 KB +196 B
docs/user-guide/workspace.md 56.2 KB 56.4 KB +209 B
docs/user-guide/index.md 43.4 KB 43.4 KB +8 B

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3067/
Web app https://preview.rustgis.app/pr-3067/app/
Commit 138deb8

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 preview label (once per commit).

@Mavrick-F
Mavrick-F added this pull request to the merge queue Nov 27, 2026
Merged via the queue into opengeos:main with commit 3c39bbc Nov 27, 2026
28 checks passed
@Mavrick-F
Mavrick-F deleted the feat/map-crs-entry branch November 27, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant