-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLATUI-2588: Updated hmrc-frontend and TimeoutDialog (#261)
PLATUI-2588: Updated hmrc-frontend and TimeoutDialog
- Loading branch information
1 parent
33bc604
commit 561c0e0
Showing
17 changed files
with
112 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
docs/maintainers/adr/0017-add-timeout-dialog-hide-sign-out-button.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Add timeout-dialog hideSignOutButton | ||
|
||
* Status: accepted | ||
* Date: 2023-11-01 | ||
|
||
Technical Story: PLATUI-2588 | ||
|
||
## Context and Problem Statement | ||
|
||
In the hmrc-frontend Github repository, a PR was raised by the DWP Access to Work team. They wanted to use the | ||
`timeout-dialog` from hmrc-frontend and be able to disable the sign out button or link, as their service doesn't have log | ||
in functionality. More context for this request is on the original Github issue: https://github.com/hmrc/hmrc-frontend/issues/316 | ||
|
||
In discussion with the Design Resources team, it was agreed that: | ||
1. The `hideSignOutButton` functionality be included in the `hmrc-frontend` library for cross-Government teams with a | ||
specific use case | ||
1. The `hideSignOutButton` would NOT be documented or encouraged to HMRC MDTP microservices, because there has not been | ||
a demonstrated need for this change on HMRC. Further research would be required before publicising this a Production | ||
feature for HMRC. | ||
|
||
## Decision Drivers | ||
|
||
* The desire to work collaboratively cross-Government, and make our libraries useful to other departments | ||
* The need to not introduce functionality into the HMRC production libraries that has not been tested for HMRC users | ||
|
||
## Considered Options | ||
|
||
* Do not implement `hideSignOutButton` in `hmrc-frontend` | ||
* Implement `hideSignOutButton` in `hmrc-frontend` via `timout-dialog`, but not in `play-frontend-hmrc` via `HmrcTimoutDialog.scala.html` | ||
* Implement `hideSignOutButton` in both `hmrc-frontend` via `timout-dialog`, and `play-frontend-hmrc` via `HmrcTimoutDialog.scala.html` | ||
|
||
## Decision Outcome | ||
|
||
Chosen option: "Implement `hideSignOutButton` in both `hmrc-frontend` via `timout-dialog`, and `play-frontend-hmrc` via | ||
`HmrcTimoutDialog.scala.html`". Chosen because we want to include the feature in `hmrc-frontend` to support other | ||
Government departments with a proven use case and need, but our design principles and testing strategy begin to break | ||
down when `hmrc-fronted` and `play-frontend-hmrc` diverge. Therefore, this will be added as an undocumented feature | ||
so as not to encourage its use for HMRC production microservices | ||
|
||
### Positive Consequences | ||
|
||
* The `timeout-dialog` in `hmrc-frontend` will be more appropriate to cross-Government departments, reducing a need for | ||
forks or other code duplication | ||
* The `HmrcTimeoutDialog` component will remain aligned with `timeout-dialog` but we will not be publicising the new | ||
feature as part of `play-frontend-hmrc`. | ||
|
||
### Negative Consequences | ||
|
||
* There will be an undocumented and untested feature in `play-frontend-hmrc`. This ADR is intended to document the | ||
reasoning behind this design decision. | ||
|
||
## Links | ||
|
||
* Github issue: https://github.com/hmrc/hmrc-frontend/issues/316 | ||
* `hmrc-frontend` release implementing this change: https://github.com/hmrc/hmrc-frontend/releases/tag/v5.52.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/resources/fixtures/hmrc-frontend/test-fixtures/VERSION.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.51.0 | ||
5.53.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...s/fixtures/hmrc-frontend/test-fixtures/timeout-dialog-hide-sign-out-button/component.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name" : "hmrcTimeoutDialog" | ||
} |
7 changes: 7 additions & 0 deletions
7
...urces/fixtures/hmrc-frontend/test-fixtures/timeout-dialog-hide-sign-out-button/input.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"timeout" : 75, | ||
"countdown" : 74, | ||
"keepAliveUrl" : "?abc=def", | ||
"signOutUrl" : "?ghi=jkl", | ||
"hideSignOutButton" : true | ||
} |
16 changes: 16 additions & 0 deletions
16
...urces/fixtures/hmrc-frontend/test-fixtures/timeout-dialog-hide-sign-out-button/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
<meta name="hmrc-timeout-dialog" | ||
content="hmrc-timeout-dialog" | ||
data-language="" | ||
data-timeout="75" | ||
data-countdown="74" | ||
data-keep-alive-url="?abc=def" | ||
data-sign-out-url="?ghi=jkl" | ||
data-timeout-url="" | ||
data-title="" | ||
data-message="" | ||
data-message-suffix="" | ||
data-keep-alive-button-text="" | ||
data-sign-out-button-text="" | ||
data-synchronise-tabs="" | ||
data-hide-sign-out-button="true"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters