diff --git a/app/controllers/frontend_log_controller.rb b/app/controllers/frontend_log_controller.rb index af6ecd5431b..a2708f4810c 100644 --- a/app/controllers/frontend_log_controller.rb +++ b/app/controllers/frontend_log_controller.rb @@ -8,26 +8,28 @@ class FrontendLogController < ApplicationController # In rare circumstances, these writes can clobber other, more important writes. before_action :skip_session_commit + # Please try to keep this list alphabetical as well! # rubocop:disable Layout/LineLength EVENT_MAP = { - 'IdV: verify in person troubleshooting option clicked' => :idv_verify_in_person_troubleshooting_option_clicked, - 'IdV: location visited' => :idv_in_person_location_visited, + 'IdV: consent checkbox toggled' => :idv_consent_checkbox_toggled, + 'IdV: download personal key' => :idv_personal_key_downloaded, 'IdV: location submitted' => :idv_in_person_location_submitted, + 'IdV: location visited' => :idv_in_person_location_visited, 'IdV: Mobile device and camera check' => :idv_mobile_device_and_camera_check, - 'IdV: prepare visited' => :idv_in_person_prepare_visited, - 'IdV: prepare submitted' => :idv_in_person_prepare_submitted, - 'IdV: switch_back visited' => :idv_in_person_switch_back_visited, - 'IdV: switch_back submitted' => :idv_in_person_switch_back_submitted, - 'IdV: download personal key' => :idv_personal_key_downloaded, 'IdV: Native camera forced after failed attempts' => :idv_native_camera_forced, - 'Multi-Factor Authentication: download backup code' => :multi_factor_auth_backup_code_download, - 'Show Password button clicked' => :show_password_button_clicked, 'IdV: personal key acknowledgment toggled' => :idv_personal_key_acknowledgment_toggled, + 'IdV: prepare submitted' => :idv_in_person_prepare_submitted, + 'IdV: prepare visited' => :idv_in_person_prepare_visited, + 'IdV: switch_back submitted' => :idv_in_person_switch_back_submitted, + 'IdV: switch_back visited' => :idv_in_person_switch_back_visited, 'IdV: user clicked sp link on ready to verify page' => :idv_in_person_ready_to_verify_sp_link_clicked, 'IdV: user clicked what to bring link on ready to verify page' => :idv_in_person_ready_to_verify_what_to_bring_link_clicked, - 'IdV: consent checkbox toggled' => :idv_consent_checkbox_toggled, - 'User prompted before navigation' => :user_prompted_before_navigation, + 'IdV: verify in person troubleshooting option clicked' => :idv_verify_in_person_troubleshooting_option_clicked, + 'Multi-Factor Authentication: download backup code' => :multi_factor_auth_backup_code_download, + 'Show Password button clicked' => :show_password_button_clicked, + 'Sign In: IdV requirements accordion clicked' => :sign_in_idv_requirements_accordion_clicked, 'User prompted before navigation and still on page' => :user_prompted_before_navigation_and_still_on_page, + 'User prompted before navigation' => :user_prompted_before_navigation, }.transform_values { |method| AnalyticsEvents.instance_method(method) }.freeze # rubocop:enable Layout/LineLength diff --git a/app/javascript/packages/components/accordion.tsx b/app/javascript/packages/components/accordion.tsx deleted file mode 100644 index 4625a07dc6e..00000000000 --- a/app/javascript/packages/components/accordion.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { useRef } from 'react'; -import type { ReactNode } from 'react'; -import { useInstanceId } from '@18f/identity-react-hooks'; - -interface AccordionProps { - header: string; - - children: ReactNode; -} - -function Accordion({ header, children }: AccordionProps) { - const uniqueId = useInstanceId(); - const ref = useRef(null as HTMLDivElement | null); - - return ( -
- <%= image_tag( - asset_url('get-started/email-password.svg'), - size: '40', alt: t('devise.registrations.start.bullet_1_img'), class: 'margin-top-05 grid-col-auto', - ) %> - - <%= t('devise.registrations.start.bullet_1_html') %> - -
-- <%= image_tag( - asset_url('get-started/2FA.svg'), - size: '40', alt: t('devise.registrations.start.bullet_2_img'), class: 'margin-top-05 grid-col-auto', - ) %> - - <%= t('devise.registrations.start.bullet_2_html') %> - -
-- <%= image_tag( - asset_url('get-started/personal-details.svg'), - size: '40', alt: t('devise.registrations.start.bullet_3_img'), class: 'margin-top-05 grid-col-auto', - ) %> - - <%= t('devise.registrations.start.bullet_3_html') %> - -
-- <%= image_tag( - asset_url('get-started/personal-details.svg'), - size: '40', alt: t('devise.registrations.start.bullet_3_img'), class: 'margin-top-05 grid-col-auto', - ) %> - - <%= t('devise.registrations.start.bullet_4_html') %> - -
-- <%= image_tag( - asset_url('get-started/financial.svg'), - size: '40', alt: t('devise.registrations.start.bullet_5_img'), class: 'margin-top-05 grid-col-auto', - ) %> - - <%= t('devise.registrations.start.bullet_5_html') %> - -
-- <%= image_tag( - asset_url('get-started/personal-key.svg'), - size: '40', alt: t('devise.registrations.start.bullet_6_img'), class: 'margin-top-05 grid-col-auto', - ) %> - - <%= t('devise.registrations.start.bullet_6_html') %> - -
-- <%= new_tab_link_to t('devise.registrations.start.learn_more'), MarketingSite.help_url %> -
+<%= render ClickObserverComponent.new(event_name: 'Sign In: IdV requirements accordion clicked') do %> + <%= render AccordionComponent.new(class: 'margin-y-2') do |c| %> + <% c.with_header { t('devise.registrations.start.accordion') } %> ++ <%= image_tag( + asset_url('get-started/email-password.svg'), + size: '40', alt: t('devise.registrations.start.bullet_1_img'), class: 'margin-top-05 grid-col-auto', + ) %> + + <%= t('devise.registrations.start.bullet_1_html') %> + +
++ <%= image_tag( + asset_url('get-started/2FA.svg'), + size: '40', alt: t('devise.registrations.start.bullet_2_img'), class: 'margin-top-05 grid-col-auto', + ) %> + + <%= t('devise.registrations.start.bullet_2_html') %> + +
++ <%= image_tag( + asset_url('get-started/personal-details.svg'), + size: '40', alt: t('devise.registrations.start.bullet_3_img'), class: 'margin-top-05 grid-col-auto', + ) %> + + <%= t('devise.registrations.start.bullet_3_html') %> + +
++ <%= image_tag( + asset_url('get-started/personal-details.svg'), + size: '40', alt: t('devise.registrations.start.bullet_3_img'), class: 'margin-top-05 grid-col-auto', + ) %> + + <%= t('devise.registrations.start.bullet_4_html') %> + +
++ <%= image_tag( + asset_url('get-started/financial.svg'), + size: '40', alt: t('devise.registrations.start.bullet_5_img'), class: 'margin-top-05 grid-col-auto', + ) %> + + <%= t('devise.registrations.start.bullet_5_html') %> + +
++ <%= image_tag( + asset_url('get-started/personal-key.svg'), + size: '40', alt: t('devise.registrations.start.bullet_6_img'), class: 'margin-top-05 grid-col-auto', + ) %> + + <%= t('devise.registrations.start.bullet_6_html') %> + +
++ <%= new_tab_link_to t('devise.registrations.start.learn_more'), MarketingSite.help_url %> +
+ <% end %> <% end %>