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

Update README and CHANGELOG for ES module bundle #3950

Merged
merged 4 commits into from
Jul 12, 2023
Merged

Conversation

colinrotherham
Copy link
Contributor

This PR changes our documentation to use the ES module govuk-frontend.min.js bundle:

  1. Update the README "Importing JavaScript" documentation
  2. Update CHANGELOG with breaking change to swap all.js with ES modules

The previous default all.js became all.bundle.js in f8335d9 as part of:

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3950 July 11, 2023 17:00 Inactive
@@ -46,21 +46,24 @@ To import add the below to your Sass file:

Some of the JavaScript included in GOV.UK Frontend improves the usability and
accessibility of the components. You should make sure that you are importing and
initialising Javascript in your application to ensure that all users can use it successfully.
initialising JavaScript in your application to ensure that all users can use it successfully.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
initialising JavaScript in your application to ensure that all users can use it successfully.
initialising JavaScript in your application. This will ensure all users can use it successfully.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just 1 minor change suggestion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @claireashworth, all sorted

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3950 July 12, 2023 12:34 Inactive
@colinrotherham
Copy link
Contributor Author

Mind if I request a review from @36degrees @romaricpascal @domoscargin?

Since we link to the advanced options I've assumed the default ES module bundle was enough

[More details on importing JavaScript and advanced options](https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#javascript)

But do we need to specifically need to add:

  1. Action for window.GOVUKFrontend users to now use UMD all.js all.bundle.js
  2. Action for Rails Asset Pipeline users to change UMD *.js to *.bundle.js

@domoscargin
Copy link
Contributor

domoscargin commented Jul 12, 2023

Mind if I request a review from @36degrees @romaricpascal @domoscargin?

Since we link to the advanced options I've assumed the default ES module bundle was enough

[More details on importing JavaScript and advanced options](https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#javascript)

But do we need to specifically need to add:

  1. Action for window.GOVUKFrontend users to now use UMD all.js all.bundle.js
  2. Action for Rails Asset Pipeline users to change UMD *.js to *.bundle.js

I think it's OK to just include instructions for the default way we want folks to to use, but maybe we could highlight the advanced options more, like:

If you currently import the JavaScript in a different way, you may need to make some changes. See more details on importing JavaScript.

(but with better words 🤣 )

@colinrotherham
Copy link
Contributor Author

Ha, thanks. Any thoughts @claireashworth?

@claireashworth
Copy link
Contributor

Yup, highlighting where they can find more detailed info is better than too much information front loading. A slight tweak to wording could be:

If you import JavaScript using a different method, you might need to make some changes. Refer to the detailed guidance on importing JavaScript.

@colinrotherham
Copy link
Contributor Author

Thanks @claireashworth. Mind if I widen that link text to include "detailed guidance on"?

If you import JavaScript using a different method, you might need to make some changes. Refer to the detailed guidance on importing JavaScript.

Pushed it up

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3950 July 12, 2023 14:46 Inactive
Copy link
Contributor

@domoscargin domoscargin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants