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

Add user research recruitment banner #2301

Closed
wants to merge 5 commits into from

Conversation

floehopper
Copy link
Contributor

@floehopper floehopper commented Aug 9, 2023

Trello: https://trello.com/c/yGMU3sR2

Supersedes #2295.

This is a reworked version of #2295 where I've curated the commits as per @mike29736's suggestion and changed the "Hide this" button to actually look like a button (to address @chrisroos' question in #2295 and @mike29736's concern.

This adds a "sticky" banner on the Signon home page to recruit user research participants for GOV.UK Publishing. The "Find out more" button opens a Google Form (managed by the User Research folk) in a new browser tab. If the user clicks on this button, we record that in the Signon database and we never show them the banner again. If the user clicks on the "Hide this" button then we hide the banner for the duration of the current browser session, but it will be displayed to the user in their next browser session.

As per these recommendations, I tested the version in #2295 against the following devices/browsers (using BrowserStack). Since making the change to the "Hide this" button implementation, I've re-tested in the same browsers...

  • Windows 11
    • Edge 115
    • Firefox 116
    • Chrome 115
  • MacOS 13.4.1
    • Firefox 115
    • Chrome 115
    • Safari 16.5.2
  • iPhone SE 2022 v15.4
    • Safari
    • Chrome
  • iPhone 14 iOS 16
    • Safari
  • Galaxy S23 Android 13
    • Chrome
    • Samsung Internet

Desktop

Screen Shot 2023-08-09 at 15 31 21

iPad

Screen Shot 2023-08-09 at 15 31 53

iPhone

Screen Shot 2023-08-09 at 15 32 07

Trello: https://trello.com/c/yGMU3sR2

We're only showing the banner on the dashboard so that we don't
overwhelm people by showing it everywhere.

Ideally we'd have used the GOV.UK Components button [1] for the two
buttons. However, the `govuk-button--inverse` CSS class [2] is not
supported by the component and there's no easy way to override it.
Since we're not using that component we've had to introduce
`ApplicationHelper#arrow_svg` to generate the arrow SVG for the
start-style button [3]. It would be worth opening a PR to add an
`inverse` property to the GOV.UK Components button so we can avoid this
duplication.

[1]: https://components.publishing.service.gov.uk/component-guide/button
[2]: https://design-system.service.gov.uk/components/button/#buttons-on-dark-backgrounds
[3]:
https://design-system.service.gov.uk/components/button/#start-buttons
Trello: https://trello.com/c/yGMU3sR2

We set a session cookie to hide the banner until the user restarts their
browser.
Trello: https://trello.com/c/yGMU3sR2

If the user clicks on "Find out more" then we assume that they've
completed the Google Form and therefore we don't want to annoy them by
continuing to show them the recruitment banner.

We've introduced the `UserResearchRecruitmentController#participate`
action so that we can record that the user has clicked the button before
sending them off to the Google Form.
Based on this feedback from Joseph [1]:

> When you click ‘Sign up’, it would be better if this opened a new tab
> rather than replacing the current tab - this could be quite frustrating
> for some users who’d then need to navigate back to Signon and might
> actually cause people to close the form immediately.

[1]:  https://trello.com/c/yGMU3sR2/211#comment-64d0dc81295a6fd92483e962
Copy link
Contributor

@mike29736 mike29736 left a comment

Choose a reason for hiding this comment

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

👍

@floehopper
Copy link
Contributor Author

Superseded by #2303. Closing.

@floehopper floehopper closed this Aug 10, 2023
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.

2 participants