-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header breaking changes nunjucks params #1109
base: header-breaking-changes
Are you sure you want to change the base?
Header breaking changes nunjucks params #1109
Conversation
Perhaps you could outline what the expected params would be for the following headers:
And in all cases ‘logo’ would be either the NHS logo, or an organisation logo. Might we want to add/update the examples to include these different variants? (Might want to do this anyway to test that the suggested CSS changes work across these different scenarios, too). |
Perhaps in a separate PR we can also rename |
@paulrobertlloyd here’s how that would look at the moment. There’s not currently (either in the current release or the work-in-progres) possible to not have either the NHS logo or the service name be a link, as they both default to
I think most variations are already included, but we could add a few more. |
@paulrobertlloyd I don’t mind |
@@ -1,13 +1,18 @@ | |||
{% set html_style = 'background-color: #f0f4f5;' %} | |||
{% set title = 'Header with service name' %} | |||
{% set title = 'Header transactional with service name' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given we've removed 'transactional' everywhere else, I wonder whether this should be renamed?
So that this one is titled 'header with service name' and the other, with combined link is 'Header with a service name combined with NHS logo', as you've named them.
Thanks for this @frankieroberto. I can be tempted either way on On the defaulting of the logo to be linked: currently you'd have to customise the header to make the logo/name have no link right? (as is done on NHS Login). Not sure whether there are other examples (pages that act like dialogs, e.g. confirm delete)? So, maybe it would be helpful to not force a link. Interested in any other thinking on it though. |
👍
An option for no-link on either the NHS logo or the service name could be useful - and probably better to avoid teams having to do custom HTML to do this (which is harder to maintain). To enable this we could just remove the default |
This updates the params for the Header nunjucks component to no longer differentiate between 'transactional' and non-transactional services, and instead use the same Nunjucks params for both.
A separate additional option has been added for the logo param:
includeWithServiceLink: true
- this would enable the behaviour of combining the logo and the service name as a single link (matching the current non-transactional service name option). We’d create some separate guidance on when to use this option, although it will likely be context-dependent and up to teams to decide when to do this based on their research.Finally, there’s also some smaller changes to the nunjucks params to make them more consistent and logical, such as changing
homeHref
tologo.href
,service.name
toservice.text
andorganisation.logoURL
tologo.src
.Full list of Nunjucks changes
transactionalService.name
service.text
transactionalService.href
service.href
service.name
service.text
and optionallylogo.includeWithServiceLink: true
organisation.logoURL
logo.src
homeHref
logo.href
Remaining questions
logo.href
andservice.href
default to/
if not specified. Should we keep this, or is it better to not link at all if not specified?service.html
if you needed to add some<span>
s or something? (No known use case so far)organisation
- egorganisation.split
. Should we change those too, or leave as-is?Checklist