Skip to content
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

Use govuk-frontend v5 #3855

Closed
wants to merge 9 commits into from
Closed

Commits on Mar 25, 2024

  1. Configuration menu
    Copy the full SHA
    9fcd6c6 View commit details
    Browse the repository at this point in the history
  2. Use Terser instead of Uglifier

    govuk_publishing_components has govuk-frontend as a dependency.
    govuk-frontend v5 now targets browsers that support ES6. This means that
    the UMD modules used in govuk_publsihing_components from govuk-frontend
    use features of ES6 and so it means that Uglifier can't be used anymore
    because it only supports ES5.
    
    As well as installing terser and updating the config, this commit also
    contains a patch for getting terser working. Sprockets doesn't have
    an built-in loader for terser so we need to add this functionality.
    patrickpatrickpatrick authored and jon-kirwan committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    a8ed809 View commit details
    Browse the repository at this point in the history
  3. Move Javascript modules to es6-components

    To prevent browsers evaluating JS that isn't supported, components that
    contain code from govuk-frontend have been moved to a separate file
    `es6-components.js` which is included in `application.html.erb` as a
    script tag with `type="module"`.
    patrickpatrickpatrick authored and jon-kirwan committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    0e74baf View commit details
    Browse the repository at this point in the history
  4. Change initialisation method to new method

    In govuk-frontend v5, the `init` function is now called when a module is
    created. This meant changing how the `initAll()` function works in
    govuk_publishing_components so that it does not call `init()` when
    initialising components JavaScript. It also meant moving `init`
    functions in components to the constructor to bring them in line with
    the new way of initialising.
    patrickpatrickpatrick authored and jon-kirwan committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    9321840 View commit details
    Browse the repository at this point in the history
  5. Remove deprecated scss variables

    - Remove $legacy attribute in govuk-colour
    - Remove $govuk-compatibility-govuktemplate
    - Remove $govuk-new-link-styles
    jon-kirwan committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    4e930eb View commit details
    Browse the repository at this point in the history
  6. Update application.js

    jon-kirwan committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    f1677e6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    430e63f View commit details
    Browse the repository at this point in the history
  8. Update startup.sh

    jon-kirwan committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    9c45f15 View commit details
    Browse the repository at this point in the history
  9. bundle branch

    jon-kirwan committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    56d1bf5 View commit details
    Browse the repository at this point in the history