-
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
Move shared layout template includes to lib folder #1499
Closed
Closed
Conversation
This file contains 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
govuk-design-system-ci
temporarily deployed
to
govuk-protot-ldeb-move--phveyw
August 3, 2022 08:24
Inactive
lfdebrux
force-pushed
the
ldeb-move-includes-to-lib
branch
from
August 3, 2022 08:30
710979d
to
1a11a97
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-protot-ldeb-move--phveyw
August 3, 2022 08:30
Inactive
lfdebrux
force-pushed
the
ldeb-move-includes-to-lib
branch
from
August 3, 2022 08:39
1a11a97
to
e70f8a9
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-protot-ldeb-move--phveyw
August 3, 2022 08:40
Inactive
lfdebrux
force-pushed
the
ldeb-move-js-to-lib
branch
from
August 3, 2022 08:57
f88485e
to
5e94bc7
Compare
lfdebrux
force-pushed
the
ldeb-move-includes-to-lib
branch
from
August 3, 2022 09:34
e70f8a9
to
c5ba6cb
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-protot-ldeb-move--phveyw
August 3, 2022 09:34
Inactive
When running the kit as a package the lib folder will be in packageDir, not projectDir.
govuk-design-system-ci
temporarily deployed
to
govuk-protot-ldeb-move--phveyw
August 3, 2022 10:09
Inactive
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.
LGTM
BenSurgisonGDS
approved these changes
Aug 10, 2022
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.
LGTM
Closing in favour of #1517 |
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.
What
Move the contents of the app layout template includes that we would expect to be the same in every kit installation into the lib folder.
Why
Since the last release we have made a number of changes to the template partials in
app/views/includes
: in PR #1434 we removed the IE8 stylesheets; in PR #1478 we removed the jQuery script; and in PR #1481 we moved the common JavaScript into the lib folder and added a new script.This file is in the user's space, but it would be nice if users didn't have to update it themselves. Moving the standard code out will also mean less is needed to bootstrap a prototype using a package.
This PR moves the standard lines in the template partials to new template partials in the lib folder, and replaces them with a placeholder comment illustrating how the user can customise their prototype if they wish.
We make sure that the lines in the kit templates are included first by inverting the control; by moving the lib folder first in the order of places to look for templates when the Nunjucks environment is configured we make sure that the files in the lib folder will be preferred, and then we include any app templates from the lib files.
This is similar to the method used in #1385 and #1481.