Skip to content

[CCM-10893] Account header#643

Closed
nicki-nhs wants to merge 77 commits intomainfrom
feature/CCM-10893-account-header
Closed

[CCM-10893] Account header#643
nicki-nhs wants to merge 77 commits intomainfrom
feature/CCM-10893-account-header

Conversation

@nicki-nhs
Copy link
Contributor

@nicki-nhs nicki-nhs commented Aug 18, 2025

Description

image
  • Updates version of nhs-frontend to pre-release 10 ^10.0.0-internal.3 to bring in the new header with account from the design system
  • Updates some global styling to use css variables to import nhs colours using the new mixin from the new version of nhs-frontend
  • Updates icon classes as used in the new version of nhs-frontend
  • Creates new NotifyBackLink component which replaces BackLink from nhsuk-react-components due to changes from nhs-frontend
  • Refactors AuthLink to remove redundant wrapping div
  • Adds new utils
    • truncate - truncates strings and replaces excess characters with ellipses
    • token-utils - for client side handling of jwt tokens, and add getIdTokenClaims function
  • Updates amplify-utils to
    • include idToken in getSessionServer
    • use the new token-utils where relevant
  • Creates new HeaderWithAccount component which
    • includes the logo/service name
    • displays the username and client name when logged in
    • includes the existing auth link
    • uses the new styling from nhs-frontend
    • displays navigation links for "Templates" (and "Message plans" when routing feature is true in features prop)
  • Refactor content to account for new header structure and add new content/links
  • Replace Header in ClientLayout with the new HeaderWithAccount
  • Adds new routing feature flag into ClientFeatures type (doesnt yet do anything)
  • Fixes test output error from MarkdownContent by removing the ID prop, replacing use of id in the tests with data-testid and adding conditional for empty items
  • Updates ContentRenderer to account for the above
  • Refactors Footer to remove redundant html containers and update to use latest classes etc from nhs-frontend

Context

Users need to see the name of the client displayed in the header so that they can see which client they are currently creating or updating resources for

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.

z.object({
proofing: z.boolean(),
// TODO: CCM-11148 Make routing required
routing: z.boolean().optional(),
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we want to make it required? won't that mean we have to organise a big unnecessary migration of all our existing clients?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was making an assumption purely on the basis that proofing was required, but we can absolutely leave it as optional if thats the preferred approach!

);

const givenName = faker.person.firstName();
const familyName = faker.person.lastName();
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the advantage of using faker here? don't we want deterministic tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we dont assert anything about the names in the accessibility tests so I dont think it matters, but I can remove if you want

/**
* User8 has a client with no client name set
*/
User8: {
Copy link
Contributor

Choose a reason for hiding this comment

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

i think i heard a conversation in the office yesterday about whether we could get better names for these users and clients to make the code clearer - can we start with this user? UserWithoutClientName?

alexnuttall
alexnuttall previously approved these changes Aug 20, 2025
@nicki-nhs nicki-nhs closed this Aug 29, 2025
@nicki-nhs nicki-nhs deleted the feature/CCM-10893-account-header branch August 29, 2025 09:22
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.

3 participants