LG-7393 Two-Screen Phone Verification (WIP)#7330
Conversation
| idv_phone_form: | ||
| { | ||
| phone: improbable_phone_number, | ||
| otp_delivery_preference: :🎷, |
| buttons: | ||
| delete: Delete email address | ||
| example: 'Example:' | ||
| example: 'example:' |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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:
- Add a
hintssection to this form yml file and put the lowercase example text there, keeping the change in question; - 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
There was a problem hiding this comment.
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?
-- 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.
| @@ -1,121 +0,0 @@ | |||
| module Idv | |||
| class OtpDeliveryMethodController < ApplicationController | |||
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
Ah, yes. This is going to require further work, I think, since I gutted some of the old stuff prematurely.
solipet
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Need to resolve what is going on with this test.
app/views/idv/phone/new.html.erb
Outdated
| <%= f.radio_button( | ||
| :otp_delivery_preference, | ||
| :sms, | ||
| checked: true, # We want SMS to be default checked |
There was a problem hiding this comment.
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)
| checked: true, # We want SMS to be default checked | |
| checked: !VendorStatus.new.vendor_outage?(:sms), # We want SMS to be default checked |
these events will soon be removed once the new two phone page gets implemented. the otp_delivery_method selection step does not occur in this regression test
added in adapter to the analytics call for idv_phone_confirmation_otp_sent
| # 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( |
There was a problem hiding this comment.
whoop sorry the rename was a bit different in #7409
| idv_session.user_phone_confirmation_session = Idv::PhoneConfirmation::ConfirmationSession.new( | |
| idv_session.user_phone_confirmation_session = Idv::PhoneConfirmationSession.new( |
🎫 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:
After: