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 #6616

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Commits on May 20, 2024

  1. 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 MartinJJones committed May 20, 2024
    Configuration menu
    Copy the full SHA
    8ea0309 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0efaf11 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 MartinJJones committed May 20, 2024
    Configuration menu
    Copy the full SHA
    5943fe9 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 MartinJJones committed May 20, 2024
    Configuration menu
    Copy the full SHA
    0df3336 View commit details
    Browse the repository at this point in the history
  5. Remove deprecated CSS variables

    - Remove $govuk-compatibility-govuktemplate
    - Remove $govuk-use-legacy-palette
    - Remove $govuk-new-link-styles
    patrickpatrickpatrick authored and MartinJJones committed May 20, 2024
    Configuration menu
    Copy the full SHA
    19d7e66 View commit details
    Browse the repository at this point in the history
  6. use test gem

    jon-kirwan authored and MartinJJones committed May 20, 2024
    Configuration menu
    Copy the full SHA
    1792d89 View commit details
    Browse the repository at this point in the history
  7. Update visualise.scss

    jon-kirwan authored and MartinJJones committed May 20, 2024
    Configuration menu
    Copy the full SHA
    c38ee1c View commit details
    Browse the repository at this point in the history
  8. Update startup.sh

    jon-kirwan authored and MartinJJones committed May 20, 2024
    Configuration menu
    Copy the full SHA
    4460f66 View commit details
    Browse the repository at this point in the history
  9. Bundle new slimmer to fix test issue

    Revert "Bundle new slimmer to fix test issue"
    
    This reverts commit 6c11816.
    
    Reapply "Bundle new slimmer to fix test issue"
    
    This reverts commit 1cabef0.
    jon-kirwan authored and MartinJJones committed May 20, 2024
    Configuration menu
    Copy the full SHA
    94091e5 View commit details
    Browse the repository at this point in the history