From 42217279943563d193b80e60f3727ddf4b886787 Mon Sep 17 00:00:00 2001 From: Joanna Pinto Paul Date: Wed, 24 Apr 2024 13:57:57 +0100 Subject: [PATCH] PLATUI-3013: Added deprecated annotation to CurrencyInput, updated CHANGELOG (#302) --- CHANGELOG.md | 11 ++++++++--- .../uk/gov/hmrc/hmrcfrontend/views/Aliases.scala | 8 ++++++++ .../viewmodels/currencyinput/CurrencyInput.scala | 7 +++++++ .../fixtures/hmrc-frontend/test-fixtures/VERSION.txt | 2 +- project/LibDependencies.scala | 2 +- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75730e6a1..c203d8a66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,15 +8,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/). For compatibility information see `govukFrontendVersion` and `hmrcFrontendVersion` in [LibDependencies](project/LibDependencies.scala) -## [9.9.0] - 2024-04-22 +## [9.9.0] - 2024-04-24 ### Changed -- Compress whitespace in integration tests (test change only) +- Deprecated the `CurrencyInput` / `HmrcCurrencyInput` component. This component is now replaced by using `Input` / `GovukInput` + with prefix of `£`. Examples of the new pattern can be seen at: + - HMRC Design Patterns: https://design.tax.service.gov.uk/hmrc-design-patterns/currency-input/ + - GOV.UK Design System: https://design-system.service.gov.uk/components/text-input/#prefixes-and-suffixes + The `CurrencyInput` / `HmrcCurrencyInput` component will be removed in a future library version. ### Compatible with -- [hmrc/hmrc-frontend v6.15.0](https://github.com/hmrc/hmrc-frontend/releases/tag/v6.15.0) +- [hmrc/hmrc-frontend v6.17.0](https://github.com/hmrc/hmrc-frontend/releases/tag/v6.17.0) - [alphagov/govuk-frontend v5.3.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.3.0) ## [9.8.0] - 2024-04-19 @@ -24,6 +28,7 @@ For compatibility information see `govukFrontendVersion` and `hmrcFrontendVersio ### Changed - Added beforeInput(s) and afterInput(s) options to form groups +- Compress whitespace in integration tests (test change only) ### Compatible with diff --git a/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/Aliases.scala b/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/Aliases.scala index fe3b72512..fd891dde4 100644 --- a/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/Aliases.scala +++ b/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/Aliases.scala @@ -91,6 +91,14 @@ trait Aliases { val ReportTechnicalIssue = viewmodels.reporttechnicalissue.ReportTechnicalIssue type CurrencyInput = viewmodels.currencyinput.CurrencyInput + + @deprecated( + "Use GovukInput template with `£` prefix instead. For examples, please see:\n" + + "- HMRC Design Patterns: https://design.tax.service.gov.uk/hmrc-design-patterns/currency-input/, and \n" + + "- GOV.UK Design System: https://design-system.service.gov.uk/components/text-input/#prefixes-and-suffixes. \n" + + "CurrencyInput component will be removed in a future library version.", + "9.9.0" + ) val CurrencyInput = viewmodels.currencyinput.CurrencyInput type UserResearchBanner = viewmodels.userresearchbanner.UserResearchBanner diff --git a/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/currencyinput/CurrencyInput.scala b/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/currencyinput/CurrencyInput.scala index 89121f084..1ee1c4506 100644 --- a/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/currencyinput/CurrencyInput.scala +++ b/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/currencyinput/CurrencyInput.scala @@ -21,6 +21,13 @@ import uk.gov.hmrc.govukfrontend.views.viewmodels.hint.Hint import uk.gov.hmrc.govukfrontend.views.viewmodels.label.Label import uk.gov.hmrc.govukfrontend.views.viewmodels.errormessage.ErrorMessage +@deprecated( + "Use GovukInput template with `£` prefix instead. For examples, please see:\n" + + "- HMRC Design Patterns: https://design.tax.service.gov.uk/hmrc-design-patterns/currency-input/, and \n" + + "- GOV.UK Design System: https://design-system.service.gov.uk/components/text-input/#prefixes-and-suffixes. \n" + + "CurrencyInput component will be removed in a future library version.", + "9.9.0" +) case class CurrencyInput( id: String = "", name: String = "", diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/VERSION.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/VERSION.txt index 32a4522f9..4e19b1d22 100644 --- a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/VERSION.txt +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/VERSION.txt @@ -1 +1 @@ -6.15.0 \ No newline at end of file +6.17.0 \ No newline at end of file diff --git a/project/LibDependencies.scala b/project/LibDependencies.scala index 6646e6f39..070ca34d6 100644 --- a/project/LibDependencies.scala +++ b/project/LibDependencies.scala @@ -2,7 +2,7 @@ import sbt._ object LibDependencies { val govukFrontendVersion: String = "5.3.0" - val hmrcFrontendVersion: String = "6.15.0" + val hmrcFrontendVersion: String = "6.17.0" val playLanguageVersion: String = "7.0.0" val play28Version = "2.8.20"