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

HUH-74: Verify sign-in hint on interstitial page - live test #1585

Merged
merged 4 commits into from
Dec 16, 2019

Conversation

jakubmiarka
Copy link

@jakubmiarka jakubmiarka commented Dec 13, 2019

This is a time-limited live test of showing a Verify hint to the users
who have verified with GOV.UK Verify before.

This test should be teared down before 20th December 2019.

The way this works, is on page load, an Ajax call is made to Verify domain to check whether
the user has successfully verified with an IDP before, if they haven't nothing happens. If they
have a new box is displayed at the top of the page showing their IDP and an option to continue.

A few points to consider when reviewing:

  • the hint will only show on personal tax account sign-in page
  • CSP rules have been adjusted by adding a new domain to our S3 where we store
    IDP and Verify logos. It's an identical copy of the gov_uk_app_config gem (had to add and exclusion to robocop as it's failing the linter)
  • added tests to confirm correct behaviour of the hint show logic

Screenshot:
image


Visual regression results:
https://government-frontend-pr-1585.surge.sh/gallery.html

Component guide for this PR:
https://government-frontend-pr-1585.herokuapp.com/component-guide

This is a time-limited live test of showing a Verify hint to the users
who have verified with GOV.UK Verify before.

This test should be teared down before 20th December 2019.

A few points to consider when reviewing:
 - the hint will only show on personal tax account sign-in page
 - CSP rules have been adjusted by adding a new domain to our S3 where we store
   IDP and Verify logos. It's an identical copy of the gov_uk_app_config gem
 - added tests to confirm correct behaviour of the hint show logic
@karlbaker02 karlbaker02 temporarily deployed to government-frontend-pr-1585 December 13, 2019 15:10 Inactive
@alex-ju alex-ju self-requested a review December 13, 2019 17:03
@karlbaker02 karlbaker02 temporarily deployed to government-frontend-pr-1585 December 13, 2019 17:45 Inactive
@jakubmiarka
Copy link
Author

  • I have updated the sass to use the govuk spacing function instead of fixed numbers
  • changed the way the html string is concentanted so hopefully it's more readable
  • @injms not sure about your blocking comment, since what you're describing is already happening and your suggested change duplicates attributes on the element

Copy link
Contributor

@injms injms left a comment

Choose a reason for hiding this comment

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

Apologies for the wrong comment from me - I completely misread the code, which is totally my fault.

Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of minor comments. My only other thought (which is hard for me to test) is what is the time delay in this box appearing?

You also might want to merge all the commits into one, doesn't seem necessary to separate them.

app/assets/javascripts/modules/show-gov-uk-verify-hint.js Outdated Show resolved Hide resolved
app/assets/stylesheets/views/_choose_sign_in.scss Outdated Show resolved Hide resolved
Copy link
Contributor

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

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

Thanks for raising this @jakubmiarka. Really interested to see this being rolled out and the results. Looks in a good shape overall, I left a few frontend comments.

app/assets/javascripts/modules/show-gov-uk-verify-hint.js Outdated Show resolved Hide resolved
app/assets/stylesheets/views/_choose_sign_in.scss Outdated Show resolved Hide resolved
.verify-hint-logos {
margin-bottom: 15px;

.verify-hint-logos-idp {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use BEM for class names (e.g. verify-hint-box, verify-hint-box__logos, verify-hint-box__logo-idp, .verify-hint-box__logo-verify) which will make SCSS nesting unnecessary.

@@ -27,6 +27,7 @@
<%= render "govuk_publishing_components/components/fieldset", legend_text: legend_text do %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<div id="verify-hint" data-module="show-gov-uk-verify-hint" style="display:none"></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

We should avoid in-line styling. Can we rely on CSS and .js-enabled class to hide this?
Also I don't see where we need an id for this element.

Copy link
Author

Choose a reason for hiding this comment

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

As much as I hate in-inline styling I have resorted to this as I don't want to make the element (even empty) visible. It's not only for people with no-js (so .js-enabled class does not help) but people who haven't used Verify successfully before shouldn't have get the element visible...

The ID is a leftover from original implentation, it didn't get used. I'll remove it.

- move the URL definition on which the script to run further up
- added alt text to the logos
- removed a redundant ID
@jakubmiarka
Copy link
Author

jakubmiarka commented Dec 16, 2019

@andysellick and @alex-ju thanks for having a look at the PR and your comments. I've addressed in the latest commit or responded to them. Could you have another look and review (and approve) since we only have less than 4 days to run this test. Thanks!

@bevanloon bevanloon merged commit 171aecd into master Dec 16, 2019
@bevanloon bevanloon deleted the huh-74-verify-hint branch December 16, 2019 11:54
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.

8 participants