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 type=module for application.js #3409

Merged
merged 6 commits into from
Aug 15, 2024
Merged

Use type=module for application.js #3409

merged 6 commits into from
Aug 15, 2024

Conversation

AshGDS
Copy link
Contributor

@AshGDS AshGDS commented Jul 17, 2024

What / Why

  • Use type=module for this application's JS file
  • To coincide with Drop support for legacy browsers govuk_publishing_components#4111
  • Has [DO NOT MERGE] as we want the above PR live on static first before this is merged.
  • We will combine es6-components.js again as a separate task unless you disagree with this
  • To accurately test this you will need to use local static that is using a local version the govuk_publishing_components branch linked above. If you test without, this app's application.js seems to crash.
  • The tests are passing locally with the type=module branch of the gem, so the PR failing is likely due to the deployed version of the gem currently not having type=module as well.
  • Trello card: https://trello.com/c/Hoa45SMD/141-turn-off-javascript-in-legacy-browsers

@govuk-ci govuk-ci temporarily deployed to finder-frontend-pr-3409 July 17, 2024 10:31 Inactive
@AshGDS AshGDS changed the title Type module changes [DO NOT MERGE] Use type=module for application.js Jul 23, 2024
@AshGDS AshGDS added the do-not-merge Indicates that a PR should not be merged into master / release branches label Jul 23, 2024
@AshGDS AshGDS marked this pull request as ready for review July 24, 2024 09:33
@AshGDS AshGDS requested a review from MartinJJones July 24, 2024 09:34
Copy link
Contributor

@MartinJJones MartinJJones left a comment

Choose a reason for hiding this comment

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

The code changes look to me.

The failing tests will likely be caused by the JS error relating to the closest polyfill, further info here - alphagov/smart-answers#6846 (review)

I'm happy to give this another look when the new version of the gem is released and included in this PR

app/views/development/index.html.erb Outdated Show resolved Hide resolved
@govuk-ci govuk-ci temporarily deployed to finder-frontend-pr-3409 July 26, 2024 15:09 Inactive
@govuk-ci govuk-ci temporarily deployed to finder-frontend-pr-3409 August 12, 2024 10:33 Inactive
@govuk-ci govuk-ci had a problem deploying to finder-frontend-pr-3409 August 15, 2024 15:04 Failure
@govuk-ci govuk-ci temporarily deployed to finder-frontend-pr-3409 August 15, 2024 16:02 Inactive
@AshGDS AshGDS changed the title [DO NOT MERGE] Use type=module for application.js Use type=module for application.js Aug 15, 2024
@AshGDS AshGDS removed the do-not-merge Indicates that a PR should not be merged into master / release branches label Aug 15, 2024
@AshGDS AshGDS merged commit 47146d8 into main Aug 15, 2024
13 checks passed
@AshGDS AshGDS deleted the type-module-changes branch August 15, 2024 16:16
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.

3 participants