Skip to content

LG-7393 Two-Screen Phone Verification (WIP)#7330

Merged
theabrad merged 52 commits intomainfrom
abrad-lg-7393-two-screen-phone
Dec 2, 2022
Merged

LG-7393 Two-Screen Phone Verification (WIP)#7330
theabrad merged 52 commits intomainfrom
abrad-lg-7393-two-screen-phone

Conversation

@theabrad
Copy link
Contributor

@theabrad theabrad commented Nov 10, 2022

🎫 Ticket

Link to the relevant ticket.

🛠 Summary of changes

Changed the phone verification in the IdV flow from 3 screens to two. Placed the One Time Password delivery method on the phone verification page.

👀 Screenshots

Before: Screen Shot 2022-11-10 at 4 39 08 PM
After:

Screen Shot 2022-11-04 at 2 38 28 PM

idv_phone_form:
{
phone: improbable_phone_number,
otp_delivery_preference: :🎷,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

buttons:
delete: Delete email address
example: 'Example:'
example: 'example:'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this labels is used with hint labels throughout the application and this change may impact those instances. Just want to confirm we're aware / okay with that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this labels is used with hint labels throughout the application and this change may impact those instances. Just want to confirm we're aware / okay with that.

@theabrad @eric-gade @jmhooper Thoughts on this question?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only see this currently being used as a hint in one place (here), unless I've missed more instances. Since it's in one place I think the following two options might work:

  1. Add a hints section to this form yml file and put the lowercase example text there, keeping the change in question;
  2. Revert the change, and have whatever view that renders the text be responsible for capitalizing the first letter as needed.

Personally I'd pick the first option so we don't much about with more code in the views

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a couple other "example" hints in the application (e.g. phone input, memorable date), so the main reason for asking is about consistency, since I think we should be consistent with the casing throughout the application, and this should be reflected in relevant design system guidance as well as Figma flow designs.

Could y'all confirm the change with UX folks and create tickets if we want to change the case?

eric-gade added 22 commits November 16, 2022 13:47
-- What
Prior to this branch, all IDV step pages had the same "continue"
button, meaning `click_idv_continue` would find the same localization
on a button ("Continue" for english) and click that to proceed. The
new consolidated phone verification step breaks that expectation.

Instead of casing for this all over the test suite, we are introducing
a replacement `idv_click_continue_for_step` in the helpers, which
takes the symbol for the current step name as its argument and then
clicks the correct "continue" button -- which for the phone step is
now "Send security code" (and can be manually called from
`click_idv_send_security_code`).

This commit represents an initial implementation of this new helper
and a refactor of one of the example files that needs to use it.
-- What
This method was previously on the otp_selection_controller, which is
on the way to being deprecated. Some existing code required that this
method now be present on the phone controller.
-- What
The PhoneForm was changed to work with the otp phone verification, but
this interfered with other kinds of phone validation controls because
the form now expects an :otp_delivery_preference key. This being nil
will fail in other contexts.

With this commit we add a (rough, perhaps should be refactored) solution
-- What
Some of the helper methods still assumed an extra "select otp
verification" preference step. This commit removes those assumptions
from the helpers.
-- What
This test -- unlike its counterpart on main -- will end up taking the
user to an account locked page, and for the moment it's not clear why.
-- What
There were a couple of more methods from the deprecated
otp_selection_controller that needed to be moved to phone_controller.

There are also still some assumptions about the
otp_delivery_preference that are unclear
-- What
This is the step that has been combined with the phone number step,
and therefore it is no longer needed.
-- What
There were specific assumptions in place now about the default
delivery method needed on PhoneForm submissions.
@theabrad theabrad marked this pull request as ready for review November 22, 2022 14:17
@theabrad theabrad requested a review from a team November 22, 2022 14:17
@@ -1,121 +0,0 @@
module Idv
class OtpDeliveryMethodController < ApplicationController
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this controller (and any associated behavior) will need to remain for one release cycle for backwards compatibility.

It's possible during the deploy while v1 and v2 are both live, the v1 will redirect to this controller and the v2 could receive the request and fail since the route doesn't exist (the reverse is also possible).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes. This is going to require further work, I think, since I gutted some of the old stuff prematurely.

Copy link
Contributor

@solipet solipet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One TODO on a commented out spec.

end

it 'redirects back to the step with an error if Telephony raises an error on resend' do
xit 'redirects back to the step with an error if Telephony raises an error on resend' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to resolve what is going on with this test.

<%= f.radio_button(
:otp_delivery_preference,
:sms,
checked: true, # We want SMS to be default checked
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would this work if there's a vendor outage for SMS, since it would be checked but also disabled. IIRC in other screens this will be something more like... ? (with a corresponding assignment for "Voice" as well to select by default in the scenario that SMS is disabled)

Suggested change
checked: true, # We want SMS to be default checked
checked: !VendorStatus.new.vendor_outage?(:sms), # We want SMS to be default checked

@theabrad theabrad requested a review from a team December 1, 2022 21:25
# Migrated from otp_delivery_method_controller
def save_delivery_preference
original_session = idv_session.user_phone_confirmation_session
idv_session.user_phone_confirmation_session = Idv::PhoneConfirmation::ConfirmationSession.new(
Copy link
Contributor

@zachmargolis zachmargolis Dec 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoop sorry the rename was a bit different in #7409

Suggested change
idv_session.user_phone_confirmation_session = Idv::PhoneConfirmation::ConfirmationSession.new(
idv_session.user_phone_confirmation_session = Idv::PhoneConfirmationSession.new(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

@theabrad theabrad merged commit 6465aba into main Dec 2, 2022
@theabrad theabrad deleted the abrad-lg-7393-two-screen-phone branch December 2, 2022 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants