diff --git a/.rubocop.yml b/.rubocop.yml index 17a03dc423b..5c3589b13c5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -932,6 +932,7 @@ Style/AndOr: - conditionals Style/ArgumentsForwarding: + UseAnonymousForwarding: false Enabled: true Style/ArrayJoin: diff --git a/Gemfile b/Gemfile index de1eac11a26..51638653227 100644 --- a/Gemfile +++ b/Gemfile @@ -110,7 +110,7 @@ group :development, :test do gem 'pry-rails' gem 'psych' gem 'rspec-rails', '~> 6.0' - gem 'rubocop', '~> 1.43.0', require: false + gem 'rubocop', '~> 1.55.1', require: false gem 'rubocop-performance', '~> 1.15.0', require: false gem 'rubocop-rails', '>= 2.5.2', require: false end diff --git a/Gemfile.lock b/Gemfile.lock index a35df8cc77e..efeae68cf6e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -366,6 +366,7 @@ GEM jwt (2.7.1) knapsack (4.0.0) rake + language_server-protocol (3.17.0.3) launchy (2.5.0) addressable (~> 2.7) letter_opener (1.8.1) @@ -439,13 +440,14 @@ GEM openssl-signature_algorithm (1.2.1) openssl (> 2.0, < 3.1) orm_adapter (0.5.0) - parallel (1.22.1) - parser (3.2.2.0) + parallel (1.23.0) + parser (3.2.2.3) ast (~> 2.4.1) + racc pg (1.4.5) pg_query (2.2.0) google-protobuf (>= 3.19.2) - phonelib (0.6.54) + phonelib (0.8.2) pkcs11 (0.3.4) premailer (1.21.0) addressable @@ -589,18 +591,19 @@ GEM rspec-support (3.12.0) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.43.0) + rubocop (1.55.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.24.1, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.24.1) - parser (>= 3.1.1.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) rubocop-performance (1.15.2) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) @@ -819,7 +822,7 @@ DEPENDENCIES rspec-rails (~> 6.0) rspec-retry rspec_junit_formatter - rubocop (~> 1.43.0) + rubocop (~> 1.55.1) rubocop-performance (~> 1.15.0) rubocop-rails (>= 2.5.2) ruby-progressbar diff --git a/app/assets/images/loading-badge.gif b/app/assets/images/loading-badge.gif new file mode 100644 index 00000000000..729b9ad7f1c Binary files /dev/null and b/app/assets/images/loading-badge.gif differ diff --git a/app/assets/images/spinner.gif b/app/assets/images/spinner.gif deleted file mode 100644 index 8646d68e705..00000000000 Binary files a/app/assets/images/spinner.gif and /dev/null differ diff --git a/app/assets/images/spinner@2x.gif b/app/assets/images/spinner@2x.gif deleted file mode 100644 index 0cd600cca68..00000000000 Binary files a/app/assets/images/spinner@2x.gif and /dev/null differ diff --git a/app/assets/stylesheets/utilities/_util.scss b/app/assets/stylesheets/utilities/_util.scss index 804be19afaa..7b9cf34e837 100644 --- a/app/assets/stylesheets/utilities/_util.scss +++ b/app/assets/stylesheets/utilities/_util.scss @@ -13,15 +13,3 @@ html.js .no-js { backface-visibility: hidden; transform: scale(0.7); } - -@include at-media('tablet') { - .sm-left-align { - text-align: left; - } -} - -.half-center { - margin: 0 auto; - text-align: center; - width: 300px; -} diff --git a/app/components/block_link_component.rb b/app/components/block_link_component.rb index fad065041b1..9878ee58641 100644 --- a/app/components/block_link_component.rb +++ b/app/components/block_link_component.rb @@ -1,6 +1,8 @@ class BlockLinkComponent < BaseComponent attr_reader :url, :action, :new_tab, :tag_options + alias_method :new_tab?, :new_tab + def initialize(url:, action: tag.method(:a), new_tab: false, **tag_options) @action = action @url = url @@ -10,12 +12,12 @@ def initialize(url:, action: tag.method(:a), new_tab: false, **tag_options) def css_class classes = ['usa-link', 'block-link', *tag_options[:class]] - classes << 'usa-link--external' if new_tab + classes << 'usa-link--external' if new_tab? classes end def target - '_blank' if new_tab + '_blank' if new_tab? end def wrapper(&block) diff --git a/app/components/password_confirmation_component.html.erb b/app/components/password_confirmation_component.html.erb index 683da5ccd90..49014e370ad 100644 --- a/app/components/password_confirmation_component.html.erb +++ b/app/components/password_confirmation_component.html.erb @@ -3,7 +3,7 @@ form: form, name: :password, type: :password, - label: t('forms.password'), + label: password_label, required: true, **field_options, input_html: field_options[:input_html].to_h.merge( @@ -16,7 +16,7 @@ form: form, name: :password_confirmation, type: :password_confirmation, - label: t('components.password_confirmation.confirm_label'), + label: confirmation_label, required: true, **field_options, input_html: field_options[:input_html].to_h.merge( diff --git a/app/components/password_confirmation_component.rb b/app/components/password_confirmation_component.rb index 752d8ccf91a..508188f5649 100644 --- a/app/components/password_confirmation_component.rb +++ b/app/components/password_confirmation_component.rb @@ -3,14 +3,26 @@ class PasswordConfirmationComponent < BaseComponent def initialize( form:, + password_label: nil, + confirmation_label: nil, field_options: {}, **tag_options ) @form = form + @password_label = password_label + @confirmation_label = confirmation_label @field_options = field_options @tag_options = tag_options end + def password_label + @password_label || t('forms.password') + end + + def confirmation_label + @confirmation_label || t('components.password_confirmation.confirm_label') + end + def toggle_id "password-confirmation-toggle-#{unique_id}" end diff --git a/app/components/troubleshooting_options_component.rb b/app/components/troubleshooting_options_component.rb index efa7d693b1d..e15e6c25ea8 100644 --- a/app/components/troubleshooting_options_component.rb +++ b/app/components/troubleshooting_options_component.rb @@ -4,10 +4,19 @@ class TroubleshootingOptionsComponent < BaseComponent attr_reader :tag_options - def initialize(**tag_options) + def initialize(options: [], **tag_options) + @options_from_constructor = options @tag_options = tag_options.dup end + def options + @options_from_constructor.map(&method(:render)) + get_slot(:options) + end + + def options? + options.present? + end + def render? options? end diff --git a/app/components/webauthn_verify_button_component.html.erb b/app/components/webauthn_verify_button_component.html.erb index 3fd6f911410..2aaa4e3da84 100644 --- a/app/components/webauthn_verify_button_component.html.erb +++ b/app/components/webauthn_verify_button_component.html.erb @@ -9,8 +9,7 @@ ) do %>