Skip to content

feat(ui): the Publication Layout Wizard asks for a kicker, headline figures and paper - #3292

Merged
jgregoriorincon merged 4 commits into
opengeos:mainfrom
jgregoriorincon:feat/3290-wizard-edge-fields
Nov 29, 2026
Merged

jgregoriorincon merged 4 commits into
opengeos:mainfrom
jgregoriorincon:feat/3290-wizard-edge-fields

Conversation

@jgregoriorincon

@jgregoriorincon jgregoriorincon commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

layout.publication takes a kicker and a paper colour for the edge style, and up to three headline figures for the edge and panel styles, but the Publication Layout Wizard asked for none of them.

  • Texts step: an edge sheet gets a Kicker field above the title; edge and panel sheets get three Headline figures rows (value and label). They take layer statistics from Insert Statistic.
  • Accent step: an edge sheet gets a Paper colour, with White to go back. The wizard asks for it because the command picks the texts' ink from the paper as it makes the sheet; changing it afterwards with Page Color keeps the ink.
  • Review lists them where the style draws them, and says when one typed isn't used by the style picked, or when a figure has a label and no value.

Texts are sent trimmed; a figure without a value isn't sent; white paper isn't sent. Nothing changes for the other styles. What is typed is kept if the style changes and comes back with it.

An edge sheet's Texts step is longer than the window and scrolls, so Insert Statistic sits below the figures.

New strings wait for the release translation pass. The three "not used" notes of the review now name their placeholder {text}.

Testing

  • cargo fmt --check, clippy, nextest, doctests, the layer check and the schema check passed; after the last commit (a translation call-site change), cargo fmt --check, clippy on rustgis-ui-egui and its wizard and i18n tests (181) passed.
  • New tests, written first: which styles are asked each field; what is sent (nothing left empty, trimmed, in order, a label without a value left out, nothing for the other styles or a figure); a statistic going to the field last focused, and to the note when the style hides that field; the length limit; the paper and White; the review's rows; Create putting the three on the sheet, undone in one step; long figures leaving the smallest window as it was.
  • ui_shot replay of the Texts, Accent and Review steps of an edge sheet, and the sheet it made.

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, command or project-format change. Undo of the layout Create makes is unchanged.

UI evidence

Texts step of an edge sheet, before (left) and after (right):

Texts step

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

Accent step

Review step, and the sheet Create made from it:

Review step and the sheet

Related issue

Closes #3290

Summary by CodeRabbit

  • New Features
    • Edge layouts now offer a paper-colour control, and the sheet’s text colour follows the chosen paper colour when created.
    • Edge layouts support a kicker; Edge and Panel layouts support up to three headline figures, each with a value and label.
    • The review step displays applicable kicker, figure, and paper-colour details, and indicates when entered fields won’t be used by the selected layout.
  • Documentation
    • Updated the layout guide with the new text fields and paper-colour behaviour.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Publication Layout Wizard adds kicker and paper inputs for edge sheets, plus up to three headline figures for edge and panel sheets. It filters these values by layout style, displays them in the review step, and documents the new inputs.

Changes: Publication Wizard Fields

Layer / File(s) Summary
Field availability and parameter serialization
crates/ui-egui/src/publicationwizard/mod.rs
Draft stores kicker, figure values and labels, and optional paper color. Parameter generation trims and filters these values according to the selected style.
Text and paper controls
crates/ui-egui/src/publicationwizard/texts.rs, crates/ui-egui/src/publicationwizard/accent.rs, crates/ui-egui/src/publicationwizard/sources.rs, docs/user-guide/layouts.md
The Texts step shows a kicker field for edge sheets and figure fields for edge and panel sheets. The Accent step shows a paper color control for edge sheets. Tests cover visibility, parameter generation, statistic insertion, and sheet creation. The guide describes the added inputs.
Review display
crates/ui-egui/src/publicationwizard/review.rs
The Review step shows kicker, figure, and paper rows. It marks entered values as unused when the selected style does not support them.

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant TextsStep
  participant AccentStep
  participant Draft
  participant PublicationLayout
  TextsStep->>Draft: Set kicker and figure values
  AccentStep->>Draft: Set paper color
  Draft->>PublicationLayout: Send filtered parameters
