You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(ui): the Publication Layout Wizard offers the inset and globe locators together - #3270
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".
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.
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.
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.
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: 4
Check name
Status
Explanation
Title check
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
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
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
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.
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.
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).
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 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
layout.publicationcan 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."locator": ["inset", "globe"].Testing
cargo nextest run: 10529 passed, 29 skipped.ui_shotreplay onmainand on this branch.UI evidence
Elements step, before and after:
Review step, before and after:
The sheet, before (default globe) and after (inset and globe):
Related issue
Closes #3243
Summary by CodeRabbit