Skip to content

Commit

Permalink
a-11 v2 updates
Browse files Browse the repository at this point in the history
* update gems
* show a /docs page in the Development environment
* comment on tables and fields
* translate characters allowed and remaining
* add seeds for digital service accounts and products
* change id to class for form privacy element, in case 2 or more forms are embedded on a webpage
* begin icon_checkboxes element
* remove role="group" per w3c checker
* deactivate users after 30 days, instead of 90 days; per SSPP
* refactor to exclude experimental ServiceProvider fields
* update browser-tools for circle ci
  • Loading branch information
ryanwoldatwork authored Sep 19, 2023
1 parent 84b3cf0 commit c455367
Show file tree
Hide file tree
Showing 38 changed files with 425 additions and 231 deletions.
13 changes: 4 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
version: 2.1
orbs:
browser-tools: circleci/[email protected].3
browser-tools: circleci/[email protected].4

jobs:
build:
Expand All @@ -26,7 +26,9 @@ jobs:
working_directory: ~/repo

steps:
- browser-tools/install-browser-tools
- run: sudo apt-get update
- browser-tools/install-chrome: # required for selenium used by tachometer benchmark smoke tests
chrome-version: 116.0.5845.96

- checkout

Expand All @@ -46,13 +48,6 @@ jobs:
- run: bundle exec rake db:create
- run: bundle exec rake db:schema:load

