diff --git a/.gitignore b/.gitignore index 73ada7f4c7d..efcb4365403 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ .generators *.pyc *.rbc -*.sassc **.orig .bundle .byebug_history diff --git a/Gemfile b/Gemfile index 9cbb44f0a69..a4e3b0438af 100644 --- a/Gemfile +++ b/Gemfile @@ -44,6 +44,7 @@ gem 'pg' gem 'phonelib' gem 'premailer-rails', '>= 1.12.0' gem 'profanity_filter' +gem 'propshaft' gem 'rack', '>= 2.2.3.1' gem 'rack-attack', '>= 6.2.1' gem 'rack-cors', '>= 1.0.5', require: 'rack/cors' @@ -61,7 +62,6 @@ gem 'safe_target_blank', '>= 1.0.2' gem 'saml_idp', github: '18F/saml_idp', tag: '0.18.2-18f' gem 'scrypt' gem 'simple_form', '>= 5.0.2' -gem 'sprockets-rails' gem 'stringex', require: false gem 'strong_migrations', '>= 0.4.2' gem 'subprocess', require: false @@ -85,6 +85,7 @@ group :development do gem 'guard-rspec', require: false gem 'irb' gem 'letter_opener', '~> 1.8' + gem 'listen' gem 'octokit', '>= 4.25.0' gem 'rack-mini-profiler', '>= 1.1.3', require: false gem 'rails-erd', '>= 1.6.0' diff --git a/Gemfile.lock b/Gemfile.lock index ca2dafb71fd..36f61680e8d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -451,6 +451,11 @@ GEM net-smtp premailer (~> 1.7, >= 1.7.9) profanity_filter (0.1.1) + propshaft (0.7.0) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + railties (>= 7.0.0) pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) @@ -635,13 +640,6 @@ GEM simpleidn (0.2.1) unf (~> 0.1.4) smart_properties (1.17.0) - sprockets (4.0.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - sprockets (>= 3.0.0) stringex (2.8.5) strong_migrations (0.8.0) activerecord (>= 5.2) @@ -766,6 +764,7 @@ DEPENDENCIES jwt knapsack letter_opener (~> 1.8) + listen lograge (>= 0.11.2) lookbook (~> 1.5.3) lru_redux @@ -781,6 +780,7 @@ DEPENDENCIES phonelib premailer-rails (>= 1.12.0) profanity_filter + propshaft pry-byebug pry-doc pry-rails @@ -819,7 +819,6 @@ DEPENDENCIES simplecov (~> 0.21.0) simplecov-cobertura simplecov_json_formatter - sprockets-rails stringex strong_migrations (>= 0.4.2) subprocess diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js deleted file mode 100644 index 6b147d7d533..00000000000 --- a/app/assets/config/manifest.js +++ /dev/null @@ -1,10 +0,0 @@ -//= link_tree ../images -//= link_tree ../fonts - -//= link intl-tel-input/build/css/intlTelInput.css -//= link intl-tel-input/build/img/flags.png -//= link intl-tel-input/build/img/flags@2x.png - -//= link_tree ../../../node_modules/@18f/identity-design-system/dist/assets/img -//= link_tree ../../../node_modules/@18f/identity-design-system/dist/assets/fonts -//= link_tree ../builds diff --git a/app/assets/stylesheets/_uswds-core.scss b/app/assets/stylesheets/_uswds-core.scss index 1a1be05c817..656649b41b0 100644 --- a/app/assets/stylesheets/_uswds-core.scss +++ b/app/assets/stylesheets/_uswds-core.scss @@ -4,8 +4,8 @@ $render-font-face: false !default; @forward '@18f/identity-design-system/packages/uswds-core' with ( $theme-body-font-size: 'sm', - $theme-font-path: '.', - $theme-image-path: '@18f/identity-design-system/dist/assets/img', + $theme-font-path: '', + $theme-image-path: '', $theme-global-border-box-sizing: true, $theme-global-link-styles: true, $theme-grid-container-max-width: 'tablet-lg', diff --git a/app/assets/stylesheets/components/_alert.scss b/app/assets/stylesheets/components/_alert.scss index 506cafceb76..fc35acaffb5 100644 --- a/app/assets/stylesheets/components/_alert.scss +++ b/app/assets/stylesheets/components/_alert.scss @@ -6,7 +6,7 @@ font-weight: bold; &::before { - background-image: url('alert/info-white.svg'); + background-image: url('/alert/info-white.svg'); } } diff --git a/app/assets/stylesheets/components/_icon.scss b/app/assets/stylesheets/components/_icon.scss index 05b22f6a71d..708d8447270 100644 --- a/app/assets/stylesheets/components/_icon.scss +++ b/app/assets/stylesheets/components/_icon.scss @@ -28,7 +28,7 @@ $icon-min-padding: 2px; &-success { &::before { - background-image: url('alert/success.svg'); + background-image: url('/alert/success.svg'); content: ''; display: block; height: $h4; diff --git a/app/assets/stylesheets/components/_language-picker.scss b/app/assets/stylesheets/components/_language-picker.scss index e6d14f6823b..5910f030e92 100644 --- a/app/assets/stylesheets/components/_language-picker.scss +++ b/app/assets/stylesheets/components/_language-picker.scss @@ -66,10 +66,10 @@ } &::after { - background-image: url(@18f/identity-design-system/dist/assets/img/angle-arrow-up.svg); + background-image: url('/angle-arrow-up.svg'); @include at-media('tablet') { - background-image: url(@18f/identity-design-system/dist/assets/img/angle-arrow-up-white.svg); + background-image: url('/angle-arrow-up-white.svg'); } } } @@ -79,7 +79,7 @@ color: color('white'); &::after { - background-image: url(@18f/identity-design-system/dist/assets/img/angle-arrow-down-white.svg); + background-image: url('/angle-arrow-down-white.svg'); } } } diff --git a/app/assets/stylesheets/components/_list.scss b/app/assets/stylesheets/components/_list.scss index 5be58d778d2..389920d1e7b 100644 --- a/app/assets/stylesheets/components/_list.scss +++ b/app/assets/stylesheets/components/_list.scss @@ -3,7 +3,7 @@ padding: 1rem 1rem 1rem 0; &::before { - background-image: url('alert/success.svg'); + background-image: url('/alert/success.svg'); background-repeat: no-repeat; content: ''; display: inline-block; diff --git a/app/assets/stylesheets/components/_personal-key.scss b/app/assets/stylesheets/components/_personal-key.scss index 27d55bc560e..c475e8c922f 100644 --- a/app/assets/stylesheets/components/_personal-key.scss +++ b/app/assets/stylesheets/components/_personal-key.scss @@ -2,7 +2,7 @@ .personal-key-block { @include u-padding-y(2); - background-image: url('personal-key/pkey-block.svg'); + background-image: url('/personal-key/pkey-block.svg'); background-position: center; background-repeat: no-repeat; @@ -28,7 +28,7 @@ .bg-personal-key { height: 145px; - background-image: url('personal-key/shield.svg'); + background-image: url('/personal-key/shield.svg'); background-position: center; background-repeat: no-repeat; background-size: 145px 145px; diff --git a/app/assets/stylesheets/components/_phone-input.scss b/app/assets/stylesheets/components/_phone-input.scss index 07f0e973b95..b9a1deec9fd 100644 --- a/app/assets/stylesheets/components/_phone-input.scss +++ b/app/assets/stylesheets/components/_phone-input.scss @@ -8,11 +8,11 @@ lg-phone-input { } .iti__flag { - background-image: url('intl-tel-input/build/img/flags.png'); + background-image: url('/flags.png'); /* stylelint-disable-next-line media-feature-name-no-vendor-prefix */ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - background-image: url('intl-tel-input/build/img/flags@2x.png'); + background-image: url('/flags@2x.png'); } } diff --git a/app/assets/stylesheets/components/_step-indicator.scss b/app/assets/stylesheets/components/_step-indicator.scss index 95a3835e984..b10b9cb5212 100644 --- a/app/assets/stylesheets/components/_step-indicator.scss +++ b/app/assets/stylesheets/components/_step-indicator.scss @@ -109,7 +109,7 @@ lg-step-indicator { .step-indicator__step--complete::before { background-color: color('white'); - background-image: url('alert/success.svg'); + background-image: url('/alert/success.svg'); } .step-indicator__step:not(:last-child)::after { diff --git a/app/components/icon_component.rb b/app/components/icon_component.rb index 7976d647003..f0c679a5955 100644 --- a/app/components/icon_component.rb +++ b/app/components/icon_component.rb @@ -1,6 +1,4 @@ class IconComponent < BaseComponent - include AssetHelper - # See: https://github.com/uswds/uswds/tree/develop/src/img/usa-icons ICONS = %i[ accessibility_new @@ -256,7 +254,7 @@ def initialize(icon:, **tag_options) end def icon_path - asset_path([design_system_asset_path('img/sprite.svg'), '#', icon].join, host: asset_host) + asset_path([asset_path('sprite.svg'), '#', icon].join, host: asset_host) end private diff --git a/app/components/phone_input_component.html.erb b/app/components/phone_input_component.html.erb index 24a495525de..a6d5ce7ecf9 100644 --- a/app/components/phone_input_component.html.erb +++ b/app/components/phone_input_component.html.erb @@ -53,4 +53,4 @@ }, ) %> <% end %> -<%= stylesheet_link_tag 'intl-tel-input/build/css/intlTelInput' %> +<%= stylesheet_link_tag 'intlTelInput' %> diff --git a/app/decorators/service_provider_session_decorator.rb b/app/decorators/service_provider_session_decorator.rb index 83ad7cce508..d6aeca42be5 100644 --- a/app/decorators/service_provider_session_decorator.rb +++ b/app/decorators/service_provider_session_decorator.rb @@ -42,6 +42,8 @@ def s3_logo_url(service_provider) def legacy_logo_url logo = sp_logo ActionController::Base.helpers.image_path("sp-logos/#{logo}") + rescue Propshaft::MissingAssetError + '' end def new_session_heading diff --git a/app/helpers/asset_helper.rb b/app/helpers/asset_helper.rb deleted file mode 100644 index 4a4d013ca9c..00000000000 --- a/app/helpers/asset_helper.rb +++ /dev/null @@ -1,7 +0,0 @@ -module AssetHelper - DESIGN_SYSTEM_ASSET_ROOT = '@18f/identity-design-system/dist/assets'.freeze - - def design_system_asset_path(path) - File.join(DESIGN_SYSTEM_ASSET_ROOT, path) - end -end diff --git a/app/helpers/script_helper.rb b/app/helpers/script_helper.rb index 1f7ba137b16..b2da5680250 100644 --- a/app/helpers/script_helper.rb +++ b/app/helpers/script_helper.rb @@ -39,7 +39,7 @@ def render_javascript_pack_once_tags(*names) private SAME_ORIGIN_ASSETS = %w[ - @18f/identity-design-system/dist/assets/img/sprite.svg + sprite.svg ].to_set.freeze def local_crossorigin_sources? diff --git a/app/javascript/packages/components/icon.tsx b/app/javascript/packages/components/icon.tsx index 5bd6d85083c..a0b57b7e74e 100644 --- a/app/javascript/packages/components/icon.tsx +++ b/app/javascript/packages/components/icon.tsx @@ -1,6 +1,6 @@ import { getAssetPath } from '@18f/identity-assets'; -const SPRITE_URL = getAssetPath('@18f/identity-design-system/dist/assets/img/sprite.svg'); +const SPRITE_URL = getAssetPath('sprite.svg'); export type DesignSystemIcon = | 'accessibility_new' diff --git a/app/views/accounts/_unphishable_badge.html.erb b/app/views/accounts/_unphishable_badge.html.erb index ff2873288ba..d93bdfe0130 100644 --- a/app/views/accounts/_unphishable_badge.html.erb +++ b/app/views/accounts/_unphishable_badge.html.erb @@ -1,6 +1,6 @@