Loading

Possibly related issues

Possibly related PRs

  • opengeos/RustGIS#3107: This PR adds wizard inputs for the edge-style kicker and paper parameters defined by that PR.

Suggested reviewers: giswqs, elpidioassinaturas, deniial00

Merge Risk: Minimal · up to de618

The wizard adds Kicker, headline-figure, and Paper colour inputs and shows them on the Review step only for the styles that use them. No merge-blocking risk was found. The command interface and project format are unchanged, so a revert is straightforward.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Publication Layout Wizard now asks for a kicker, headline figures and paper colour. The changeset adds these inputs to the Texts, Accent and Review steps, so the t…
Description check Passed The description follows the template sections. It has a Summary that explains the change and why it is needed. It has a Testing section that lists the checks run, the new tests and a ui_shot replay. I…
Linked Issues check Passed [#3290] The changes implement each coding requirement in the issue.

(1) Texts step: texts.rs shows a Kicker field when the style is edge. Mod.rs sends the kicker only for edge layouts. Trimmed, nonem…
Out of Scope Changes check Passed No change is shown to be unrelated to #3290. The remaining changes support the requested feature:
- accent.rs, mod.rs, review.rs, texts.rs: the new fields, sending rules, review notes, and tests for t…
Full details: Title check

Explanation

The title names the main change: the Publication Layout Wizard now asks for a kicker, headline figures and paper colour. The changeset adds these inputs to the Texts, Accent and Review steps, so the title matches the changeset. The title is long at 85 characters, but it is specific and accurate.

Full details: Description check

Explanation

The description follows the template sections. It has a Summary that explains the change and why it is needed. It has a Testing section that lists the checks run, the new tests and a ui_shot replay. It has a UI evidence section with before and after screenshots for the Texts, Accent and Review steps. It links the related issue with Closes #3290. The template's 'No visible UI change.' line is not used, which is correct because this PR changes visible UI. The description is complete.

Full details: Linked Issues check

Explanation

[#3290] The changes implement each coding requirement in the issue.

(1) Texts step: texts.rs shows a Kicker field when the style is edge. Mod.rs sends the kicker only for edge layouts. Trimmed, nonempty kicker values are sent.
(2) Headline figures: texts.rs adds a 'Headline figures' section with three value and label rows, shown for edge and panel styles. Draft::params sends figures that have a value. Labels without values are left out. Each row takes layer statistics through Insert Statistic, and tests check that the statistic goes to the last focused field.
(3) Accent step: accent.rs shows a Paper control only when Draft::edge() is true. The control defaults to white, stores the picked colour in d.paper, and offers a White button that clears it. White paper is not sent.
(4) Review: review.rs lists kicker, figures, and paper where the style draws them. It shows a 'not used' note when a typed value is excluded by the selected style, and a note when a figure has a label and no value.
(5) No changes for other styles: the summary states that fields are excluded for other styles, and tests check that nothing is sent for them.
(6) Automated tests cover field visibility, parameters, trimming and ordering, statistic insertion, the length limit, paper and White, review rows, and Create with undo.

This assessment relies on the PR summary and the stated test coverage. I did not read the diff hunks or run the tests.

Full details: Out of Scope Changes check

Explanation

No change is shown to be unrelated to #3290. The remaining changes support the requested feature:

  • accent.rs, mod.rs, review.rs, texts.rs: the new fields, sending rules, review notes, and tests for them.
  • review.rs: the shared 'not_used' formatting and the {text} placeholder rename. These support the 'not used' review notes that the issue requests.
  • texts.rs: the scrolling of the taller edge Texts step. This keeps Insert Statistic reachable after the added fields.
  • texts.rs and mod.rs: the length-limit notice now counts the new fields. This follows from the new text inputs.
  • sources.rs: test helpers changed from private to pub(in crate::publicationwizard). This only lets the new tests reuse them.
  • Translation strings and the call-site change: the PR says new strings wait for the release translation pass. This is required for the new UI text.
  • docs/user-guide/layouts.md: documents the new wizard inputs and the paper colour behaviour.

The PR states that the command line, Python, MCP, and the layout command are unchanged. The summary does not show any changes to those surfaces.

This assessment relies on the PR summary. I did not read the diff hunks.

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 fields at dawn,
Three figures line the page in rows.
A kicker joins the edge-sheet text,
And paper takes the shade it chose.
The review shows what styles will use,
Then hops away through layouts new.

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: 1fc8b6c8-65d4-4193-ae1f-14c6894021fe
Commits

Reviewing files that changed from the base of the PR and between 9140136 and de6187a.

Files selected for processing: 6

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

@github-actions

Copy link
Copy Markdown
Contributor

Code review

I found no bugs, crash paths, silent data loss or AGENTS.md breaks in this PR. I posted no inline comments because I had nothing above nit level to raise. I didn't run the build or tests, since this environment has no shell; the review is by reading the diff and the code it touches.

Checked and consistent

  • Engine contract: kicker, paper and figures are sent only where layout.publication accepts them (crates/engine/src/cmd/layout/publication/mod.rs:150-157). The wizard's left_out and figures_sent gates match the engine's edge and panel rules. Params are unchanged, so command-surface.txt doesn't need updating.
  • Figure sizes: params() returns early for figure sizes, so nothing is sent. The Texts and Accent steps are skipped for figures (steps()), and the review returns before the new rows. The new rows therefore never list a value that isn't sent.
  • Review and send logic agree: the same left_out and drawn rules drive what is sent and what is said as "not used". Each "not used" notice is per line, which is right because the figure fields are single-line TextEdits.
  • Translation: the renamed {heading} → {text} templates don't appear in any i18n/*.tsv catalog, so no existing translation is orphaned.
  • Tests: the new tests cover both directions (notice shown when lossy, none when clean), as AGENTS.md asks. The two assert_eq! calls compare distinct values.
  • Wasm and layering: only ui-egui changes, with no desktop-only APIs added. I couldn't run the wasm build here.

Quality (nits, no inline comments)

  • Draft::field_mut (crates/ui-egui/src/publicationwizard/mod.rs, the Field::FigureValue(at) and FigureLabel(at) arms) indexes self.figures[at]. The index always comes from 0..3 inside the wizard, so this can't panic today, but get_mut would match the AGENTS.md habit if the index ever came from elsewhere. Confidence: high that it's safe as written; low that it matters.
  • sources.rs widens the test helpers to pub(in crate::publicationwizard). This is fine, just noting it for the release quality pass.

Earlier concerns: none. prior-reviews.json has no threads, so none were left alone.

Change size

Compared with the base branch: merge base 0286882 to PR head de6187a.

Measure Value
Files changed 6 (0 added, 6 modified, 0 removed, 0 renamed)
Size before 178.9 KB
Size after 196.7 KB
Total size change +17.9 KB
Path Before After Change
crates/ui-egui/src/publicationwizard/texts.rs 4.7 KB 13.0 KB +8.3 KB
crates/ui-egui/src/publicationwizard/review.rs 7.2 KB 11.6 KB +4.5 KB
crates/ui-egui/src/publicationwizard/accent.rs 6.8 KB 9.2 KB +2.4 KB
crates/ui-egui/src/publicationwizard/mod.rs 45.4 KB 47.7 KB +2.3 KB
docs/user-guide/layouts.md 87.7 KB 87.9 KB +249 B
crates/ui-egui/src/publicationwizard/sources.rs 27.1 KB 27.3 KB +176 B

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

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3292/
Web app https://preview.rustgis.app/pr-3292/app/
Commit de6187a

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

Merged via the queue into opengeos:main with commit 3c0fba7 Nov 29, 2026
28 checks passed
@jgregoriorincon
jgregoriorincon deleted the feat/3290-wizard-edge-fields branch November 29, 2026 00:58
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 asks for an edge sheet's kicker and paper, and for headline figures

1 participant