-
Notifications
You must be signed in to change notification settings - Fork 350
Make Page template options besides header and footer follow conventions #6538
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
Conversation
📋 StatsNo changes to any distributed file sizes! Action run for c6be984 |
6a83be7 to
aa7d107
Compare
querkmachine
left a comment
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.
Some minor formatting fixes but otherwise looks good to me
| }) | ||
|
|
||
| it('can have content injected before it using the beforeContent block', () => { | ||
| it('can be overridden using the main block', () => { |
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.
| it('can be overridden using the main block', () => { | |
| it('can be overridden using the `main` block', () => { |
Adding backticks around the block name for consistency with the other tests.
CHANGELOG.md
Outdated
| #### Use the `container` block instead of the `main` block to replace the width container | ||
|
|
||
| We've reduced the scope of the `main` block to only replace the `<main>` element, | ||
| rather than the whole `<div class="govuk-width-container"> element. |
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.
| rather than the whole `<div class="govuk-width-container"> element. | |
| rather than the whole `<div class="govuk-width-container">` element. |
Missing a backtick here
…ner">` element It'll replace the `main` block whose scope will be restricted to overriding the `<main>` element.
The `main` name doesn't represent what the block was actually changing (the `<div class="govuk-width-container">`), so there should be less surprises for users now it overrides only `main`.
This aligns with the `<ELEMENT_NAME>Start` convention. The legacy `beforeContent` block can still be used but when both are present the new `containerStart` block takes precedence.
Add content at the end of the `<div class="govuk-width-container">` element, allowing for example to close tags opened in the `containerStart` blocks.
For consistency with the other elements of the page template
Follows the convention that blocks replacing the components have the same name as the macro for the component.
Follow our upgrade guide for the breaking change
Follow our recommended changes
Follow our recommended changes
aa7d107 to
c6be984
Compare
Updates the blocks and variables not related to the
headerandfooterso they follow the same conventions, with the relevant associated tests.containerblock wrapping the<div class="govuk-width-container">element to replace the currentmainblock<main>tagbeforeContentblock in favour of acontainerStartblock for adding content at the start of the<div class="govuk-width-container">elementcontainerEndblock for adding content at the end of the<div class="govuk-width-container">elementcontainerAttributesvariable to add attributes to the<div class="govuk-width-container">elementmainAttributesvariable to add attributes to the<main>elementskipLinkblock in favour of agovukSkipLinkblockCloses #6535.