Skip to content

feat(ui): the Publication Layout Wizard offers the inset and globe locators together - #3270

Merged
jgregoriorincon merged 2 commits into
opengeos:mainfrom
jgregoriorincon:feat/3243-wizard-both-locators
Nov 28, 2026
Merged

jgregoriorincon merged 2 commits into
opengeos:mainfrom
jgregoriorincon:feat/3243-wizard-both-locators

Conversation

@jgregoriorincon

@jgregoriorincon jgregoriorincon commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

layout.publication can draw an inset and a globe locator together (#3240), but the Publication Layout Wizard's Elements step offered only one of them, so the pair needed a script.

  • The Locator choice gains Inset and globe, on sheets and figures, sending "locator": ["inset", "globe"].
  • The review names it, and Placement gives the pair its one corner, as it does a single locator.
  • Surfaces: the desktop app and the browser (the wizard). The command line, Python and the assistant already take the list; the touch interface has no wizard. No command, parameter or project format change.
  • User guide updated. The new string waits for the release translation pass.

Testing

  • New and extended tests: what the choice sends on a sheet and a figure, the review on a sheet, a figure and a whole globe, the radio, the narrow screen, Placement on a figure, and Create plus Undo. The tests of the sent value and of Create were seen to fail with the new choice behaving as "Inset".
  • fmt, clippy, doctests, layers and schema checks passed; cargo nextest run: 10529 passed, 29 skipped.
  • After review, one test label restored: fmt, clippy and the wizard's tests, 137 passed.
  • Headless ui_shot replay on main and on this branch.

UI evidence

Elements step, before and after:

elements-before-after.png

Review step, before and after:

review-before-after.png

The sheet, before (default globe) and after (inset and globe):

sheet-before-after.png

Related issue

Closes #3243

Summary by CodeRabbit

  • New Features
    • The Publication Layout Wizard now lets you choose both inset and globe locators. The selection is shown in the review step and adds both locator frames to the layout.
  • Documentation
    • Updated the layout guide to include the combined locator option.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Publication Layout Wizard now offers an “Inset and globe” locator choice. It sends both locator types as a JSON array, displays the choice in the review step, and creates separate inset and globe locator frames.

Changes: Combined locator

Layer / File(s) Summary
Add combined locator choice
crates/ui-egui/src/publicationwizard/elements.rs
The Elements step offers “Inset and globe.” The draft serializes this choice as ["inset", "globe"], and tests cover its selection, review text, and sent values.
Create and arrange locator frames
crates/ui-egui/src/publicationwizard/elements.rs, crates/ui-egui/src/publicationwizard/arrange.rs, docs/user-guide/layouts.md
Tests cover creating both locator frames, removing the layout with Undo, and keeping all four surrounds available to take corners. The user guide lists both locators as a choice.

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant ElementsControls
  participant DraftSent
  participant LocatorFrameCreation
  User->>ElementsControls: Select Inset and globe
  ElementsControls->>DraftSent: Store InsetAndGlobe
  DraftSent->>LocatorFrameCreation: Send locator array
  LocatorFrameCreation->>User: Create inset and globe locator frames
Loading

Possibly related issues

Possibly related PRs

  • opengeos/RustGIS#3184: This PR extends the Elements step and Placement behavior introduced by that PR.
  • opengeos/RustGIS#3244: That PR adds engine support for the combined locator array sent by this wizard change.

Suggested reviewers: elpidioassinaturas, deniial00, giswqs

Merge Risk: Minimal · up to dd1ad

The Publication Layout Wizard gains an "Inset and globe" locator choice that sends both locators together. No concrete merge-blocking risk was found, and the change is additive and easy to revert.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Publication Layout Wizard now offers the inset and globe locators together. It matches the changeset, which adds an InsetAndGlobe locator choice to the wizard's El…
Description check Passed The description follows the template. It has Summary, Testing, and UI evidence sections with before-and-after screenshots, and it links the issue (Closes #3243). The UI evidence section is required an…
Linked Issues check Passed Directly linked issue #3243 has one coding requirement group: the wizard's Locator choice offers Inset and globe on sheets and figures, sends "locator": ["inset", "globe"], names the pair in review, a…
Out of Scope Changes check Passed Whole-PR changes (merge base 1790b92 to head dd1ade3) are: the new LocatorChoice variant and its sent, review, and placement handling in elements.rs; an extended arrange.rs test for a figure with both…
Full details: Title check

Explanation

The title names the main change: the Publication Layout Wizard now offers the inset and globe locators together. It matches the changeset, which adds an InsetAndGlobe locator choice to the wizard's Elements step, the review text, the sent value, and the user guide. The title is 84 characters, which is longer than ideal but still readable.

Full details: Description check

Explanation

The description follows the template. It has Summary, Testing, and UI evidence sections with before-and-after screenshots, and it links the issue (Closes #3243). The UI evidence section is required and is filled in. The Related issue section is filled in. The Testing section lists the tests, checks, and a headless ui_shot replay. The description is complete for this change.

Full details: Linked Issues check

Explanation

Directly linked issue #3243 has one coding requirement group: the wizard's Locator choice offers Inset and globe on sheets and figures, sends "locator": ["inset", "globe"], names the pair in review, and gives the pair one Placement corner. Evidence at head: crates/ui-egui/src/publicationwizard/elements.rs adds LocatorChoice::InsetAndGlobe. Draft::draws_locator returns true for it, so the placement logic (draws(LOCATOR)) treats it as a single locator surround. Draft::sent maps it to json!(["inset", "globe"]). elements_value renders it as "Inset and globe" in the review. arrange.rs extends the a_surround_left_out_takes_no_corner test with a figure that has both locators, which checks corner retention. Tests cover the sent value, review text, and creation and Undo of both map frames. The PR's wizard radio and narrow-screen rendering were not read, because the output was truncated. The summary and PR description report them as added, so this does not change the verdict. The issue's rejection of two checkboxes is respected: a single choice is kept.

Full details: Out of Scope Changes check

Explanation

Whole-PR changes (merge base 1790b92 to head dd1ade3) are: the new LocatorChoice variant and its sent, review, and placement handling in elements.rs; an extended arrange.rs test for a figure with both locators; and a one-line user-guide update in docs/user-guide/layouts.md that lists "both" as a locator choice. Each change supports the #3243 objective or its tests and docs. The PR description states that no command, parameter, or project format changes. The sent value is the same list that #3240 already accepts, so no new protocol surface is added. No unrelated change was found in the evidence read.

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 “Inset and globe” with care,
Two locator frames appear as a pair.
The draft sends both in an array,
Undo can sweep the frames away.
Four corners wait for surrounds to choose,
The guide now lists the combined news.

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: 974bb056-3c6f-4c1a-9138-5f4c3dc5f835
Commits

Reviewing files that changed from the base of the PR and between 14c3c20 and dd1ade3.

Files selected for processing: 3

  • crates/ui-egui/src/publicationwizard/arrange.rs
  • crates/ui-egui/src/publicationwizard/elements.rs
  • docs/user-guide/layouts.md

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

@github-actions

Copy link
Copy Markdown
Contributor

Code review

No bugs, security, performance or AGENTS.md problems found. Confidence is high. The change adds one LocatorChoice::InsetAndGlobe variant to the publication wizard and sends "locator": ["inset", "globe"].

Bugs

None found. I checked:

  • Every LocatorChoice match in crates/ui-egui handles the new variant: draws_locator, sent, elements_value and the radio list. draws_locator returns true for it, the same as Globe and Inset.
  • The engine's publication_locators (crates/engine/src/cmd/layout/publication/mod.rs:2310) accepts the list form on sheets and figures. It sorts the inset first, and it rejects duplicates and "none" inside a list. layout_publication_locators.rs covers both.
  • The Option<&str> to Option<Value> change for "locator" is correct, and the existing "inset"/"globe" output is unchanged.
  • The new test labels are exact matches, so they don't collide with the existing Inset and None radios. pick and click_box look up by exact label.

Security

None.

Performance

None. The change adds no data paths and no layer copies.

Quality (nits, for the release quality pass)

  • docs/user-guide/layouts.md:59: "a globe, an inset, both or none" is vague. "an inset and a globe" would say what "both" means.
  • the_controls_set_the_answers now uses "Inset and globe" where it used "Inset". The single-Inset path stays covered by the case table in the_locator_sends_its_value. No action needed.

AGENTS.md

No breaks found. Interface strings are wrapped in tl!, the surfaces are covered (desktop, browser wizard, and the engine, CLI, Python and Assistant, which already take the list form), and Create plus Undo is tested. No command, parameter or saved-format change, so command-surface.txt and the schema don't need regenerating. The overlay, format-read and wasm twin families don't apply to this diff.

Prior review threads: none on this PR, so nothing was left alone for being already raised.

Change size

Compared: the whole PR against main (merge base 1790b92 to PR head dd1ade3).

Measure Value
Files changed 3 (0 added, 3 modified, 0 removed, 0 renamed)
Size before 170.9 KB
Size after 173.5 KB
Total size change +2.6 KB
Path Before After Change
crates/ui-egui/src/publicationwizard/elements.rs 57.7 KB 60.0 KB +2.3 KB
crates/ui-egui/src/publicationwizard/arrange.rs 25.9 KB 26.1 KB +243 B
docs/user-guide/layouts.md 87.4 KB 87.4 KB +6 B

@jgregoriorincon

Copy link
Copy Markdown
Contributor Author

Both nits are left as they are: in the guide, "both" directly follows "an inset" ("a globe, an inset, both or none"), and the single "Inset" choice is still covered by each_choice_is_sent.

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3270/
Web app https://preview.rustgis.app/pr-3270/app/
Commit dd1ade3

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).

@jgregoriorincon
jgregoriorincon added this pull request to the merge queue Nov 28, 2026
Merged via the queue into opengeos:main with commit 26b9b3f Nov 28, 2026
28 checks passed
@jgregoriorincon
jgregoriorincon deleted the feat/3243-wizard-both-locators branch November 28, 2026 21:09
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.

[Feature]: The Publication Layout Wizard offers the inset and globe locators together

1 participant