Skip to content

CCM-14747: Add BSL to routing pages#894

Open
ClareJonesBJSS wants to merge 22 commits intomainfrom
feature/CCM-14747_add-bsl-to-routing-frontend
Open

CCM-14747: Add BSL to routing pages#894
ClareJonesBJSS wants to merge 22 commits intomainfrom
feature/CCM-14747_add-bsl-to-routing-frontend

Conversation

@ClareJonesBJSS
Copy link
Copy Markdown
Contributor

@ClareJonesBJSS ClareJonesBJSS commented Mar 27, 2026

Description

  • Remove 'q4' exclusion from routing config accessibility types
  • Add choose BSL page

Screenshot_27-3-2026_123631_localhost

Screenshot_27-3-2026_123847_localhost

Screenshot_27-3-2026_124248_localhost

Screenshot_27-3-2026_124433_localhost

Screenshot_27-3-2026_125357_localhost

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.

@ClareJonesBJSS ClareJonesBJSS requested a review from a team as a code owner March 27, 2026 11:16
@ClareJonesBJSS ClareJonesBJSS force-pushed the feature/CCM-14747_add-bsl-to-routing-frontend branch from d396508 to 3c64b7c Compare March 27, 2026 12:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds British Sign Language (BSL, q4) as a supported accessible-format option in message plan (routing) flows, aligning it with existing large print and other-language routing pages.

Changes:

  • Extend routing-supported letter/accessibility enums and validators to include BSL (q4).
  • Add new “choose BSL template” and “preview BSL template” routing pages (plus auth protection and content).
  • Add/update unit, component, routing-component, and accessibility tests to cover the new routes and UI.

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated no comments.

