govuk_web_banners 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e82716ff793fe171809d1ddef0e06de382ddcd923c33e3e563b7a7b870a19eb2
4
- data.tar.gz: 88bb6ac90018c9f77f9b948542b2efa5a325fe219c9c1f30f66758b6560e8736
3
+ metadata.gz: ab3cec374ccf9e3e956e362507af2757c13765c77bb9a4e2510b2877900fb651
4
+ data.tar.gz: c05d7011fedee5ae4284d86db59ee4eb445dcf0025936bb86f571fa0f96fc2c2
5
5
  SHA512:
6
- metadata.gz: 290ab6c009769ace09e30135b865810d4bd92ced7d6093ac28bca5c03f97bdc4a1394a1e2acfb5f7fa2f83c59830d2e186a4d1f7fb0fd3b97d4c603ebf19b063
7
- data.tar.gz: d12209e9cbf9002ed091fb505caa8b536d266be6253269aac7d15ba4393ca59112e97f80a2eaf013a6faad2ec3d27e9eb07d18a2fb5a6bdbbc4685ac0d30fb5e
6
+ metadata.gz: 50b72c49b94db43f065e262665fcd83e1236a04cb7f6a8b87c328d6eaba5017cd817931a10cc965a256ddab17aaa9d45e1d1683789d4d5b076e1808e474f4291
7
+ data.tar.gz: 8b0a90f9fad3934c23e2e018e5da45f4f50515e41903ed45dff543f5a88d9373a54e819a5fa83391eca9ce29757ca3e355bb74515c43f0ac2db8f27aaf9f15d0
data/README.md CHANGED
@@ -206,17 +206,22 @@ banners:
206
206
  - /foreign-travel-advice
207
207
  start_date: 2024/10/21
208
208
  end_date: 2024/11/18
