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

HOFF-738: Session timeout warning(sign in required) #474

Conversation

Rhodine-orleans-lindsay
Copy link
Contributor

@Rhodine-orleans-lindsay Rhodine-orleans-lindsay commented Aug 22, 2024

What?

  • Add session timeout warning content for forms that use the save and exit functionality - HOFF-738. This ticket builds on HOFF-737. Users can choose to signed in or sign out and if they sign out the information saved will not be affected. HOFF-737 and HOFF-738 will be published together.
  • This is modelled of off the NHS IHS form (which leverages hof) (see code repo here) and the govuk design system backlog issue for timeout warnings (see code repo here)

Why?

  • To comply with accessibility requirements

How

  • Added showSaveAndExit locals to session-timeout-warning.html to set content to be used by save and exit forms. I added more content to then on the pattern as it was quite unclear that being signed out or signing out wouldn't save any input on the current page if it hadn't previously been saved.
  • Added default save-and-exit html template
  • Set showSaveAndExit locals to true on /dob step in sandbox/index.js for demo purposes.
  • Added showSaveAndExit locals to session-timeout-warning.html to set content to be used by save and exit forms
  • Added default save-and-exit html template
  • Set showSaveAndExit locals to true on /dob step in sandbox/index.js for demo purposes.
  • Added save-and-exit.html to sandbox for demo purposes
  • Amended sandbox/pages.json to include flag for save and exit content
  • Added config to customise save and exit page
  • Added relevant tests
  • Amended sessionDialog.js so it can pick up configured warning text instead of it being hard coded
  • Added baseUrl to exit href to account for services with base urls
  • Amended sandbox/pages.json to include flag for save and exit content
  • Amended changelog to include save and exit changes and note about potential breaking changes

Testing?

tested locally in sandbox and in services locally and in branch using a beta version

Anything Else? (optional)

Screenshots (optional)

Session timeout warning for a 'save and exit' form

Screenshot 2024-08-23

Default save and exit page after user clicks 'Sign out'

Screenshot 2024-08-23 at 14 07 37

Example of customised save and exit page after user clicks 'Sign out'

save and exit page

Check list

  • I have reviewed my own pull request for linting issues (e.g. adding new lines)
  • I have written tests (if relevant)
  • I have created a JIRA number for my branch
  • I have created a JIRA number for my commit
  • I have followed the chris beams method for my commit https://cbea.ms/git-commit/
    here is an example commit
  • Ensure drone builds are green especially tests
  • I will squash the commits before merging

@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-738-session-timeout-sign-in branch 5 times, most recently from baa3f76 to c4061b2 Compare August 23, 2024 13:23
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay marked this pull request as ready for review August 23, 2024 14:18
Copy link
Contributor

@mislam987 mislam987 left a comment

Choose a reason for hiding this comment

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

Logic looks good to me. Just a few code formatting points I noticed.

CHANGELOG.md Outdated Show resolved Hide resolved
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-738-session-timeout-sign-in branch from c4061b2 to d4c73c3 Compare September 4, 2024 13:44
Copy link
Contributor

@mislam987 mislam987 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 to me, nice work!

@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-737-session-timeout-continue-form branch 2 times, most recently from a46f3bb to db0b465 Compare January 9, 2025 17:21
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-738-session-timeout-sign-in branch 2 times, most recently from 0527d97 to c66fe90 Compare January 16, 2025 17:23
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-738-session-timeout-sign-in branch from c66fe90 to bcd163c Compare January 16, 2025 21:44
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-737-session-timeout-continue-form branch from db0b465 to 8bfbc1b Compare January 17, 2025 09:34
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-738-session-timeout-sign-in branch from bcd163c to 0c6d28f Compare January 17, 2025 09:37
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-737-session-timeout-continue-form branch from 8bfbc1b to 5539985 Compare January 17, 2025 10:04
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-738-session-timeout-sign-in branch from 0c6d28f to c14ecab Compare January 17, 2025 10:05
- add showSaveAndExit locals to session-timeout-warning.html to set content to be used by 'save and exit' forms
- add default save-and-exit html template
- set showSaveAndExit locals to true on /dob step in sandbox/index.js for demo purposes.
- add save-and-exit.html to sandbox for demo purposes
- amend sandbox/pages.json to include flag for save and exit content
- add config to customise content save-and-exit page
- make exit and save-and-exit steps customisable
- update readme to include guidance on customising exit and save-and-exit steps
- add relevant tests
- amend sessionDialog.js so it can pick up configured warning text instead of it being hard coded
- amend changelog
- add baseurl to exit href
- add base url to /session-timeout in session-timeout-warning.html
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay force-pushed the HOFF-738-session-timeout-sign-in branch from c14ecab to 332d781 Compare January 17, 2025 10:28
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay merged commit 51641c6 into HOFF-737-session-timeout-continue-form Jan 17, 2025
7 checks passed
@Rhodine-orleans-lindsay Rhodine-orleans-lindsay deleted the HOFF-738-session-timeout-sign-in branch January 17, 2025 10:32
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