Skip to content

feat(ui): a resizable Publication Layout Wizard with its steps listed - #3125

Merged
jgregoriorincon merged 7 commits into
opengeos:mainfrom
jgregoriorincon:feat/3105-wizard-window
Nov 27, 2026
Merged

jgregoriorincon merged 7 commits into
opengeos:mainfrom
jgregoriorincon:feat/3105-wizard-window

Conversation

@jgregoriorincon

@jgregoriorincon jgregoriorincon commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Publication Layout Wizard (#2850) had a fixed window 380 points wide, and its steps could only be walked with Back and Next.

  • The window can be resized. It opens at 600 × 515 points (tall enough for the Style step in English without scrolling) and can't be dragged below 420 × 360.
  • Its steps are listed on the left, the current one marked; a click goes to one. A figure lists only its own steps.
  • On a screen narrower than 480 points the list is left out; the heading still says which step this is.
  • The step's area takes the room the window leaves, so Back, Next and Cancel stay in place from step to step. A step longer than that scrolls on its own, and the review's long values wrap.

No new state and no command change: the list reads the draft's own steps, so a step added to them is listed too. The window stops being auto-sized, which is why the step area is now sized from the window instead of a fixed height.

Surfaces: the desktop app and the browser share this dialog; the touch interface (ui-touch) doesn't open it. The ribbon entry and ui.dialog are unchanged, so command search, the Assistant, MCP, plugins, the command line and Python see no difference, and nothing new needs undoing.

Testing

  • New tests for the list (order, marked step, figure, click, Tab), the opening and smallest sizes (each step keeps the smallest size, long typed text included), and a larger window keeping Next in place. The narrow-screen test now also covers the hidden list, and a second one narrows the screen with the wizard open.
  • cargo nextest run -p rustgis-ui-egui -E 'test(publicationwizard) | test(i18n)': 92 passed. cargo fmt --all --check, cargo clippy -p rustgis-ui-egui --all-targets -- -D warnings and cargo check -p rustgis-web --target wasm32-unknown-unknown clean.

UI evidence

Style step, before and after:

3105-style-before-after.png

Review step, after:

3105-review-after.png

Related issue

Closes #3105

Summary by CodeRabbit

  • New Features
    • The Publication Layout Wizard can be resized, with its content adapting to the available space. It opens at a comfortable default size and has a minimum size to keep the wizard usable.
    • A clickable step list appears on wider screens; on narrow screens, the list is hidden and the current step remains identifiable by its heading.
    • Wizard content scrolls independently, and long review values wrap instead of widening the window. The “No cartographic reference” option also wraps its text within the available space.
  • Documentation
    • Updated the user guide to describe the resizable window and responsive step list.

@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 Publication Layout Wizard is resizable and provides clickable step navigation on wider screens. On narrow screens, it hides the step list. The active step scrolls within the available body, and long review values and the source checkbox label wrap.

Changes: Wizard layout and content

Layer / File(s) Summary
Window sizing and responsive step navigation
crates/ui-egui/src/publicationwizard/mod.rs, docs/user-guide/layouts.md
The wizard adds translated step labels, clickable navigation, and default and minimum dimensions. It shows the step list when the screen is at least 480 points wide. The active step scrolls in the available body above the footer. Tests cover navigation, sizing, and narrow-screen behavior.
Wrapping long wizard content
crates/ui-egui/src/publicationwizard/review.rs, crates/ui-egui/src/publicationwizard/sources.rs
Review values and the source checkbox label wrap within their available widths. The source label test queries labels by AccessKit role.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant StepList
  participant PublicationLayoutWizard
  participant StepContent
  User->>StepList: Select a draft step
  StepList->>PublicationLayoutWizard: Change the active step
  PublicationLayoutWizard->>StepContent: Display the active step in the available body
Loading

Possibly related issues

  • opengeos/RustGIS#3109: The wizard’s step list reflects the draft’s steps, but this change does not add the requested “Sources and reference” step or layer menus.

Possibly related PRs

Suggested reviewers: ninhhaidang, deniial00

Merge Risk: Minimal · up to a6608

The Publication Layout Wizard becomes resizable, with a clickable step list on wider screens and wrapped long text. The change touches only UI layout and documentation, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(ui): a resizable Publication Layout Wizard with its steps listed" matches the main change. The wizard becomes resizable, and a clickable step list is added. The title does not mention …
Linked Issues check Passed [#3105] Requirements, checked against the current head summary of crates/ui-egui/src/publicationwizard/mod.rs. The previous code read at 22e974e found each requirement met. The changes since then, as …
Out of Scope Changes check Passed Whole-PR changes, per the summary:
- publicationwizard/mod.rs: window sizing, step list, step area, step labels, and tests. Implements #3105.
- publicationwizard/review.rs: wrapping label for review v…
Description check Passed The description follows the repository template. It has Summary, Testing, UI evidence, and Related issue sections. The Summary explains the resizable window, the step list, the narrow-screen behavior,…
Full details: Title check

Explanation

The title "feat(ui): a resizable Publication Layout Wizard with its steps listed" matches the main change. The wizard becomes resizable, and a clickable step list is added. The title does not mention the narrow-screen hiding, the review wrapping, or the checkbox layout fix, but those are secondary.

Full details: Linked Issues check

Explanation

[#3105] Requirements, checked against the current head summary of crates/ui-egui/src/publicationwizard/mod.rs. The previous code read at 22e974e found each requirement met. The changes since then, as summarized, keep these behaviors:

  1. Resizable window, 600x515 default, 420x360 minimum: the summary states the window is resizable with these sizes. Met.
  2. Steps listed on the left, each clickable: the summary states a clickable step list appears on the left when the screen is at least 480 points wide, with direct step selection and keyboard access. Met.
  3. Fields in the middle, Back, Next and Cancel at the bottom: the summary states the current step takes the space above the footer and scrolls within it, and navigation stays in place across steps and resizes. Met.
  4. A figure lists only its own steps: not changed by the summarized changes; the previous read at 22e974e found this met. Not re-read at head.
  5. Narrow screens hide the list and keep the heading: the summary states the list is hidden below 480 points. The heading is not mentioned as changed. Met on the summary evidence.
  6. layout.publication unchanged: the summary states no command change and that the ribbon entry and ui.dialog are unchanged. Consistent with #3105.
    All requirements are coding requirements. Automated tests are reported in the summary (step list, sizing, footer placement, narrow screens). The whole-PR diff and the current head source were not read directly in this assessment. The assessment relies on the AI-generated summary for the changes since 22e974e.
Full details: Out of Scope Changes check

Explanation

Whole-PR changes, per the summary:

  • publicationwizard/mod.rs: window sizing, step list, step area, step labels, and tests. Implements #3105.
  • publicationwizard/review.rs: wrapping label for review values (+2/-1). Keeps the window usable at its minimum size, which supports #3105.
  • publicationwizard/sources.rs: the 'No cartographic reference' checkbox placed in a width-limited, wrapping container, and a test that locates field labels by AccessKit label role (+9/-2). Keeps wizard fields usable at smaller window sizes; the test change supports the new layout. Connected to #3105.
  • docs/user-guide/layouts.md: documents the resizable window, step list, and narrow-screen behavior. Documents #3105.
    No change is shown to affect unrelated features, the layout.publication command, or the ui.dialog entry. Limits: the changed files were identified from the summary and were not read directly at head.
Full details: Description check

Explanation

The description follows the repository template. It has Summary, Testing, UI evidence, and Related issue sections. The Summary explains the resizable window, the step list, the narrow-screen behavior, and the sizing and scrolling changes. The Testing section lists new tests, the nextest command with 92 passing tests, and the fmt, clippy, and wasm checks. The UI evidence section includes before and after screenshots for the Style step and an after screenshot for the Review step. The Related issue section says Closes #3105. The objectives report 71 passing tests, but the description reports 92. The description does not state the reason for that difference. This gap does not block a pass because the core template content is present.

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 resizes the wizard with care.
Clickable steps appear with room to spare.
On narrow screens, the list slips away.
The current step stays clear in display.
Long labels curl neatly, then onward we hop.

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: 6539ba41-a481-4aaf-b8cb-091b8bd1e552
Commits

Reviewing files that changed from the base of the PR and between 22e974e and a6608da.

Files selected for processing: 3

  • crates/ui-egui/src/publicationwizard/mod.rs
  • crates/ui-egui/src/publicationwizard/sources.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; 2 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

Code review

I found no bugs, security issues, or AGENTS.md violations in this PR. Two quality nits are posted inline. Prior reviews: none exist on this PR, so no earlier concerns were skipped.

I read the full diff (three files: the wizard's mod.rs, review.rs, and docs/user-guide/layouts.md) and the surrounding helpers (dialog_width, dialog_button). I checked:

  • Borrowing in step_list: d.steps() returns a &'static slice, so reading and writing d.step inside the loop compiles without conflict.
  • Figure drafts: the list shows only [Size, Review], and d.step stays valid when the size changes.
  • Translation: the new labels use tl!, and the heading keeps tl_raw!, as the existing code does.
  • Wasm: no std::time or desktop-only calls were added.
  • Twins: the diff touches only the wizard's dialog code. It doesn't change the layer.add* or project.open* families, the overlay tools, or any cfg(wasm32) branch, so none of those twins apply.
  • Commands: no command is added or changed, so command-surface.txt and the schema need no update.

Bugs

  • None found.

Security

  • None found.

Performance

  • None found. d.steps() runs once per frame and does a fixed amount of work.

Quality

  • Footer height is hard-coded (mod.rs:271, confidence medium): the 6.0 separator allowance is taken from egui's internals. If it is wrong, the smallest window could clip Next. The smallest-size test only covers the default font. Not blocking.
  • Doc overstates screen awareness (mod.rs:197, confidence high): SIZE's doc says it fits "where the screen has room", but only the width is screen-aware. Not blocking.
  • Duplicate step-name match: step_label and step_name map the same five variants, differing only in the macro. This is a refactor point, not a defect.

AGENTS.md

  • None found.

Change size

Compared with the base branch (merge base 9f81487 to PR head 7c0a9c8).

Files changed Added Modified Removed Renamed Size before Size after Total change
3 0 3 0 0 101.5 KB 110.3 KB +8.8 KB
Path Before After Change
crates/ui-egui/src/publicationwizard/mod.rs 22.8 KB 31.3 KB +8.5 KB
docs/user-guide/layouts.md 76.1 KB 76.3 KB +170 B
crates/ui-egui/src/publicationwizard/review.rs 2.6 KB 2.7 KB +110 B

@jgregoriorincon
jgregoriorincon marked this pull request as draft November 27, 2026 17:18
@jgregoriorincon
jgregoriorincon marked this pull request as ready for review November 27, 2026 17:21
@github-actions

Copy link
Copy Markdown
Contributor

Code review

I read the full diff (3 files, +228/-29 in the wizard, plus review.rs and the user guide), the surrounding wizard code, and the existing dialog_width and dialog_button helpers. I could not build or run the tests here (no shell), so everything below is from reading the code.

Bugs

None found. I checked the step-list click path (d.step assignment with steps() returning &'static [Step], so no borrow conflict), the body-height arithmetic (max(0.0) guards negative space), the narrow-screen path (list hidden, heading still shows the step), the figure path (only Size and Review are listed), and the Id::unique("publication_wizard") window id, which is egui's string-keyed id, so the resized size persists between frames.

Security

None found. The change is UI layout and does not touch input parsing or the command surface.

Performance

None found. The step list is five buttons, and the layout runs per frame as before.

Quality

  • Low confidence it matters, nit: step_name (tl_raw!) and step_label (tl!) in publicationwizard/mod.rs (around lines 151–170) hold the same five-arm match. The split is deliberate, since the heading needs logical-order args for i18n::fmt, but a future step added to one match and not the other would show a raw name in the list. A short comment saying the two must list the same steps would prevent that. Category: quality.
  • Low, nit: the tests listed and tab_reaches_every_step_in_the_list hard-code ["Size", "Style", "Texts", "Accent", "Review"]. Deriving the names from Step would keep them in step with the enum. Category: quality.

AGENTS.md

No breaks found. The PR meets these rules:

  • No unwrap, expect or indexing in the new non-test code.
  • User-visible text goes through tl!.
  • No command or parameter changed, so command-surface.txt needs no update.
  • No wasm-only or desktop-only branch was added, so the wasm build is not affected by this diff.
  • The PR body states the surfaces reached, and includes before/after screenshots.

Twins checked

This diff changes only the wizard, so the family checks (read routes, overlay tools, layer.add* and project.open*, wasm/desktop cfg twins) do not apply. I checked that the wizard has no cfg branch and that ui-touch does not open it.

Earlier review threads

I left 2 earlier concerns alone: the footer's hard-coded 6-point separator (answered by the author with the egui default), and the SIZE doc comment wording (fixed in 22e974e). No inline comments were posted, since the findings are nits and are grouped above.

Change size

Compared with the base branch: the whole PR against main (merge base 9f81487 to PR head 22e974e).

Measure Value
Files changed 3 (0 added, 3 modified, 0 removed, 0 renamed)
Size before 101.5 KB
Size after 110.4 KB
Total size change +8.9 KB
File Before After Change
crates/ui-egui/src/publicationwizard/mod.rs 22.8 KB 31.4 KB +8.6 KB
docs/user-guide/layouts.md 76.1 KB 76.3 KB +174 B
crates/ui-egui/src/publicationwizard/review.rs 2.6 KB 2.7 KB +113 B

@jgregoriorincon

Copy link
Copy Markdown
Contributor Author

On the two quality nits of the review of 22e974e, no change: step_name and step_label are both exhaustive matches on Step with no wildcard, so a new step doesn't compile until both name it; the step names written out in the tests are the expected values, spelled out on purpose rather than derived from the code under test.

@jgregoriorincon
jgregoriorincon added this pull request to the merge queue Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3125/
Web app https://preview.rustgis.app/pr-3125/app/
Commit a6608da

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 removed this pull request from the merge queue due to a manual request Nov 27, 2026
…ndow

# Conflicts:
#	crates/ui-egui/src/publicationwizard/mod.rs
#	docs/user-guide/layouts.md
@github-actions

Copy link
Copy Markdown
Contributor

Code review

I read the full diff, the staged metadata and prior review threads, and the surrounding wizard code (steps(), moved(), dialog_width, sources.rs, the test harness). I found one issue worth an inline comment. The rest is minor and grouped below.

Bugs

  • Step list can push the footer out of the window (publicationwizard/mod.rs:399-407, inline comment posted). The list isn't scrollable, and its row is sized to the room above the buttons. At the minimum size, longer translations or a larger font can make the list taller than that room, which pushes Next, Back and Cancel down out of view. Confidence: medium-low. I haven't run it, so this is from the constants in the diff. The suggested fix wraps the list in a scroll area.

Security

  • None found.

Performance

  • None found.

Quality

  • Inconsistent step name: the list shows "Sources" (mod.rs:351), while the heading shows "Sources and reference" (step_name, mod.rs:339). Consider using one name in both places. Left for the release quality pass. Confidence: high.
  • Test helper coupling: listed() and the narrow-screen assertions depend on English labels and the exact step count. That's acceptable, but it makes these tests fragile to label changes. Confidence: low.

AGENTS.md

  • None found. The new strings use tl!/tl_raw! correctly, there's no platform-specific code, the change doesn't touch the command surface or the saved-file format, and the PR description covers the surfaces it reaches.

Checked and not applicable

  • The twin-family rules cover read routes, overlay tools, the layer.add*/project.open* commands, and wasm32 branches. This PR touches none of them.
  • The prior thread on the footer's 6.0 constant is already answered, so I didn't repeat it. The doc-comment thread on the SIZE constant is outdated and was already fixed, so I left it alone. I raised no concern that repeats an earlier one.

Change size

Compared with the base branch: the whole PR against main (merge base c9563fd to PR head a6608da).

Files changed Added Modified Removed Renamed Size before Size after Size change
4 0 4 0 0 131.3 KB 140.6 KB +9.3 KB
Path Size before Size after Size change
crates/ui-egui/src/publicationwizard/mod.rs 30.1 KB 38.8 KB +8.7 KB
crates/ui-egui/src/publicationwizard/sources.rs 17.6 KB 18.0 KB +360 B
docs/user-guide/layouts.md 79.4 KB 79.6 KB +174 B
crates/ui-egui/src/publicationwizard/review.rs 4.2 KB 4.4 KB +113 B

@jgregoriorincon

Copy link
Copy Markdown
Contributor Author

On the step name noted in the review of a6608da, no change: the list says "Sources" so it stays on one line in its 110-point column, and the heading above the fields gives the full "Sources and reference".

@jgregoriorincon
jgregoriorincon added this pull request to the merge queue Nov 27, 2026
Merged via the queue into opengeos:main with commit 5919b84 Nov 27, 2026
30 checks passed
@jgregoriorincon
jgregoriorincon deleted the feat/3105-wizard-window branch November 27, 2026 19:06
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]: Publication Layout Wizard in a resizable window with its steps listed

1 participant