Show a summary per file
File Description
utils/utils/src/zod-validators.ts Adds Zod validator and helper for BSL letter templates (q4).
utils/utils/src/enum.ts Updates routing-supported letter types and accessible formats to include q4.
utils/utils/src/tests/enum.test.ts Updates URL mapping test to cover q4 routing choose page.
tests/test-team/template-mgmt-routing-component-tests/letter/preview-british-sign-language-letter-template.routing-component.spec.ts New Playwright routing-component coverage for BSL preview page.
tests/test-team/template-mgmt-routing-component-tests/letter/choose-british-sign-language-letter-template.routing-component.spec.ts New Playwright routing-component coverage for choosing a BSL template.
tests/test-team/template-mgmt-routing-component-tests/edit-message-plan.routing-component.spec.ts Updates edit message plan routing-component test expectations to include BSL card/linking.
tests/test-team/template-mgmt-component-tests/template-protected-routes.component.spec.ts Includes new BSL routing pages in protected-routes coverage.
tests/test-team/template-mgmt-accessibility/routing.accessibility.spec.ts Adds accessibility scans for BSL choose/preview routing pages.
tests/test-team/template-mgmt-accessibility/route-coverage.accessibility.spec.ts Adds BSL routing pages to accessibility route coverage list.
tests/test-team/pages/routing/letter/preview-british-sign-language-letter-template-page.ts New page object model for BSL preview routing page.
tests/test-team/pages/routing/letter/index.ts Exposes new BSL routing page objects via barrel export.
tests/test-team/pages/routing/letter/choose-british-sign-language-letter-template-page.ts New page object model for BSL choose routing page.
tests/test-team/pages/routing/edit-message-plan-page.ts Adds BSL locator helpers to the edit message plan page object.
package-lock.json Patch-level AWS SDK dependency updates captured in lockfile.
frontend/src/middleware.ts Protects the new BSL routing paths behind auth middleware.
frontend/src/content/content.ts Adds content entries for BSL choose/preview routing pages.
frontend/src/app/message-plans/choose-british-sign-language-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx New Next.js routing page to preview a BSL template from a message plan.
frontend/src/app/message-plans/choose-british-sign-language-letter-template/[routingConfigId]/page.tsx New Next.js routing page to choose a BSL template for a message plan.
frontend/src/tests/utils/routing-utils.test.ts Updates accessible-template extraction test to include q4.
frontend/src/tests/helpers/helpers.ts Adds a reusable BSL authoring letter template test fixture.
frontend/src/tests/app/message-plans/review-and-move-to-production/page.test.tsx Ensures review page renders q4 conditional template.
frontend/src/tests/app/message-plans/review-and-move-to-production/snapshots/page.test.tsx.snap Snapshot updates reflecting BSL conditional template rendering.
frontend/src/tests/app/message-plans/preview-message-plan/page.test.tsx Ensures message plan preview renders q4 conditional template.
frontend/src/tests/app/message-plans/preview-message-plan/snapshots/page.test.tsx.snap Snapshot updates reflecting BSL conditional template rendering.
frontend/src/tests/app/message-plans/choose-british-sign-language-letter-template/preview-template/page.test.tsx New unit test coverage for BSL preview routing page.
frontend/src/tests/app/message-plans/choose-british-sign-language-letter-template/preview-template/snapshots/page.test.tsx.snap Snapshot for BSL preview routing page.
frontend/src/tests/app/message-plans/choose-british-sign-language-letter-template/page.test.tsx New unit test coverage for BSL choose routing page.
frontend/src/tests/app/message-plans/choose-british-sign-language-letter-template/snapshots/page.test.tsx.snap Snapshot for BSL choose routing page.
frontend/src/tests/app/edit-message-plan/snapshots/page.test.tsx.snap Snapshot updates to include BSL conditional template card.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ClareJonesBJSS ClareJonesBJSS force-pushed the feature/CCM-14747_add-bsl-to-routing-frontend branch from acc99b5 to b859392 Compare March 27, 2026 18:39
'PASSED',
{ letterType: 'x1' }
),
BSL_LETTER: TemplateFactory.uploadLetterTemplate(
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.

Optional suggestion, but this might be a good time to convert these to carbone letters

Copy link
Copy Markdown
Contributor Author

@ClareJonesBJSS ClareJonesBJSS Mar 31, 2026

Choose a reason for hiding this comment

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

True, I did that in the the unit test helpers and thought about scrubbing through tests and shifting to default to authoring across the board, but then figured we'd surely start actively retiring pdf letters pretty quickly and it could be done then. But if vaccs means it'll be May before we can even start talking about that I'm more inclined to after all

Copy link
Copy Markdown
Contributor Author

@ClareJonesBJSS ClareJonesBJSS Mar 31, 2026

Choose a reason for hiding this comment

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

OK, definitely too fiddly for a tangential task to shift everything, but I've amended 'uploadLetterTemplate' to 'uploadPdfLetterTemplate' so its easier to spot, changed all the routing-related component tests except for template previews to use authoring templates, and added BSL to the review/preview message plan page tests

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 enjoy the renaming :D

Copy link
Copy Markdown
Contributor

@alexnuttall alexnuttall Mar 31, 2026

Choose a reason for hiding this comment

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

Could you add renders, if the new factory templates are authoring letters in PROOF_APPROVED or SUBMITTED status please? The options object should be e.g.

      {
        shortFormRender: { status: 'RENDERED' },
        longFormRender: { status: 'RENDERED' },
      }

It shouldn't make a difference in a routing context probably, but its good to keep them realistic if possible I think

@ClareJonesBJSS ClareJonesBJSS force-pushed the feature/CCM-14747_add-bsl-to-routing-frontend branch from 553c14a to 8861e2d Compare March 31, 2026 11:26
export const accessibleFormatDisplayMappings = (letterType: LetterType) => {
const map: Record<LetterType, string> = {
export const accessibleFormatDisplayMappings = (
letterType: Exclude<FrontendSupportedLetterType, 'language'>
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.

Suggested change
letterType: Exclude<FrontendSupportedLetterType, 'language'>
letterType: FrontendSupportedAccessibleFormats

?

export const letterTypeMapping = (letterType: LetterType) =>
`${letterTypeMap[letterType]} letter`;
export const letterTypeMapping = (
letterType: Exclude<FrontendSupportedLetterType, 'language'>
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.

Suggested change
letterType: Exclude<FrontendSupportedLetterType, 'language'>
letterType: FrontendSupportedAccessibleFormats

is it not this ?


export const letterTypeDisplayMappings = (
letterType: LetterType,
letterType: Exclude<FrontendSupportedLetterType, 'language'>,
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.

same here?

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.

Both check against letterTypeMap which doesn't include 'language'

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.

4 participants