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
fix(ui): say on the wizard's review that a typed credit line isn't used - #3179
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.
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.
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: 4
Check name
Status
Explanation
Title check
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
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
[#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
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.
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.
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).
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 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
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 calllayout.publication, which has no review step. Nothing new to undo.The new string waits for the release translation pass.
Testing
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.ui_shotreplay 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.
Related issue
Closes #3133
Summary by CodeRabbit