Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing address verification step to a form instead of buttons #1781

Merged
merged 20 commits into from
Dec 4, 2017

Conversation

tbaxter-18f
Copy link
Contributor

@tbaxter-18f tbaxter-18f commented Nov 15, 2017

To better match UX patterns used elsewhere.

https://github.com/18F/identity-private/issues/2112

Copy link
Member

@jmhooper jmhooper left a comment

Choose a reason for hiding this comment

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

I had a few comments about comments. Also looks like you made CodeClimate angry.

One thing that we don't do here is display any kind of error when you don't make a choice on the form. I think that is okay, but we may want to run it by @mkhandekar.

It'd also be nice to see a feature spec for when you don't make a choice on that screen. Perhaps in the USPS verification selection examples or something?

span = t('idv.messages.select_verification_form.phone_message')

// USPS verification should always be enabled in prod.
// This check is a convenience for lower envs.
Copy link
Member

Choose a reason for hiding this comment

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

We can probably drop the comment in here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I may be more of a fan of comments than other people. My thinking was that since I had to stop and ask about it, leave a comment for the next person so they will know.

Copy link
Member

Choose a reason for hiding this comment

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

We typically try to keep comments out the idp. Since there's a lot of code and a lot of churn, it is difficult to keep comments up to date. If you think there's a risk that someone will change the code and break something later, it may be better to add a tests. If you think the code is unclear, it may be better to refactor it so it is more clear.

This comment is an example of one that will go out of date and be confusing when we change this config in the lower envs.

class: 'btn btn-primary col-6 mb2 p2 rounded-lg inline-block'

// Be sure to keep this outdented to the same level as the form above
// or terrible things will happen to your tests.
Copy link
Member

Choose a reason for hiding this comment

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

Same here. We can probs drop this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm on the fence on this one. On the one hand, I tend to like to comment anyplace a simple mistake can lead to big headaches. On the other hand, this one was really just my silly mistake, and I can see an argument that the comment only says "malformed HTML is bad". So I could go either way.

@@ -53,7 +53,7 @@
expect(current_path).to eq verify_session_result_path
end

scenario 'fincance shows failure flash message after max attempts', :email do
scenario 'finance shows failure flash message after max attempts', :email do
Copy link
Member

Choose a reason for hiding this comment

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

nice

@@ -68,11 +68,19 @@ def click_idv_continue
end

def click_idv_address_choose_phone
click_link t('idv.buttons.activate_by_phone')
# we're capturing the click on the label element via the unique "for" attribute
Copy link
Member

Choose a reason for hiding this comment

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

same comment on comments 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should keep it here, because the click handler is a bit unique. There are multiple elements within the label, and clicking the label itself is the only thing that matches how the CSS is actually setting the hidden input to true. Since it's both not immediately clear and a relatively unfamiliar pattern, I think it's worth commenting.

Choose a reason for hiding this comment

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

Having a slack conversation about giving the user an error if nothing is chosen: https://gsa-tts.slack.com/archives/C0NGESUN5/p1511195802000213

Choose a reason for hiding this comment

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

@tbaxter-18f and I just chatted offline and decided that verification via text should be pre-selected as the vast majority of folks will want to choose that. That eliminates the need to provide an error if nothing is selected.

@tbaxter-18f tbaxter-18f changed the title Changing address verification step to a form instead of buttons WIP: Changing address verification step to a form instead of buttons Nov 15, 2017
@mkhandekar
Copy link

mkhandekar commented Nov 30, 2017

Because we're pre-selecting the text option, users may breeze through this page without reading fully. In case they find themselves somewhere they don't mean to be, we do want to make sure that users have a way to navigate freely between these three screens:

  • choose how to verify
  • verify via text (users need to be able to navigate to both of the other pages)
  • verify via letter (users need to be able to navigate to both of the other pages)

Please see this issue (https://github.com/18F/identity-private/issues/2138#issuecomment-315444285) to implement the 2 links at the bottom of the "verify by text" and verify by letter" pages. @tbaxter-18f @jmhooper I see that issue 2138 is in the backlog. I'd like to make sure to add to next sprint.

@tbaxter-18f tbaxter-18f changed the title WIP: Changing address verification step to a form instead of buttons Changing address verification step to a form instead of buttons Nov 30, 2017
**Why**: In order to ensure the user makes a selection and to ease the
workflow by preselecting the most common choice.
@tbaxter-18f
Copy link
Contributor Author

After talking with @mkhandekar we decided to pre-select "by phone", which negates the possiblity of a null choice. So I think we should be good here without an additional test.

@jmhooper
Copy link
Member

jmhooper commented Dec 4, 2017

@tbaxter-18f: Would you mind rebasing this or merging master in? Looks like you have a failing test, but it's fixed on master.

Copy link
Member

@jmhooper jmhooper left a comment

Choose a reason for hiding this comment

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

Looks like you need to normalize the yaml in the translations, but lgtm besides that.

Remember to squash before merging.

**Why**: somewhere we picked up a YAML error.
@tbaxter-18f tbaxter-18f merged commit 499535e into master Dec 4, 2017
monfresh added a commit that referenced this pull request Jul 25, 2018
**Why**: The logstash example configuration was accidentally removed
in #1781 because the commits were not properly squashed.

While testing this locally, I ran into some issues, so I updated the
documentation to help others solve them.
@amathews-fs amathews-fs deleted the tcb-2112-address-verification branch January 7, 2021 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants