Skip to content

Add clipboard, pop-up modes and label display options - #25

Merged
giswqs merged 1 commit into
mainfrom
feat/clipboard-popups-labels
Oct 11, 2026
Merged

giswqs merged 1 commit into
mainfrom
feat/clipboard-popups-labels

Conversation

@giswqs

@giswqs giswqs commented Oct 11, 2026

Copy link
Copy Markdown
Member

Summary

Adds 25 ribbon features (coverage 69 → 94 of 316).

  • Clipboard (Map and Edit tabs): Copy, Cut, Paste (into the layer selected in Contents, matching fields by name), Paste Special (as a new layer) and Copy Path. Copied features also go on the system clipboard as GeoJSON, and GeoJSON copied elsewhere pastes into RustGIS. Ctrl+C / Ctrl+X / Ctrl+V work on the map.
  • Pop-ups (Map › Navigate): Topmost Layer, Visible Layers (the pop-up steps through every feature with ‹ ›), Selectable Layers, Selected in Contents, No Pop-ups. Saved with the map; identify also takes a mode parameter.
  • Labeling (Map tab): Lock keeps the labelled features fixed as the map moves, Pause stops drawing labels, View Unplaced draws the labels that didn't fit in red (on screen and in exports), and Convert turns a layer's labels into an annotation layer (a point layer with a TEXT field).
  • Labeling tab: label visibility range by scale (Out Beyond / In Beyond) and by viewing distance (Closest / Farthest), Clear Limits, and a Placement menu (automatic, centred and eight positions).
  • New commands: edit.copy, edit.cut, edit.paste, edit.pasteSpecial, layer.copyPath, map.popupMode, labels.lock, labels.pause, labels.viewUnplaced, labels.convert, labels.scaleRange, labels.distanceRange, labels.placement.
  • User guide sections, and translations for every new string in all 14 catalogs.

Testing

  • cargo xtask ci passes; the wasm build passes.
  • New engine tests: clipboard round trip (copy, paste, paste special, GeoJSON text, cut and undo), pop-up modes, and label range / pause / unplaced / placement / lock / convert through the renderer. hostile_params_never_panic covers the new commands.
  • End to end with real data (us_regions.geojson and us_cities.geojson) through rustgis-cli: Visible Layers identify returned both layers, Copy Path returned the file path, copying the five cities over 5 million and Paste Special made a new layer, and Convert made a four-label region annotation layer. The exported map showed right-placed labels with unplaced ones in red.
  • Headless UI screenshots of the Map, Edit and Labeling tabs and of the multi-feature pop-up.

Copy, cut and paste features (also as GeoJSON on the system clipboard),
paste them as a new layer, and copy a layer's data path, from the Map
and Edit tabs. Pop-ups identify the topmost layer, every visible layer,
selectable layers, the layer selected in Contents, or nothing.

Labels gain a scale and viewing-distance range, ten placements, and
map-wide Lock, Pause and View Unplaced switches; Convert turns a layer's
labels into an annotation layer.
@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: eea5da1f-8e95-49dd-a799-95eea3fa969e

📥 Commits

Reviewing files that changed from the base of the PR and between 2c09469 and ba08de0.


⛔ Files ignored due to path filters (14)
  • crates/ui-egui/src/i18n/az.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/de.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/es.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/fr.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/id.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/it.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/ja.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/ko.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/nl.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/pt.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/ru.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/tr.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/vi.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/zh.tsv is excluded by !**/*.tsv

📒 Files selected for processing (19)
  • ROADMAP.md
  • crates/engine/src/catalog.rs
  • crates/engine/src/cmd/clipboard.rs
  • crates/engine/src/cmd/labels.rs
  • crates/engine/src/cmd/layer.rs
  • crates/engine/src/cmd/mod.rs
  • crates/engine/src/cmd/select.rs
  • crates/engine/src/lib.rs
  • crates/engine/src/tests.rs
  • crates/map/src/lib.rs
  • crates/map/src/symbology.rs
  • crates/render/src/lib.rs
  • crates/ui-egui/src/chrome.rs
  • crates/ui-egui/src/icons.rs
  • crates/ui-egui/src/lib.rs
  • crates/ui-egui/src/mapview.rs
  • crates/ui-egui/src/ribbon.rs
  • docs/parity.md
  • docs/user-guide.md

  • 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

Comment @coderabbitai help to get the list of available commands.

if clear {
l.labels.min_scale = None;
l.labels.max_scale = None;
l.labels.closest = None;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

labels.scaleRange with clear: true also resets the distance limits (closest/farthest), and labels.distanceRange doesn't reset the scale limits. The "Clear Limits" button is probably meant to clear both, but a script that calls labels.scaleRange {clear:true} to clear only the scale range will silently lose the distance range. Consider making the two commands clear only their own limits and having the UI button call both. Confidence: medium.

@github-actions

Copy link
Copy Markdown

Code review

I read the new clipboard and label commands in full. For the pop-up stepping change in mapview.rs, I read only the first ~60 diff lines. I did not review the rest of the 1,750-line diff, including the renderer, symbology and i18n changes. I also didn't run the code or tests.

Bugs

  • labels.scaleRange clear is too broad (crates/engine/src/cmd/labels.rs:77, medium confidence). clear: true also resets the distance limits (closest/farthest), but labels.distanceRange doesn't reset the scale limits. A script that clears only the scale range will silently lose the distance range. I suggest each command clear only its own limits, with the "Clear Limits" button calling both.

Security

  • Nothing found. The paste path caps GeoJSON text at 64 MiB and returns errors instead of panicking.

Performance

  • Nothing significant. paste clones the clipboard dataset on each call, which is acceptable.

Quality

  • No other issues found in the new clipboard and label commands.
  • The new code uses get(), saturating arithmetic and bounds checks, and has no unwrap or expect.

CLAUDE.md (AGENTS.md)

  • No violations found in the files I read. The new commands are registered as CommandSpecs, and the PR adds strings to all 14 i18n catalogs. I did not check those catalogs.

@github-actions

Copy link
Copy Markdown

📖 Docs preview

Item Value
Preview https://pr-25.rustgis-preview.pages.dev
Web app https://pr-25.rustgis-preview.pages.dev/app/
This commit https://669744ff.rustgis-preview.pages.dev
Commit ba08de0

@giswqs
giswqs merged commit 2cbf8a8 into main Oct 11, 2026
9 checks passed
@giswqs
giswqs deleted the feat/clipboard-popups-labels branch October 11, 2026 05:55
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