Skip to content

feat(ui): keep the Publication Layout Wizard's fine element settings in a collapsed Advanced section - #3283

Merged
jgregoriorincon merged 3 commits into
opengeos:mainfrom
jgregoriorincon:feat/3280-wizard-advanced
Nov 28, 2026
Merged

jgregoriorincon merged 3 commits into
opengeos:mainfrom
jgregoriorincon:feat/3280-wizard-advanced

Conversation

@jgregoriorincon

@jgregoriorincon jgregoriorincon commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Publication Layout Wizard's Elements step mixed which elements the sheet carries with fine settings, and "Leave out of the legend" added a checkbox per layer to the step.

The step now keeps the elements, their styles and the legend title in its body, and holds the fine settings in an Advanced section at its end, closed at first:

  • the legend always on a box, its context layers and its columns;
  • the layers left out of the legend, in a list that scrolls past a set height;
  • the veil and the decimal mark.

The header counts the settings sent that differ from their default ("Advanced (3)"), the layers left out counting as one, so nothing picked is hidden without a sign. A setting the sheet can't use isn't counted, as it isn't sent.

They stay in the wizard because layout.publication sizes the legend and places the map with them; changing them later in the legend's properties keeps the legend's box and the map as they were made.

What the wizard sends and what the review lists are unchanged. With a legend off, the title's and the columns' disabled hints now say "title" and "split" separately.

New strings ("Advanced", "Advanced ({count})", "There is no legend to title.", "There is no legend to split.") wait for the release translation pass.

Testing

  • cargo fmt --check, clippy, nextest, doctests, the layer check and the schema check passed on the first commit; after the two follow-up commits, cargo fmt --check, clippy on rustgis-ui-egui and its 140 wizard tests passed.
  • New tests: the section starts closed and shows its six settings once opened; the header's count (default, three changed, Panel, legend off); a list of 100 layers keeps its height and its last box still works. The existing tests of those controls now open the section first.
  • ui_shot replay of the Elements step before and after.

Reach: the desktop app and the browser, which share this wizard. The command line, Python, the Assistant, MCP and plugins call layout.publication, which doesn't change. The touch interface doesn't offer the wizard. No ribbon, shortcut or command change. Undo of the layout Create makes is unchanged.

UI evidence

Elements step, before (left) and after (right):

3280-elements-closed.png

Scrolled to the end, with the decimal comma picked and the veil off; after, the section is open and counts both:

3280-elements-advanced.png

Related issue

Closes #3280

Summary by CodeRabbit

  • New Features
    • The publication layout wizard now groups advanced legend and map settings in a collapsible section, keeping commonly used element options in view.
    • The section header shows how many usable settings are customized. Long lists of excluded layers can be scrolled.
  • Documentation
    • Updated the layout guide to explain the elements step, advanced settings, and unavailable choices.

@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 Elements step keeps the legend title in its main section and moves fine settings into a collapsed Advanced section. The section header counts changed usable settings. The layer-exclusion choices appear in a bounded scrolling area. Tests and user-guide text reflect the updated layout.

Changes: Elements step settings

Layer / File(s) Summary
Advanced settings and control behavior
crates/ui-egui/src/publicationwizard/elements.rs
Legend box, context, columns, exclusions, veil, and decimal mark are in the collapsed Advanced section. Its header counts usable non-default settings, treating exclusions as one setting. The exclusion list has a bounded scrolling area. Legend title and columns have separate availability messages.
Validation and user guide
crates/ui-egui/src/publicationwizard/elements.rs, docs/user-guide/layouts.md
Tests cover the collapsed section, setting counts, long exclusion lists, and control availability. The guide describes the main and Advanced settings.

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

Change: Refactor

Possibly related issues

  • opengeos/RustGIS issue 3218 asks for per-layer legend exclusions; this change places the exclusion choices in Advanced.
  • opengeos/RustGIS issue 3095 asks for legend title, columns, and exclusion options; this change places columns and exclusions in Advanced.

Possibly related PRs

Suggested reviewers: giswqs, deniial00

Merge Risk: Minimal · up to 83039

The Elements step moves its fine settings into a collapsed Advanced section without changing what the wizard sends. 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 Publication Layout Wizard's fine element settings move into a collapsed Advanced section. The changeset moves legend box, context, columns, exclusions, veil, and d…
Description check Passed The description follows the template's Summary, Testing, and UI evidence sections, and it includes a related issue (Closes #3280). The Summary explains the change and the reasons for it. Testing lists…
Linked Issues check Passed Issue #3280 requires: (1) element choices, styles and legend title stay in the Elements step body; (2) legend box, context layers, columns, layers left out of the legend, veil and decimal mark move to…
Out of Scope Changes check Passed The changed areas are the Elements step code in crates/ui-egui/src/publicationwizard/elements.rs, its tests, and docs/user-guide/layouts.md. The code changes implement #3280: the Advanced section, its…
Full details: Title check

Explanation

The title names the main change: the Publication Layout Wizard's fine element settings move into a collapsed Advanced section. The changeset moves legend box, context, columns, exclusions, veil, and decimal mark into a collapsed Advanced section, matching the title. The title follows the conventional type(scope) prefix style and is a single sentence. At 100 characters it is slightly long but still readable.

Full details: Description check

Explanation

