-
Notifications
You must be signed in to change notification settings - Fork 237
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
Update to GOV.UK Frontend #512
Conversation
GOV.UK Frontend requires 3 and above
647fca4
to
c25335b
Compare
.unbranded { | ||
background: $white; | ||
// Remove canvas background colour, as is used with the GOV.UK Footer. | ||
$govuk-canvas-background-colour: $govuk-body-background-colour; |
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.
no need for this as we're not including the footer
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.
If we don't do this we get a grey box at the bottom of the screen, since the <body>
does not extend the same length as <html>
server.js
Outdated
@@ -190,6 +205,7 @@ app.get('/prototype-admin/download-latest', function (req, res) { | |||
if (useDocumentation) { | |||
// Copy app locals to documentation app locals | |||
documentationApp.locals = app.locals | |||
documentationApp.locals.serviceName = 'Prototype Kit' |
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.
this needs to be changed to how we've amended it in beta
documentationApp.locals = Object.assign({}, app.locals)
documentationApp.locals.serviceName = 'Prototype Kit'
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.
dunno if its github being weird, but the line looks how you suggested already?
documentationApp.locals = Object.assign({}, app.locals)
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.
ah it's because you commented on line 199 instead of 198 :)
c25335b
to
4f6df40
Compare
package.json
Outdated
@@ -21,6 +21,7 @@ | |||
"express": "4.15.2", | |||
"express-session": "^1.13.0", | |||
"express-writer": "0.0.4", | |||
"govuk-frontend": "0.0.32", |
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.
should this be 1.0.0
?
.gitignore
Outdated
@@ -5,7 +5,6 @@ | |||
.port.tmp | |||
public | |||
lib/govuk_template.html | |||
govuk_modules |
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.
good catch! This isn't in the beta work
Since we require directly from 'node_modules' we don't need to copy to a 'govuk_module' folder.
4f6df40
to
5f3a671
Compare
@@ -1,22 +0,0 @@ | |||
@import "_colours"; |
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.
another good catch! This file has been hanging around for ages
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.
Great cleanup! 💯
Missing the following:
Update: the missing PRs will be added afterwards, I'm going to approve this.
|
||
<div class="govuk-box-highlight"> | ||
<h1 class="heading-xlarge"> | ||
<h1 class="govuk-heading-xl"> |
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.
This page should use the panel component.
docs/documentation/writing-css.md
Outdated
@@ -18,23 +18,12 @@ Every time a change happens in [application.scss](../app/assets/sass/application | |||
|
|||
Try starting the app and adding some styles to `application.scss`. If you open `application.css` you should now see the compiled version of those styles. | |||
|
|||
## Using the govuk_frontend_toolkit | |||
## Using the GOV.UK Frontend |
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.
delete 'the'
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.
to be honest its probably best to remove this section, it's not very useful and tells people to do something thats not very clear, or we already do for them?
docs/documentation/writing-css.md
Outdated
|
||
Note that the convention is to start the name of any partial with an underscore, like those in the toolkit. | ||
Note that the convention is to start the name of any partial with an underscore, like those in the GOV.UK Frontend. |
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.
like those in the GOV.UK Frontend
docs/documentation/writing-css.md
Outdated
@include bold-48; | ||
|
||
The line `@import '_typography';` makes all the code in [_typography.scss](https://github.com/alphagov/govuk_frontend_toolkit/blob/master/stylesheets/_typography.scss) available. The `h1` can therefore be styled in the 48pt bold form of the font by using `@include bold-48;` to call the `bold-48` mixin. | ||
You can use the Sass libraries in the [govuk-frontend](https://github.com/alphagov/govuk-frontend) by importing the files from there directly into `application.scss`. |
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.
in the govuk-frontend
app/views/index.html
Outdated
<ul class="govuk-list govuk-list--bullet"> | ||
<li><a href="/docs/tutorials-and-examples">Example pages and documentation</a></li> | ||
<li> | ||
<a href="https://govuk-design-system-production.cloudapps.digital"> |
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.
<p class="text"> | ||
<a href="https://govuk-elements.herokuapp.com/">GOV.UK Elements</a> is a guide to making your prototype look like a GOV.UK | ||
<p> | ||
<a href="https://govuk-design-system-production.cloudapps.digital">GOV.UK Design System</a> is a guide to making your prototype look like a GOV.UK |
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.
@@ -42,26 +42,23 @@ <h2 class="govuk-heading-l">Our cookie message</h2> | |||
|
|||
<p>You will see a message about cookies when you first visit the GOV.UK Prototype Kit. We’ll store a cookie so that your computer knows you’ve seen it and knows not to show it again.</p> |
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.
does this fix a problem with tables? Or just move it to using a macro?
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.
Just moving everything to use macros.
</ul> | ||
--> | ||
</nav> | ||
Import the header component macro place it in the `{% block header %}`and provide `navigation` items as shown below. |
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.
does this work fix something or just move it to macros? If its just about macros can we skip this commit, as we're not ready to push macros in prototyping
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.
This is how you override the header contents now.
The new template gives us this for free
0bfcfc9
to
06a7e28
Compare
Sorry I meant small changes plus reverting macros, not that that was small, I wasn't very clear. |
Wondering if the Cookie banner work would be better as a separate PR? Is it part of 'Update to govuk frontend'? UPDATE We decided to keep it, as Cookie banner used to be in the old stack, and needs replacing in a move to Frontend, as it doesnt exist there. |
Avoid using JavaScript by using server side cookie setting. JavaScript is only necessary for www.GOV.UK since it can't easily set cookies.
06a7e28
to
4fd81b0
Compare
@joelanman yeah, I think it makes sense since otherwise this PR would break cookie support. |
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.
Looks good, thanks!
This is an attempt to do a cleaner merge of the changes from the https://github.com/alphagov/govuk-prototype-kit-private-beta.
Includes:
If you want to review all changes without whitespace: https://github.com/alphagov/govuk_prototype_kit/pull/512/files?w=1
The other parts that are missing are being tracked with this milestone: https://github.com/alphagov/govuk_prototype_kit/milestone/1
https://trello.com/c/SrxrezjZ/1061-add-govuk-frontend-to-the-govuk-prototype-kit