Skip to content

fix(ui): say on the wizard's review that a typed credit line isn't used - #3179

Merged
jgregoriorincon merged 3 commits into
opengeos:mainfrom
jgregoriorincon:fix/3133-credit-line-review
Nov 28, 2026
Merged

jgregoriorincon merged 3 commits into
opengeos:mainfrom
jgregoriorincon:fix/3133-credit-line-review

Conversation

@jgregoriorincon

@jgregoriorincon jgregoriorincon commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In the Publication Layout Wizard, a credit line typed on the texts step and then switched off with No credit line showed as "(none)" on the review, so the typed line was dropped unsaid. The review now says "(none; the line typed isn't used)", as it already does for reference lines. With nothing typed it still says "(none)", and what Create sends is unchanged.

The wizard is a dialog of ui-egui, so the change reaches the apps that show it; the command line, Python, the Assistant and MCP call layout.publication, which has no review step. Nothing new to undo.

The new string waits for the release translation pass.

Testing

  • New test the_review_says_a_credit_line_switched_off_isnt_used: the credit row with the box on and off, over an empty, a blank and a typed line. It failed before the change and passes with it.
  • Full checks: fmt, clippy, nextest (10266 passed, 29 skipped), doctests, layer check and schema check; the two commits after that run only tighten the new test and reword its comment (wizard tests, clippy and fmt passed on the first of them, fmt on the second).
  • ui_shot replay before and after: a typed credit line, No credit line ticked, then the review.

UI evidence

The texts step, then the review's credit row before and after.

3133-compare.png

Related issue

Closes #3133

Summary by CodeRabbit

  • Bug Fixes
    • Publication reviews now display the credit line more clearly, including when it is turned off or no author is entered.

@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 wizard review now uses a shared formatter for the credit line. It distinguishes disabled credit lines with entered text from disabled empty lines, and displays the default credit for enabled lines with empty or whitespace-only author text.

Changes: Credit line review

Layer / File(s) Summary
Credit display and validation
crates/ui-egui/src/publicationwizard/review.rs
The review formats the credit line according to its enabled state and author text. Tests cover empty, whitespace-only, and nonempty values. When the line is disabled, entered text is marked as unused.

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

Change: Bug fix · Severity of issue fixed: Low

Possibly related issues

  • opengeos/RustGIS#2850 — This broader wizard issue includes the Review step, which this change updates for credit lines.

Possibly related PRs

  • opengeos/RustGIS#2875 — Introduces the Publication Layout Wizard review step and defines the credit-line behavior used by this change.
Merge Risk: Minimal · up to acd96

