Skip to content

Commit

Permalink
Merge pull request #3270 from alphagov/type-module-changes
Browse files Browse the repository at this point in the history
Use type=module for application.js
  • Loading branch information
AshGDS authored Aug 15, 2024
2 parents 42bb25a + b8917d6 commit 2cf4375
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ GEM
govuk_personalisation (0.16.0)
plek (>= 1.9.0)
rails (>= 6, < 8)
govuk_publishing_components (41.1.1)
govuk_publishing_components (42.0.0)
govuk_app_config
govuk_personalisation (>= 0.7.0)
kramdown
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/components/_published-dates.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.app-c-published-dates__toggle {
display: none;

.js-enabled & {
.govuk-frontend-supported & {
display: inline-block;
}
}
Expand Down Expand Up @@ -41,7 +41,7 @@
border-top: 1px solid $govuk-border-colour;
}

.js-enabled .app-c-published-dates .js-hidden {
.govuk-frontend-supported .app-c-published-dates .js-hidden {
display: none;
visibility: hidden;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.js-enabled .sticky-element {
.govuk-frontend-supported .sticky-element {
position: absolute;
bottom: 0;

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/views/_service_manual_guide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@import "../modules/sticky";
@import "../modules/typography";

.js-enabled {
.govuk-frontend-supported {
.app-change-history__past {
&.govuk-list {
// stylelint-disable-next-line max-nesting-depth
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/views/_worldwide-organisation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
margin-bottom: govuk-spacing(3);
}

.js-enabled {
.govuk-frontend-supported {
.worldwide-organisation-header {
.show-other-content {
all: inherit;
Expand Down
2 changes: 1 addition & 1 deletion app/views/development/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>
<body>
<div id="wrapper">
<main class="govspeak">
<main class="govspeak" id="content">
<%= render 'govuk_publishing_components/components/title', title: 'government-frontend' %>

<% html = capture do %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<% end %>

<%= stylesheet_link_tag "application", :media => "all", integrity: false %>
<%= javascript_include_tag "application", integrity: false %>
<%= javascript_include_tag "application", integrity: false, type: "module" %>
<%= javascript_include_tag 'es6-components', type: "module" %>
<%= csrf_meta_tags %>
<%= render 'govuk_publishing_components/components/meta_tags', content_item: @content_item.content_item %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_webchat.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
</span>
</p>
<% # This is inline in the source however slimmer will optimize this. %>
<%= javascript_include_tag "webchat", integrity: false %>
<%= javascript_include_tag "webchat", integrity: false, type: "module" %>

0 comments on commit 2cf4375

Please sign in to comment.