# Install chrome driver
- run:
name: Setup Chrome
command: |
wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.198-1_amd64.deb
sudo apt install ./google-chrome-stable_114.0.5735.198-1_amd64.deb
# run tests!
- run:
name: run tests
Expand Down
142 changes: 71 additions & 71 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,47 +18,47 @@ GEM
aasm-diagram (0.1.3)
aasm (~> 5.0, >= 4.12)
ruby-graphviz (~> 1.2)
actioncable (7.0.7)
actionpack (= 7.0.7)
activesupport (= 7.0.7)
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.7)
actionpack (= 7.0.7)
activejob (= 7.0.7)
activerecord (= 7.0.7)
activestorage (= 7.0.7)
activesupport (= 7.0.7)
actionmailbox (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.7)
actionpack (= 7.0.7)
actionview (= 7.0.7)
activejob (= 7.0.7)
activesupport (= 7.0.7)
actionmailer (7.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.7)
actionview (= 7.0.7)
activesupport (= 7.0.7)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.7)
actionpack (= 7.0.7)
activerecord (= 7.0.7)
activestorage (= 7.0.7)
activesupport (= 7.0.7)
actiontext (7.0.8)
actionpack (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.7)
activesupport (= 7.0.7)
actionview (7.0.8)
activesupport (= 7.0.8)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -68,22 +68,22 @@ GEM
activemodel (>= 4.1, < 7.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (7.0.7)
activesupport (= 7.0.7)
activejob (7.0.8)
activesupport (= 7.0.8)
globalid (>= 0.3.6)
activemodel (7.0.7)
activesupport (= 7.0.7)
activerecord (7.0.7)
activemodel (= 7.0.7)
activesupport (= 7.0.7)
activestorage (7.0.7)
actionpack (= 7.0.7)
activejob (= 7.0.7)
activerecord (= 7.0.7)
activesupport (= 7.0.7)
activemodel (7.0.8)
activesupport (= 7.0.8)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activestorage (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activesupport (= 7.0.8)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.7)
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -96,10 +96,10 @@ GEM
aes_key_wrap (1.1.0)
ast (2.4.2)
aws-eventstream (1.2.0)
aws-partitions (1.805.0)
aws-partitions (1.824.0)
aws-record (2.11.0)
aws-sdk-dynamodb (~> 1, >= 1.85.0)
aws-sdk-core (3.180.3)
aws-sdk-core (3.181.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
Expand All @@ -118,7 +118,7 @@ GEM
aws-sdk-ses (1.55.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sigv4 (~> 1.1)
aws-sdk-sesv2 (1.38.0)
aws-sdk-sesv2 (1.39.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sigv4 (~> 1.1)
aws-sdk-sqs (1.62.0)
Expand Down Expand Up @@ -192,7 +192,7 @@ GEM
dotenv (= 2.8.1)
railties (>= 3.2)
erubi (1.12.0)
excon (0.100.0)
excon (0.103.0)
factory_bot (6.2.1)
activesupport (>= 5.0.0)
factory_bot_rails (6.2.0)
Expand All @@ -217,8 +217,8 @@ GEM
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
formatador (1.1.0)
globalid (1.1.0)
activesupport (>= 5.0)
globalid (1.2.1)
activesupport (>= 6.1)
hashie (5.0.0)
httpclient (2.8.3)
i18n (1.14.1)
Expand Down Expand Up @@ -275,13 +275,13 @@ GEM
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mime-types (3.5.0)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0808)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.4)
minitest (5.19.0)
minitest (5.20.0)
msgpack (1.7.2)
multi_json (1.15.0)
multi_xml (0.6.0)
Expand All @@ -295,7 +295,7 @@ GEM
timeout
net-smtp (0.3.3)
net-protocol
newrelic_rpm (9.3.1)
newrelic_rpm (9.4.2)
nio4r (2.5.9)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
Expand Down Expand Up @@ -327,7 +327,7 @@ GEM
parser (3.2.2.3)
ast (~> 2.4.1)
racc
pg (1.5.3)
pg (1.5.4)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand All @@ -342,20 +342,20 @@ GEM
rack (~> 2.2, >= 2.2.4)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.7)
actioncable (= 7.0.7)
actionmailbox (= 7.0.7)
actionmailer (= 7.0.7)
actionpack (= 7.0.7)
actiontext (= 7.0.7)
actionview (= 7.0.7)
activejob (= 7.0.7)
activemodel (= 7.0.7)
activerecord (= 7.0.7)
activestorage (= 7.0.7)
activesupport (= 7.0.7)
rails (7.0.8)
actioncable (= 7.0.8)
actionmailbox (= 7.0.8)
actionmailer (= 7.0.8)
actionpack (= 7.0.8)
actiontext (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activemodel (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
bundler (>= 1.15.0)
railties (= 7.0.7)
railties (= 7.0.8)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -372,9 +372,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.7)
actionpack (= 7.0.7)
activesupport (= 7.0.7)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -414,7 +414,7 @@ GEM
rspec-support (3.12.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.56.0)
rubocop (1.56.3)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
Expand All @@ -430,13 +430,13 @@ GEM
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-rails (2.20.2)
rubocop-rails (2.21.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.23.2)
rubocop-rspec (2.24.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
Expand Down Expand Up @@ -473,18 +473,18 @@ GEM
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
sprockets (4.2.0)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
ssrf_filter (1.1.1)
ssrf_filter (1.1.2)
stimulus-rails (1.2.2)
railties (>= 6.0.0)
thor (1.2.2)
tilt (2.2.0)
tilt (2.3.0)
timeout (0.4.0)
turbo-rails (1.4.0)
actionpack (>= 6.0.0)
Expand All @@ -497,7 +497,7 @@ GEM
version_gem (1.1.3)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
Expand Down
17 changes: 17 additions & 0 deletions app/assets/stylesheets/site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,27 @@ span.usa-hint.save-notice {
padding-bottom: 20px;
padding-left: 20px;
padding-top: 1px;
padding-right: 1rem;
}
.word-break {
word-wrap: break-word;
}

// A-11 V2 customizations
.question-options.icons .usa-checkbox__input--tile+.usa-checkbox__label,
.question-options.icons .usa-radio__input--tile+.usa-radio__label {
padding: 0;
}
.question-options.icons .usa-checkbox__input--tile+[class*=__label]:before {
margin-top: 20px;
bottom: 10px;
left: 48%;
margin-left: -10px;
}
.question-options.icons .usa-checkbox__label {
text-align: center;
}
// end A-11 V2 customizations
}

.usa-button.full-width {
Expand Down
12 changes: 12 additions & 0 deletions app/controllers/site_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ def index

def agencies; end

def docs
tables = ActiveRecord::Base.connection.tables
tables_specific_to_rails = [
"active_storage_variant_records",
"active_storage_blobs",
"active_storage_attachments",
"schema_migrations",
"ar_internal_metadata"
]
@tables = tables - tables_specific_to_rails
end

def registry
@results = nil
end
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ def question_type_javascript_params(question)
"form.querySelector(\"##{question.answer_field}\") && form.querySelector(\"##{question.answer_field}\").value"
elsif question.question_type == 'radio_buttons'
"form.querySelector(\"input[name=#{question.answer_field}]:checked\") && form.querySelector(\"input[name=#{question.answer_field}]:checked\").value"
elsif question.question_type == 'icon_checkboxes'
"form.querySelector(\"input[name=#{question.answer_field}]:checked\") && form.querySelector(\"input[name=#{question.answer_field}]:checked\").value"
elsif question.question_type == 'star_radio_buttons'
"form.querySelector(\"input[name=#{question.answer_field}]:checked\") && form.querySelector(\"input[name=#{question.answer_field}]:checked\").value"
elsif question.question_type == 'thumbs_up_down_buttons'
Expand Down
1 change: 1 addition & 0 deletions app/models/question.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Question < ApplicationRecord
'text_display',
'custom_text_display',
'states_dropdown',
'icon_checkboxes',
'star_radio_buttons',
'thumbs_up_down_buttons',
'big_thumbs_up_down_buttons',
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def self.deactivation_pending(expire_days)

def self.deactivate_inactive_accounts!
# Find all accounts scheduled to be deactivated in 14 days
users = User.active.where('(current_sign_in_at ISNULL AND created_at <= ?) OR (current_sign_in_at <= ?)', 90.days.ago, 90.days.ago)
users = User.active.where('(current_sign_in_at ISNULL AND created_at <= ?) OR (current_sign_in_at <= ?)', 30.days.ago, 30.days.ago)
users.each(&:deactivate!)
end

Expand Down
Loading

0 comments on commit c455367

Please sign in to comment.