Skip to content

CCM-16455: Add warning banner to "Create a message plan" page about editing a campaign#913

Open
bhansell1 wants to merge 10 commits intomainfrom
feature/CCM-16455-add-create-message-plan-warning
Open

CCM-16455: Add warning banner to "Create a message plan" page about editing a campaign#913
bhansell1 wants to merge 10 commits intomainfrom
feature/CCM-16455-add-create-message-plan-warning

Conversation

@bhansell1
Copy link
Copy Markdown
Contributor

@bhansell1 bhansell1 commented Apr 21, 2026

Description

(created on Andy's behalf).

  • Only updated snapshots as content is static
  • Had to separate label and hint text from select component to achieve desired layout

single campaign
image

multiple campaigns
image

form error
image

Context

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.

@bhansell1 bhansell1 requested a review from a team as a code owner April 21, 2026 09:39
ClareJonesBJSS
ClareJonesBJSS previously approved these changes Apr 21, 2026
Comment thread frontend/src/components/forms/MessagePlanForm/MessagePlanForm.tsx Outdated
Comment thread frontend/src/components/forms/MessagePlanForm/MessagePlanForm.tsx Outdated
@andykay-nhs andykay-nhs force-pushed the feature/CCM-16455-add-create-message-plan-warning branch 5 times, most recently from 7499e0a to aa915fb Compare April 24, 2026 10:22
initialState.name
);
const [campaignId, handleCampaignIdChange] = useTextInput<HTMLSelectElement>(
const [_, handleCampaignIdChange] = useTextInput<HTMLSelectElement>(
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.

if you're not using campaignId for anything, why do you need handleCampaignIdChange at all?

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.

thats an excellent point! I think I had assumed that there was some server action form magic going on that was still utilising this to an extent? but I will look into it to be sure and report back

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.

yep doesn't seem to be needed 🤷 removed now

@andykay-nhs andykay-nhs force-pushed the feature/CCM-16455-add-create-message-plan-warning branch 6 times, most recently from 56c77fc to 9bef55a Compare April 27, 2026 12:29
class="nhsuk-warning-callout nhsuk-u-margin-bottom-5 nhsuk-u-margin-top-5"
data-testid="campaign-warning-callout"
>
<h3
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.

might have to run it through an a11y tool to confirm but is it weird that this is an <h3> in the context of the structure of the page?

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.

there were some complaints about skipping from h1 -> h3 so have updated the callout header to be an h2 now. It still seems a bit weird but the extension I was using is no longer complaining at least 🤷. Using the NHS react component for this locks you in to using a heading element so the alternative is to ditch that and make the heading using regular html + nhs css classes. Is there a specific tool you'd recommend using to check this?

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.

yeah it feels like it shouldnt be a heading to me, maybe one to confirm with Reddy/Emma
and if they agree, presumably its just a change to use NHSNotifyWarningCallout instead then we can have more granular control over the markup?

Comment thread frontend/src/components/forms/MessagePlanForm/MessagePlanForm.tsx
@andykay-nhs andykay-nhs force-pushed the feature/CCM-16455-add-create-message-plan-warning branch from 9bef55a to 41df2ea Compare April 27, 2026 14:06
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