Skip to content

CCM-16449: Printing and postage errors#928

Open
chris-elliott-nhsd wants to merge 3 commits intomainfrom
feature/CCM-16449_postage-errors
Open

CCM-16449: Printing and postage errors#928
chris-elliott-nhsd wants to merge 3 commits intomainfrom
feature/CCM-16449_postage-errors

Conversation

@chris-elliott-nhsd
Copy link
Copy Markdown
Contributor

Description

PR to implement feedback to users in the UI when there is a problem approving their template relating to their printing and postage settings

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@chris-elliott-nhsd chris-elliott-nhsd requested review from a team as code owners April 29, 2026 12:49
@chris-elliott-nhsd chris-elliott-nhsd force-pushed the feature/CCM-15042_letter-gen-errors branch from d622dd3 to 5e44446 Compare April 30, 2026 10:03
@chris-elliott-nhsd chris-elliott-nhsd force-pushed the feature/CCM-16449_postage-errors branch 2 times, most recently from a43b691 to d05da78 Compare April 30, 2026 16:10
Comment thread frontend/src/styles/app.scss
Comment thread frontend/src/app/preview-letter-template/[templateId]/page.tsx
}

if (
Math.ceil(templatePageCount / (letterVariantBothSidesFlag ? 2 : 1)) >
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we also do this in PreviewTemplateDetailsAuthoringLetter.tsx, it might be worth a util

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

alexnuttall
alexnuttall previously approved these changes May 1, 2026
actionText1:
'reduce the number of sheets and upload a different letter template file',
actionText2: 'change your printing and postage option',
fieldText: 'Change your printing and postage option',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think based on Michael's recent changes, you should be able to use the content renderer to do this, am I right @harrim91 ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to use markdown and ContentBlock to render things into the error summary component now - was in #907

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a good reason to use the content renderer instead of an error code for this? willing to do it, but it's a major rewrite so would prefer if there was a good reason for it. error codes have been in the codebase longer than the content renderer so feel like a reasonable pattern to follow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another thought i had about this, because this error requires different content in the summary vs next to the form field, some kind of mapping is going to be required regardless of whether we use the content renderer, so you don't really gain much from passing markdown back from the form action that you then have to map to different markdown

Base automatically changed from feature/CCM-15042_letter-gen-errors to main May 1, 2026 10:53
@alexnuttall alexnuttall dismissed their stale review May 1, 2026 10:53

The base branch was changed.

@chris-elliott-nhsd chris-elliott-nhsd force-pushed the feature/CCM-16449_postage-errors branch from 002b044 to b5c9cb4 Compare May 1, 2026 12:41
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.

5 participants