Move cookieBanner to follow Design System guidance#125
Open
colinrotherham wants to merge 1 commit intoHMPO:masterfrom
Open
Move cookieBanner to follow Design System guidance#125colinrotherham wants to merge 1 commit intoHMPO:masterfrom
cookieBanner to follow Design System guidance#125colinrotherham wants to merge 1 commit intoHMPO:masterfrom
Conversation
Follows the guidance to position “before the ’skip to main content‘ link” https://design-system.service.gov.uk/components/cookie-banner/#how-it-works
cookieBanner block to bodyStart to follow Design System guidancecookieBanner to follow Design System guidance
Author
|
Appreciate that, without adding {% block bodyStart %}
{{ super() }}
{% endblock %} |
Contributor
|
Yes, I think that is fine - it would be good to get a good idea of how the blocks are being used by projects. It could be released as a major/breaking release - but if the blocks are being used correctly it shouldn't be breaking and should be released as a minor/non-breaking |
Author
|
That's great thanks Could take you a while to determine, but here's (essentially) how we set up our base.njk template: {% extends "hmpo-template.njk" %}
{% from "govuk/components/cookie-banner/macro.njk" import govukCookieBanner %}
{% from "govuk/components/header/macro.njk" import govukHeader %}
{% block cookieBanner %}
{{ govukCookieBanner() }}
{% endblock %}
{% block govukHeader %}
{{ govukHeader() }}
{% endblock %}All pages (non form-wizard) extend from this one so won't be a breaking change for us 😊 |
307e703 to
6403fcc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Afternoon 👋
Hope this PR is useful!
A service I'm working on has recently been flagged for inserting the Skip link component before the Cookie banner. Until today, we hadn't realised the Design System guidance says to use the
bodyStartblock not theheaderblock.Problem is, we're extending hmpo-template.njk and using the
cookieBannerblock to insert the govukCookieBanner component (versus hmpoCookieBanner) BUT it uses theheaderblock.Here's the guidance we were shown. Makes sense!
Thanks again for the fab work