Skip to content

Commit

Permalink
Merge pull request #4273 from alphagov/remove-modernizr
Browse files Browse the repository at this point in the history
Remove Modernizr
  • Loading branch information
jon-kirwan authored Oct 3, 2024
2 parents 983d83b + 6ef0ea1 commit 659e2c4
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

## Unreleased

* **BREAKING:** Remove Modernizr ([PR #4273](https://github.com/alphagov/govuk_publishing_components/pull/4273))
* Update accessibility criteria in component docs ([PR #4242](https://github.com/alphagov/govuk_publishing_components/pull/4242))
* Show all big_number symbol types in our docs ([PR #4271](https://github.com/alphagov/govuk_publishing_components/pull/4271))
* Remove incorrect search component example ([PR #4253](https://github.com/alphagov/govuk_publishing_components/pull/4253))
Expand Down
1 change: 0 additions & 1 deletion app/assets/config/govuk_publishing_components_manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
//= link_directory ../javascripts/govuk_publishing_components

// Pre-compile these specific files
//= link govuk_publishing_components/vendor/modernizr.js
//= link govuk_publishing_components/vendor/lux/lux-reporter.js
//= link govuk_publishing_components/vendor/lux/lux-measurer.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<%= csrf_meta_tags %>
<%= favicon_link_tag "govuk_publishing_components/favicon-#{environment}.png" %>
<%= stylesheet_link_tag css_filename, media: "all" %>
<%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
<% if GovukPublishingComponents::Config.use_es6_components %>
<%= javascript_include_tag js_module_filename, type: "module" %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
<%= stylesheet_link_tag "component_guide/application", media: "all" %>
<%= yield :application_stylesheet %>
<%= render_component_stylesheets %>
<%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
<%= yield :extra_headers %>
</head>
<body class="gem-c-layout-for-admin govuk-template__body <%= 'hide-header-and-footer' if @preview %>">
Expand Down
3 changes: 0 additions & 3 deletions spec/components/layout_for_admin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def component_name
end

it "can receive a custom js filename" do
allow_any_instance_of(ActionView::Base).to receive(:javascript_include_tag).with("govuk_publishing_components/vendor/modernizr")
expect_any_instance_of(ActionView::Base).to receive(:javascript_include_tag).with("admin").once

render_component(
Expand All @@ -36,7 +35,6 @@ def component_name
end

it "can receive a custom js filename for es6 " do
allow_any_instance_of(ActionView::Base).to receive(:javascript_include_tag).with("govuk_publishing_components/vendor/modernizr")
allow_any_instance_of(ActionView::Base).to receive(:javascript_include_tag).with("application")
expect_any_instance_of(ActionView::Base).to receive(:javascript_include_tag).with("es6-bundle", { type: "module" }).once

Expand All @@ -48,7 +46,6 @@ def component_name
end

it "can use the default filename for es6 components" do
allow_any_instance_of(ActionView::Base).to receive(:javascript_include_tag).with("govuk_publishing_components/vendor/modernizr")
allow_any_instance_of(ActionView::Base).to receive(:javascript_include_tag).with("application")
expect_any_instance_of(ActionView::Base).to receive(:javascript_include_tag).with("es6-components", { type: "module" }).once

Expand Down

0 comments on commit 659e2c4

Please sign in to comment.