-
Notifications
You must be signed in to change notification settings - Fork 38
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
Upgrade to use govuk-frontend v5 #363
Draft
kr8n3r
wants to merge
10
commits into
main
Choose a base branch
from
use-govuk-frontend-v5
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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
kr8n3r
force-pushed
the
use-govuk-frontend-v5
branch
9 times, most recently
from
September 18, 2024 14:21
beb3201
to
99b78ce
Compare
kr8n3r
force-pushed
the
use-govuk-frontend-v5
branch
5 times, most recently
from
September 19, 2024 19:28
5438472
to
7d90d38
Compare
we're no longer targeting any IE prior to 11, so removing this out, see: https://github.com/alphagov/govuk-frontend/blob/main/CHANGELOG.md#500-breaking-release
Import using "all" has been deprecated https://github.com/alphagov/govuk-frontend/releases#:~:text=Importing%20layers%20using%20all%20files
kr8n3r
force-pushed
the
use-govuk-frontend-v5
branch
from
September 19, 2024 20:28
7d90d38
to
a13ef72
Compare
govuk-frontend As govuk-frontend encourages its use within script type=module, we need to create a separate entry for it as we do not want any downstrema project to change the way they write their own javascript. This PR - adds a new zgovuk_frontend.js` include to core layout - removes `all.js` import from `govuk_tech_docs.js` - creates a new `govuk_frontend_all.js` entry in the lib that imports `all.bundle.js` from the NPM package - adds a new `govuk_frontend.js` entry point in the example project that pulls in the `govuk_frontend_all.js` from the lib - adds new minifier - https://github.com/ahorek/terser-ruby as the built-in one doesn't support ES6
To do: see if we can configure to silence warning Built-in sassc compiler doesn't compile stylesheet do to them, containing source maps https://github.com/sass-contrib/sassc-embedded-shim-ruby
No longer needed with the upgrade to v5
- update to the new crown svg https://github.com/alphagov/govuk-frontend/releases#:~:text=If%20you%E2%80%99re%20not%20using%20the%20Nunjucks%20macro%2C%20locate%20the%20SVG%20code%20for%20the%20existing%20logo%20and%20replace%20it%20with%20this%20updated%20SVG. - remove redundant markup https://github.com/alphagov/govuk-frontend/releases?page=2#:~:text=Update%20the%20GOV.UK%20logo
kr8n3r
force-pushed
the
use-govuk-frontend-v5
branch
from
September 19, 2024 20:45
e3e52a7
to
8d407e8
Compare
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.
TODO
What’s changed
govuk_frontend_all
entry point that importsall.bundle
from govuk-frontendIdentifying a user need
These changes serve two purposes:
How to review / test
See individual commits for more detail
Test in a downstream project:
govuk_frontend.js
file in project’ssource/assets/javascripts directory
//= require govuk_frontend_all
into itbundle install
run bundle exec middleman server
orbuild