The description follows the template's Summary, Testing, and UI evidence sections, and it includes a related issue (Closes #3280). The Summary explains the change and the reasons for it. Testing lists the commands run, the new tests, and the ui_shot replay. UI evidence includes before and after screenshots, which the template requires for visible UI changes. The template's 'No visible UI change.' line is not used, which is correct because this PR changes the UI. The description is thorough and complete.

Full details: Linked Issues check

Explanation

Issue #3280 requires: (1) element choices, styles and legend title stay in the Elements step body; (2) legend box, context layers, columns, layers left out of the legend, veil and decimal mark move to a collapsed Advanced section; (3) the left-out list scrolls past a set height; (4) the header counts settings that differ from default; (5) the wizard's sent data does not change. Head code in crates/ui-egui/src/publicationwizard/elements.rs supports (2) to (4). The Elements struct and Default keep these settings. advanced_changed counts legend box, context, legend columns or title, a non-empty left-out list as one, veil off and decimal comma, each only when usable. EXCLUDE_HEIGHT is 140.0 for the scrolling exclusion list. legend_exclude lists layers by name. The sent() function builds the payload keys (locator, northArrow, legend, legendBox, contextInLegend, colorbar, scaleBar, grid, veil, decimal) from the same answers. The PR description and summary state that the payload and review list are unchanged, and the new tests cover the closed initial state, the six settings, the count, and a 100-layer list. Limit: the whole-PR diff and the base blob of elements.rs could not be read, so requirement (5) rests on the author's statement and the head code, not a base-to-head comparison.

Full details: Out of Scope Changes check

Explanation

The changed areas are the Elements step code in crates/ui-egui/src/publicationwizard/elements.rs, its tests, and docs/user-guide/layouts.md. The code changes implement #3280: the Advanced section, its header count, the exclusion list height, and the disabled hints that now separate 'title' from 'split'. The tests cover those same controls. The documentation describes the new Elements and Advanced split, so it supports the objective. The PR states that no ribbon, shortcut, command, or layout.publication contract changes. The head code shows no unrelated functionality. Limit: the base-to-head diff could not be read, so changes outside the summarized files are not verified.

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 checks the settings tucked away,
The legend title stays out in the day.
The layer list can scroll, row after row,
A count shows which changed choices now show.
Then off hops Bun, with settings neat,
And carrots packed for the reviewer's seat.

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: 9904949e-b1c0-4702-b4e3-c3208905b5ae
Commits

Reviewing files that changed from the base of the PR and between 9f64d17 and 830390f.

Files selected for processing: 2

  • 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; 6 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

Code review

I reviewed the diff (2 files: crates/ui-egui/src/publicationwizard/elements.rs and docs/user-guide/layouts.md) against the staged AGENTS.md and the surrounding wizard code. There are no prior review threads, so no earlier concerns were skipped.

Bugs

None found. I checked the header count against Draft::sent. Every Advanced setting that is counted is the same one that is sent, and a setting the sheet can't use is neither counted nor sent. The worked cases in the_header_counts_the_settings_changed agree with that: default is 0, three changed is 3, every setting on is 5, Panel is 3, and legend off is 1.

Security

None found. The change is UI layout and does not touch input parsing or file access.

Performance

  • advanced_changed (elements.rs:228) and the other helpers in this step each call listed(s) on every frame, about five passes per frame. Each pass builds a HashMap of lowercased names. This is harmless at typical layer counts. Confidence: low. Inline comment posted.

Quality

  • EXCLUDE_HEIGHT with max_height and min_scrolled_height behaves as the comment describes. egui only applies the minimum when the content needs scrolling, so a short list still shrinks to its content.
  • The layout doc matches the new placement: title in the body, columns and the rest in Advanced.
  • The tick helper is now a free function with an unchanged doc comment, and the old closure is removed.
  • Nit: the header count is computed before the section is drawn, so it updates one frame late. The code comment says so, so this is intended.

AGENTS.md

No breaks found.

  • Strings are wrapped in tl! or i18n::fmt. The format! calls appear only in tests.
  • No command, project format or saved data changed, so no schema or fixture update is needed.
  • No timer waits or assert_eq! on identical tokens were added, so test hygiene holds.
  • Twins: the change only touches the wizard UI. It does not change any layer.add*, project.open* or overlay tool, and there is no wasm32 branch in the diff. Nothing else needs the same change.
  • The PR body states which surfaces the change reaches. Command-line, Python and MCP behavior is unchanged, since they call layout.publication, which this diff does not touch.

Change size

Compared with the base branch: the whole PR against main (merge base 35614a4 to PR head 830390f).

Measure Value
Files changed 2 (0 added, 2 modified, 0 removed, 0 renamed)
Size before 147.7 KB
Size after 154.7 KB
Total size change +7.1 KB
Path Before After Change
crates/ui-egui/src/publicationwizard/elements.rs 60.0 KB 67.0 KB +7.0 KB
docs/user-guide/layouts.md 87.7 KB 87.7 KB +48 B

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3283/
Web app https://preview.rustgis.app/pr-3283/app/
Commit 830390f

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 b68cba4 Nov 28, 2026
28 checks passed
@jgregoriorincon
jgregoriorincon deleted the feat/3280-wizard-advanced branch November 28, 2026 23:21
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 keeps the Elements step's fine settings in a collapsed Advanced section

1 participant