The Publication Layout Wizard review will now say a typed credit line isn't used when "No credit line" is ticked. No other behavior changes, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: the wizard's review now says that a typed credit line is not used when the credit line is switched off. The raw summary and objectives confirm the change is in the review's…
Description check Passed The description follows the template. It has a Summary that explains what changed and why. It has a Testing section that names a new test, full checks, and a ui_shot replay. It has a UI evidence secti…
Linked Issues check Passed [#3133] requires the Publication Layout Wizard review to say that a typed credit line is not used when "No credit line" is ticked. At the reviewed head, credit_value in crates/ui-egui/src/publicatio…
Out of Scope Changes check Passed The reviewed change set, as described by the summary and visible in the head blob of review.rs, is limited to the credit-line review formatting (credit_value) and its test. The change does not alter…
Full details: Title check

Explanation

The title names the change: the wizard's review now says that a typed credit line is not used when the credit line is switched off. The raw summary and objectives confirm the change is in the review's credit row. The title follows the repository's conventional-commit style. It is specific and matches the main change.

Full details: Description check

Explanation

The description follows the template. It has a Summary that explains what changed and why. It has a Testing section that names a new test, full checks, and a ui_shot replay. It has a UI evidence section with a before-and-after screenshot. It has a Related issue section that closes #3133. The template's 'Testing' and 'UI evidence' sections are filled in. The description does not state a 'No visible UI change' line, which is correct because the change is visible. The description is complete.

Full details: Linked Issues check

Explanation

[#3133] requires the Publication Layout Wizard review to say that a typed credit line is not used when "No credit line" is ticked. At the reviewed head, credit_value in crates/ui-egui/src/publicationwizard/review.rs returns tl!("(none; the line typed isn't used)") when the author field is switched off and the trimmed text is nonempty. It returns (none) when the field is switched off and empty, and keeps the default credit or the typed text when the field is on. This matches the reference-line behavior in reference_value, which the issue cites. The test the_review_says_a_credit_line_switched_off_isnt_used covers the credit row with the box on and off over empty, blank, and typed values, and asserts the row labels and the count of "(none)" labels. The issue has no further coding requirements. Scope uncertainty: the diff operation failed, so the change was verified from the head file blob only, not from the diff. The file blob matches the PR description and the summary.

Full details: Out of Scope Changes check

Explanation

The reviewed change set, as described by the summary and visible in the head blob of review.rs, is limited to the credit-line review formatting (credit_value) and its test. The change does not alter Create's output or the layout.publication path, which matches the PR description. The new user-visible string is the one the issue's fix requires. Its translation is deferred as the PR states, which is not a coding requirement. No unrelated changes were identified. Limitation: the whole-PR diff could not be read, so files outside review.rs could not be checked directly. The summary reports changes only in review.rs.

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 reads the credit line,
“Unused” now appears in view.
Empty fields show the default,
Whitespace gets that treatment too.
The review keeps each case in view.

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: df80a1b4-25c0-4fd9-9f88-deab852be74d
Commits

Reviewing files that changed from the base of the PR and between 40a1bff and acd9667.

Files selected for processing: 1

  • crates/ui-egui/src/publicationwizard/review.rs

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

Verdict: No bugs, security issues or AGENTS.md breaks found. The change fixes the silent drop it describes, and the review text now matches what Create sends.

Bugs

  • None found. Before the change, a typed credit line with "No credit line" ticked showed as "(none)", while Draft::params sends "author": "" and drops the typed text. The new credit_value shows "(none; the line typed isn't used)" in that case. Confidence: high.

Security

  • None found. The change only touches display text.

Performance

  • None found.

Quality

  • credit_value (review.rs:73) uses d.off(Field::Author), which for this field is the same as d.no_author, because left_out never applies to Field::Author. It matches texts.rs:36, so the choice is defensible, but a reader may wonder what else off covers. A short comment or a direct d.no_author check would make it clearer. Nit, confidence: medium.
  • The new string follows the existing reference-row wording, and the test checks both the ticked and unticked states. The string is not in the catalogs, which AGENTS.md allows for this PR. Nothing else to change.

AGENTS.md

  • None found. Interface text uses tl!, and the PR description covers the surfaces it reaches (the wizard dialog, with the command line, Python, Assistant and MCP not affected because layout.publication has no review step). The test asserts both the lossy case and the clean case.

Checked for twins

  • reference_value in the same file uses the same "(none; …isn't used)" pattern, and it is correct.
  • heading_row in the same file follows the same rule for left-out sections.
  • publicationwizard/sources.rs:446-473 already tests the reference twin's wording.
  • texts.rs:36 uses off(Field::Author) to disable the box, so the review and the editor agree.
  • Draft::params (mod.rs:232) is the send side and matches the review.

Earlier concerns

  • No prior review threads exist on this PR, so none were left alone.

Change size

Compared: the whole PR against main (merge base 032e917 to PR head acd9667).

Measure Value
Files changed 1 (modified 1, added 0, removed 0, renamed 0)
Size before 5.2 KB
Size after 6.9 KB
Total size change +1.7 KB
Path Before After Change
crates/ui-egui/src/publicationwizard/review.rs 5.2 KB 6.9 KB +1.7 KB

@jgregoriorincon

Copy link
Copy Markdown
Contributor Author

On the one nit (d.off(Field::Author) rather than d.no_author): keeping off. It is the one place that says whether a field's box is off, and the texts step follows it too, so the review stays in step if that rule changes. No code change.

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3179/
Web app https://preview.rustgis.app/pr-3179/app/
Commit acd9667

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 60da699 Nov 28, 2026
28 checks passed
@jgregoriorincon
jgregoriorincon deleted the fix/3133-credit-line-review branch November 28, 2026 02:30
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.

[Bug]: The Publication Layout Wizard's review doesn't say a typed credit line isn't used

1 participant