209
+ image: hmrc
209
210
  ```
210
211
 
211
212
  The required keys are `suggestion_text`, `suggestion_link_text`, and
212
213
  `survey_url` (the values to appear in the banner), and `page_paths` (an array of
213
214
  paths on which the banner should be shown).
214
215
 
215
- Optional keys are `name` (an identifying name for this banner, not rendered
216
- anywhere), and `start_date` / `end_date` (the banner becomes active at the start
217
- of the day specified as `start_date`, and stops at the *start* of the day
218
- specified as `end_date`). Start and end dates must be in the YYYY/MM/DD format
219
- parsable as a YAML -> Date.
216
+ Optional keys are:
217
+ - `name` (an identifying name for this banner, not rendered
218
+ anywhere)
219
+ - `start_date` the banner becomes active at the *start* of the day specified.
220
+ Must be in the YYYY/MM/DD format parsable as a YAML -> Date.
221
+ - `end_date` (the banner stops being active at the *start* of the day
222
+ specified). Must be in the YYYY/MM/DD format parsable as a YAML -> Date.
223
+ - `image` an image name supported by the [interaction banner image option](https://components.publishing.service.gov.uk/component-guide/intervention#with_image)
224
+ Currently the only allowable value is `hmrc`.
220
225
 
221
226
  ### Validations on the recruitment banners config file
222
227
 
@@ -6,6 +6,7 @@
6
6
  suggestion_text: recruitment_banner.suggestion_text,
7
7
  suggestion_link_text: recruitment_banner.suggestion_link_text,
8
8
  suggestion_link_url: recruitment_banner.survey_url,
9
+ image: recruitment_banner.image,
9
10
  } %>
10
11
  </div>
11
12
  <% end %>
@@ -1,17 +1,5 @@
1
1
  # Check README.md for how to format this file
2
2
  banners:
3
- - name: HMRC Comms & Guidance banner - Manual 2025/02/18
4
- suggestion_text: "Help improve GOV.UK"
5
- suggestion_link_text: "Sign up to take part in user research (opens in a new tab)"
6
- survey_url: https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_74GjifgnGv6GsMC?Source=BannerList_HMRC_CT-Manual_TAD
7
- page_paths:
8
- # government-frontend
9
- - /hmrc-internal-manuals/business-income-manual/bim30000
10
- - /hmrc-internal-manuals/business-income-manual/bim37000
11
- - /hmrc-internal-manuals/property-income-manual/pim1900
12
- - /hmrc-internal-manuals/property-income-manual/pim2010
13
- start_date: 2025/05/29
14
- end_date: 2025/07/11
15
3
  - name: HMRC banner - Register VAT 2025/07/04
16
4
  suggestion_text: "Help improve GOV.UK"
17
5
  suggestion_link_text: "Sign up to take part in user research (opens in a new tab)"
@@ -90,4 +78,67 @@ banners:
90
78
  - /how-vat-works
91
79
  - /government/collections/vat-forms
92
80
  start_date: 2025/07/04
93
- end_date: 2025/08/01
81
+ end_date: 2025/08/01
82
+ - name: HMRC banner - Comms & Guidance Annual accounts 2025/07/21
83
+ suggestion_text: "Help improve GOV.UK"
84
+ suggestion_link_text: "Sign up to take part in user research (opens in a new tab)"
85
+ survey_url: https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_74GjifgnGv6GsMC?Source=BannerList_HMRC_Corporation_Tax_Annual_accounts
86
+ page_paths:
87
+ # government-frontend
88
+ - /annual-accounts
89
+ start_date: 2025/07/21
90
+ end_date: 2025/08/18
91
+ - name: HMRC banner - Comms & Guidance Small Dormant Companies 2025/07/21
92
+ suggestion_text: "Help improve GOV.UK"
93
+ suggestion_link_text: "Sign up to take part in user research (opens in a new tab)"
94
+ survey_url: https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_74GjifgnGv6GsMC?Source=BannerList_HMRC_Corporation_Tax_Small_Dormant_Companies
95
+ page_paths:
96
+ # government-frontend
97
+ - /annual-accounts/microentities-small-and-dormant-companies
98
+ start_date: 2025/07/21
99
+ end_date: 2025/08/18
100
+ - name: HMRC banner - Comms & Guidance Capital Allowances 2025/07/21
101
+ suggestion_text: "Help improve GOV.UK"
102
+ suggestion_link_text: "Sign up to take part in user research (opens in a new tab)"
103
+ survey_url: https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_74GjifgnGv6GsMC?Source=BannerList_HMRC_Corporation_Tax_Capital_Allowances
104
+ page_paths:
105
+ # government-frontend
106
+ - /capital-allowances
107
+ start_date: 2025/07/21
108
+ end_date: 2025/08/18
109
+ - name: HMRC banner - Comms & Guidance Accounts Limited Company 2025/07/21
110
+ suggestion_text: "Help improve GOV.UK"
111
+ suggestion_link_text: "Sign up to take part in user research (opens in a new tab)"
112
+ survey_url: https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_74GjifgnGv6GsMC?Source=BannerList_HMRC_Corporation_Tax_Annual_Accounts_Limited_Company
113
+ page_paths:
114
+ # government-frontend
115
+ - /prepare-file-annual-accounts-for-limited-company
116
+ start_date: 2025/07/21
117
+ end_date: 2025/08/18
118
+ - name: HMRC banner - Comms & Guidance Running Limited Company 2025/07/21
119
+ suggestion_text: "Help improve GOV.UK"
120
+ suggestion_link_text: "Sign up to take part in user research (opens in a new tab)"
121
+ survey_url: https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_74GjifgnGv6GsMC?Source=BannerList_HMRC_Corporation_Tax_Running_A_Limited_Company
122
+ page_paths:
123
+ # government-frontend
124
+ - /running-a-limited-company
125
+ start_date: 2025/07/21
126
+ end_date: 2025/08/18
127
+ - name: HMRC banner - Comms & Guidance Claiming Loss 2025/07/21
128
+ suggestion_text: "Help improve GOV.UK"
129
+ suggestion_link_text: "Sign up to take part in user research (opens in a new tab)"
130
+ survey_url: https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_74GjifgnGv6GsMC?Source=BannerList_HMRC_Corporation_Tax_Calculating_and_Claiming_a_Loss
131
+ page_paths:
132
+ # government-frontend
133
+ - /guidance/corporation-tax-calculating-and-claiming-a-loss
134
+ start_date: 2025/07/21
135
+ end_date: 2025/08/18
136
+ - name: HMRC banner - Comms & Guidance Compliance Handbook 2025/07/21
137
+ suggestion_text: "Help improve GOV.UK"
138
+ suggestion_link_text: "Sign up to take part in user research (opens in a new tab)"
139
+ survey_url: https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_74GjifgnGv6GsMC?Source=BannerList_HMRC_Corporation_Tax_Internal_Compliance_Handbook
140
+ page_paths:
141
+ # government-frontend
142
+ - /hmrc-internal-manuals/compliance-handbook/ch11400
143
+ start_date: 2025/07/21
144
+ end_date: 2025/08/18
@@ -18,7 +18,7 @@ module GovukWebBanners
18
18
  recruitment_banners_data["banners"].map { |attributes| RecruitmentBanner.new(attributes:) }
19
19
  end
20
20
 
21
- attr_reader :name, :suggestion_text, :suggestion_link_text, :survey_url, :page_paths, :start_date, :end_date
21
+ attr_reader :name, :suggestion_text, :suggestion_link_text, :survey_url, :page_paths, :start_date, :end_date, :image
22
22
 
23
23
  def initialize(attributes:)
24
24
  @name = attributes["name"]
@@ -28,6 +28,7 @@ module GovukWebBanners
28
28
  @page_paths = attributes["page_paths"]
29
29
  @start_date = attributes["start_date"] ? ActiveSupport::TimeZone[GovukWebBanners::TIME_ZONE].parse(attributes["start_date"]) : Time.at(0)
30
30
  @end_date = attributes["end_date"] ? ActiveSupport::TimeZone[GovukWebBanners::TIME_ZONE].parse(attributes["end_date"]) : Time.now + 10.years
31
+ @image = attributes["image"]
31
32
  end
32
33
 
33
34
  # NB: .between? is inclusive. To make it exclude the end date, we set the end range as
@@ -1,3 +1,3 @@
1
1
  module GovukWebBanners
2
- VERSION = "1.3.0".freeze
2
+ VERSION = "1.5.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_web_banners
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  requirements: []
210
- rubygems_version: 3.6.9
210
+ rubygems_version: 3.7.0
211
211
  specification_version: 4
212
212
  summary: A gem to support banners on GOV.UK frontend applications
213
213
  test_files: []