Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ef47c52
create an account banner partial, refactor banner
jmdembe Apr 14, 2023
dacb24b
change banner to not show on default
jmdembe Apr 17, 2023
f7f66ee
add config value, setup for view
jmdembe Apr 17, 2023
75ab242
toggle show based on page location
jmdembe Apr 18, 2023
bd0dbfd
add test bucket and add analytic to user registration event
jmdembe Apr 20, 2023
e6dd5ce
Merge branch 'main' into LG-9215-ab-test-account-creation
jmdembe Apr 20, 2023
23c1adc
address PR comment, rename variable, fix logic
jmdembe Apr 20, 2023
cdbe8fd
right wrongs that I had created
jmdembe Apr 20, 2023
80d7ade
add/edit analytics
jmdembe Apr 21, 2023
c6dcd1c
remove urlhelper
jmdembe Apr 24, 2023
e0e2d03
revert changes made for account banner ab test
jmdembe Apr 25, 2023
11f154e
merge create an account banner w/ sign in a/b test
jmdembe Apr 25, 2023
cd6d825
Merge branch 'main' into LG-9215-ab-test-account-creation
jmdembe Apr 25, 2023
dea3b72
remove config value
jmdembe Apr 25, 2023
0249988
lint fixes, cleanup for create account banner
jmdembe Apr 25, 2023
a737614
modify header of create an account banner
jmdembe Apr 25, 2023
bd76cdc
make heading a banner instead
jmdembe Apr 25, 2023
c610d2c
WIP: modify banner for a11y best practices
jmdembe Apr 25, 2023
1bbc64f
WIP: page title on sign in page
jmdembe Apr 25, 2023
296b7eb
Merge branch 'main' into LG-9215-ab-test-account-creation
jmdembe Apr 25, 2023
3073be0
add banner variable to ab test
jmdembe Apr 25, 2023
fec4374
make adjustment to base c-a-b container
jmdembe Apr 26, 2023
cc01cae
Merge branch 'main' into LG-9215-ab-test-account-creation
jmdembe Apr 26, 2023
33c3c14
add test for banner test
jmdembe Apr 26, 2023
bcc4034
remove binding, show banner after switching between languages
jmdembe Apr 27, 2023
8b1ef40
Address PR comment: make `@is_home_page` true
jmdembe Apr 27, 2023
909d222
fix: 100 percent on default instead of banner
jmdembe Apr 27, 2023
3499881
rename to `create_account_banner`
jmdembe Apr 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/assets/stylesheets/utilities/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ h6,
align-items: center;
text-align: center;
font-size: 1.125rem;
margin-top: 32px;
margin-bottom: 16px;

&::before,
Expand Down
1 change: 1 addition & 0 deletions app/controllers/users/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def new

@ial = sp_session_ial
@browser_is_ie11 = browser_is_ie11?
@is_on_home_page = true
@sign_in_a_b_test_bucket = sign_in_a_b_test_bucket
analytics.sign_in_page_visit(
flash: flash[:alert],
Expand Down
15 changes: 4 additions & 11 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<% if decorated_session.sp_name %>
<%= render 'sign_up/registrations/sp_registration_heading' %>
<% elsif @sign_in_a_b_test_bucket == :default %>
<% elsif @sign_in_a_b_test_bucket != :tabbed %>
<%= render PageHeadingComponent.new.with_content(decorated_session.new_session_heading) %>
<% end %>

Expand Down Expand Up @@ -50,16 +50,9 @@
) %>
<%= f.submit t('links.next'), full_width: true, wide: false %>
<% if @sign_in_a_b_test_bucket == :default %>
<h2 class='separator-text'>
<%= t('headings.create_account_with_sp.cta', app_name: APP_NAME) %>
</h2>
<%= render ButtonComponent.new(
action: ->(**tag_options, &block) { link_to(sign_up_email_url(source: :sign_in), **tag_options, &block) },
big: true,
outline: true,
full_width: true,
class: 'margin-bottom-105',
).with_content(t('links.create_account')) %>
<div class="margin-top-4 margin-bottom-2">
<%= render 'shared/create_account_banner' %>
</div>
<% end %>
<% end %>
<% if @ial && desktop_device? %>
Expand Down
10 changes: 7 additions & 3 deletions app/views/layouts/base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,23 @@
<div class="usa-overlay"></div>
<%= yield(:mobile_nav) if content_for?(:mobile_nav) %>
<%= render 'shared/banner' %>

<%= content_tag(
local_assigns[:user_main_tag] == false ? 'div' : 'main',
class: 'site-wrap bg-primary-lighter',
id: local_assigns[:user_main_tag] == false ? nil : 'main-content',
) do %>
) do %>
<% if @is_on_home_page && @sign_in_a_b_test_bucket == :banner %>
<div class="grid-container padding-y-2 card tablet:margin-bottom-1">
<%= render 'shared/create_account_banner' %>
</div>
<% end %>

<div class="grid-container padding-y-4 tablet:padding-y-8 <%= local_assigns[:disable_card].present? ? '' : 'card' %>">
<%= yield(:pre_flash_content) if content_for?(:pre_flash_content) %>
<%= render FlashComponent.new(flash: flash) %>
<%= content_for?(:content) ? yield(:content) : yield %>
</div>
<% end %>

<%= render 'shared/footer_lite' %>

<% if current_user %>
Expand Down
10 changes: 10 additions & 0 deletions app/views/shared/_create_account_banner.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<h2 class='separator-text'>
<%= t('headings.create_account_with_sp.cta', app_name: APP_NAME) %>
</h2>
<%= render ButtonComponent.new(
action: ->(**tag_options, &block) { link_to(sign_up_email_url(source: :sign_in), **tag_options, &block) },
big: true,
outline: true,
full_width: true,
class: 'margin-bottom-105',
).with_content(t('links.create_account')) %>
2 changes: 1 addition & 1 deletion config/application.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ session_total_duration_timeout_in_minutes: 720
ses_configuration_set_name: ''
set_remember_device_session_expiration: false
sign_up_mfa_selection_order_testing: '{ "default": 100, "authentication_app_priority": 0, "usability_priority": 0 }'
sign_in_a_b_testing: '{"default":100,"tabbed":0}'
sign_in_a_b_testing: '{ "default": 100,"tabbed" :0, "banner": 0 } '
sp_handoff_bounce_max_seconds: 2
show_user_attribute_deprecation_warnings: false
otp_min_attempts_remaining_warning_count: 3
Expand Down
10 changes: 10 additions & 0 deletions spec/views/devise/sessions/new.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,14 @@
)
end
end

context 'with banner A/B test' do
let(:sign_in_a_b_test_bucket) { :banner }

it 'has a localized page heading' do
render

expect(rendered).to have_selector('h1', text: t('headings.sign_in_without_sp'))
end
end
end