govuk_publishing_components 5.2.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +1 -0
- data/app/views/govuk_publishing_components/components/_feedback.html.erb +28 -6
- data/app/views/govuk_publishing_components/components/_related_navigation.html.erb +9 -9
- data/app/views/govuk_publishing_components/components/docs/related_navigation.yml +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc94cc7e07e90e46f3a4bf22d0fa0958a17cc405f49b5fb646cd87a9fb347ab4
|
4
|
+
data.tar.gz: 7de7916bd4f5411c1c2daf3708d1e11b046c0a971424985065fcc0c58f68226f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4b1e28965f84d09984f45bdd218306d4724696a679c75f9b897d79f69eada7857df542851e63f252f63d5ef3b4a7773b0c6d1810e7621299e436d8e0701da42
|
7
|
+
data.tar.gz: d65aa55223fc7979381527c66f837417e9695a400504b9de07ff83fcbf0cba047c5932eaaf5e7906f463ec827d82869c0200af38a2829dce20a8a1d4740c28fa
|
@@ -35,6 +35,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
35
35
|
this.$closeForms.on('click', function(e) {
|
36
36
|
e.preventDefault();
|
37
37
|
toggleForm($(e.target).attr('aria-controls'));
|
38
|
+
trackEvent(getTrackEventParams($(this)));
|
38
39
|
setInitialAriaAttributes();
|
39
40
|
revealInitialPrompt();
|
40
41
|
});
|
@@ -32,8 +32,8 @@
|
|
32
32
|
<%= link_to contact_govuk_path, {
|
33
33
|
class: 'gem-c-feedback__prompt-link gem-c-feedback__prompt-link--wrong js-toggle-form js-something-is-wrong',
|
34
34
|
data: {
|
35
|
-
'track-category' => '
|
36
|
-
'track-action' => '
|
35
|
+
'track-category' => 'Onsite Feedback',
|
36
|
+
'track-action' => 'GOV.UK Open Form'
|
37
37
|
},
|
38
38
|
'aria-controls': 'something-is-wrong',
|
39
39
|
'aria-expanded': false
|
@@ -47,8 +47,19 @@
|
|
47
47
|
</div>
|
48
48
|
</div>
|
49
49
|
|
50
|
-
<form action="/contact/govuk/problem_reports"
|
51
|
-
|
50
|
+
<form action="/contact/govuk/problem_reports"
|
51
|
+
id="something-is-wrong"
|
52
|
+
class="gem-c-feedback__form js-feedback-form js-hidden"
|
53
|
+
data-track-category="Onsite Feedback"
|
54
|
+
data-track-action="GOV.UK Send Form"
|
55
|
+
method="post">
|
56
|
+
<a href="#"
|
57
|
+
class="gem-c-feedback__close gem-c-feedback__js-show js-close-form"
|
58
|
+
data-track-category="Onsite Feedback"
|
59
|
+
data-track-action="GOV.UK Close Form"
|
60
|
+
aria-controls="something-is-wrong"
|
61
|
+
aria-expanded="true"
|
62
|
+
role="button">Close</a>
|
52
63
|
|
53
64
|
<div class="gem-c-feedback__grid-row">
|
54
65
|
<div class="gem-c-feedback__column-two-thirds">
|
@@ -81,8 +92,19 @@
|
|
81
92
|
</div>
|
82
93
|
</form>
|
83
94
|
|
84
|
-
<form action="/contact/govuk/email-survey-signup"
|
85
|
-
|
95
|
+
<form action="/contact/govuk/email-survey-signup"
|
96
|
+
id="page-is-not-useful"
|
97
|
+
class="gem-c-feedback__form gem-c-feedback__form--email gem-c-feedback__js-show js-feedback-form js-hidden"
|
98
|
+
data-track-category="yesNoFeedbackForm"
|
99
|
+
data-track-action="Send Form"
|
100
|
+
method="post">
|
101
|
+
<a href="#"
|
102
|
+
class="gem-c-feedback__close js-close-form"
|
103
|
+
data-track-category="yesNoFeedbackForm"
|
104
|
+
data-track-action="ffFormClose"
|
105
|
+
aria-controls="page-is-not-useful"
|
106
|
+
aria-expanded="true"
|
107
|
+
role="button">Close</a>
|
86
108
|
|
87
109
|
<div class="gem-c-feedback__grid-row">
|
88
110
|
<div class="gem-c-feedback__column-two-thirds">
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% related_content = related_nav_helper.related_navigation %>
|
3
3
|
<% if related_content.map(&:values).flatten.any? || related_nav_helper.other.flatten.any? %>
|
4
4
|
<% random = SecureRandom.hex(4) %>
|
5
|
-
<
|
5
|
+
<div class="gem-c-related-navigation">
|
6
6
|
<h2 id="related-nav-related_items-<%= random %>"
|
7
7
|
class="gem-c-related-navigation__main-heading"
|
8
8
|
data-track-count="sidebarRelatedItemSection" >
|
@@ -13,17 +13,17 @@
|
|
13
13
|
<% section.each do |section_title, links| %>
|
14
14
|
<% if links.any? %>
|
15
15
|
<% section_index += 1 %>
|
16
|
-
<% unless section_title === "related_items" %>
|
17
|
-
<h3 id="related-nav-<%= section_title %>-<%= random %>"
|
18
|
-
data-track-count="sidebarRelatedItemSection"
|
19
|
-
class="<%= related_nav_helper.section_css_class("gem-c-related-navigation__sub-heading", section_title) %>">
|
20
|
-
<%= related_nav_helper.construct_section_heading(section_title) %>
|
21
|
-
</h3>
|
22
|
-
<% end %>
|
23
16
|
<nav role="navigation"
|
24
17
|
class="gem-c-related-navigation__nav-section"
|
25
18
|
aria-labelledby="related-nav-<%= section_title %>-<%= random %>"
|
26
19
|
data-module="toggle">
|
20
|
+
<% unless section_title === "related_items" %>
|
21
|
+
<h3 id="related-nav-<%= section_title %>-<%= random %>"
|
22
|
+
data-track-count="sidebarRelatedItemSection"
|
23
|
+
class="<%= related_nav_helper.section_css_class("gem-c-related-navigation__sub-heading", section_title) %>">
|
24
|
+
<%= related_nav_helper.construct_section_heading(section_title) %>
|
25
|
+
</h3>
|
26
|
+
<% end %>
|
27
27
|
<ul class="gem-c-related-navigation_link-list" data-module="track-click">
|
28
28
|
<% constructed_link_array = [] %>
|
29
29
|
<% section_link_limit = related_nav_helper.calculate_section_link_limit(links) %>
|
@@ -73,5 +73,5 @@
|
|
73
73
|
<% end %>
|
74
74
|
<% end %>
|
75
75
|
<% end %>
|
76
|
-
</
|
76
|
+
</div>
|
77
77
|
<% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
name: Related Navigation
|
2
2
|
description: Component showing related content, including topics, guidance, collections and policies (where applicable)
|
3
3
|
accessibility_criteria: |
|
4
|
-
- Should have a role of 'complementary' as it complements the main page content
|
5
4
|
- Should have a role of 'navigation' on any navigation elements inside the component
|
5
|
+
- Should be marked up as navigation and not as tangential content
|
6
6
|
shared_accessibility_criteria:
|
7
7
|
- link
|
8
8
|
accessibility_excluded_rules:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -198,14 +198,14 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '1.
|
201
|
+
version: '1.6'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: '1.
|
208
|
+
version: '1.6'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: foreman
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,14 +226,14 @@ dependencies:
|
|
226
226
|
requirements:
|
227
227
|
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: '1
|
229
|
+
version: '3.1'
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: '1
|
236
|
+
version: '3.1'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
238
|
name: webmock
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|