govuk_publishing_components 21.41.2 → 21.41.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -17
- data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +0 -6
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +2 -0
- data/app/views/govuk_publishing_components/components/_title.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/docs/character_count.yml +8 -0
- data/app/views/govuk_publishing_components/components/docs/share_links.yml +3 -3
- data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3881a8ec01d25b6d69386c04b1fe186cbefe5e0ec411810f338d6849deec0941
|
4
|
+
data.tar.gz: 9c4887788399aecf0c5fc1322594f1175c6e3605d95a2e7fdf28c2a1e74238c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86e76781b26409df8586549c252a08c09ecf20b682654c44f5362bcb42fbc924ff2ba2dc1ce84fda0207e004d1f4b85d02a4157f8e43d0d9ceb7dc9db81f55ac
|
7
|
+
data.tar.gz: 8d9ef9abbc9fda881f36f988e7713ce7d71682b09f13472c8b5851d2f621282467c189e66dfdcf93c96173bb7dbb78e7ae7701e5382ca2bfa85f48e28a75ccfe
|
data/README.md
CHANGED
@@ -3,11 +3,12 @@ GOV.UK Publishing Components ·
|
|
3
3
|
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
|
4
4
|
=====================
|
5
5
|
|
6
|
-
|
6
|
+
GOV.UK Publishing Components is a Ruby gem to document and distribute components for GOV.UK applications.
|
7
7
|
|
8
|
-
|
9
|
-
-
|
10
|
-
-
|
8
|
+
It provides:
|
9
|
+
- a shared library of components
|
10
|
+
- helpers to generate component payloads
|
11
|
+
- an application to preview components and provide guidance
|
11
12
|
|
12
13
|
Components should be added to this gem if they are required in more than one application, otherwise they should be added to that application.
|
13
14
|
|
@@ -19,7 +20,7 @@ Components should be added to this gem if they are required in more than one app
|
|
19
20
|
- [Develop a component](/docs/develop-component.md)
|
20
21
|
- [Run the component guide](/docs/run-component-guide.md)
|
21
22
|
- [Move a component from an application to the gem](/docs/moving-components-upstream-into-this-gem.md)
|
22
|
-
- [Publish
|
23
|
+
- [Publish/release a new version of the gem](/docs/publishing-to-rubygems.md)
|
23
24
|
|
24
25
|
## Architecture / structure
|
25
26
|
|
@@ -32,18 +33,12 @@ There are 2 types of helper classes in this app:
|
|
32
33
|
- [AppHelpers](lib/govuk_publishing_components/app_helpers). Are exposed to the applications using this gem. They should be documented using RDoc.
|
33
34
|
- [Component Presenters](lib/govuk_publishing_components/presenters). Anything in these classes is only for use within the components. They should be marked `@private`.
|
34
35
|
|
35
|
-
## GOV.UK
|
36
|
+
## Relationship with GOV.UK Design System
|
36
37
|
|
37
|
-
|
38
|
+
GOV.UK Publishing Components also makes [GOV.UK Design System](https://design-system.service.gov.uk/) styles and components available to GOV.UK's frontend applications. This gem consumes [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend) via [NPM](https://www.npmjs.com/).
|
38
39
|
|
39
|
-
|
40
|
-
the
|
41
|
-
|
42
|
-
```
|
43
|
-
npm install
|
44
|
-
```
|
45
|
-
|
46
|
-
You'll need to have installed Node and NPM for this.
|
40
|
+
## Browser and assistive technology support
|
41
|
+
GOV.UK Publishing Components shares the same standards in terms of browser and assistive technology support with [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend#browser-and-assistive-technology-support).
|
47
42
|
|
48
43
|
## Documentation
|
49
44
|
|
@@ -51,7 +46,7 @@ You'll need to have installed Node and NPM for this.
|
|
51
46
|
|
52
47
|
Run the documentation locally with:
|
53
48
|
|
54
|
-
```
|
49
|
+
```sh
|
55
50
|
bundle exec yard server --reload
|
56
51
|
```
|
57
52
|
|
@@ -59,7 +54,7 @@ bundle exec yard server --reload
|
|
59
54
|
|
60
55
|
The default rake task runs all tests:
|
61
56
|
|
62
|
-
```
|
57
|
+
```sh
|
63
58
|
bin/rake
|
64
59
|
```
|
65
60
|
|
@@ -80,6 +80,8 @@ module GovukPublishingComponents
|
|
80
80
|
matches = []
|
81
81
|
|
82
82
|
files = Dir["#{@application_path}/app/views/**/*.html.erb"]
|
83
|
+
files.concat Dir["#{@application_path}/app/**/*.rb"]
|
84
|
+
|
83
85
|
files.each do |file|
|
84
86
|
data = File.read(file)
|
85
87
|
matches << data.scan(/(govuk_publishing_components\/components\/[a-z_-]+)/)
|
@@ -19,9 +19,9 @@
|
|
19
19
|
%>
|
20
20
|
<%= content_tag(:div, class: classes) do %>
|
21
21
|
<% if context %>
|
22
|
-
<
|
22
|
+
<span class="govuk-caption-xl" <%= "lang=#{context_locale}" if context_locale.present? %>>
|
23
23
|
<%= context_href ? link_to(context_text, context_href, class: 'gem-c-title__context-link govuk-link', data: context_data) : context_text %>
|
24
|
-
</
|
24
|
+
</span>
|
25
25
|
<% end %>
|
26
26
|
<h1 class="gem-c-title__text <% if average_title_length %>gem-c-title__text--<%= average_title_length %><% end %>">
|
27
27
|
<%= title %>
|
@@ -32,6 +32,14 @@ examples:
|
|
32
32
|
name: "with-hint"
|
33
33
|
hint: "Please include as much information as possible."
|
34
34
|
maxlength: 10
|
35
|
+
with_id_for_textarea:
|
36
|
+
data:
|
37
|
+
textarea:
|
38
|
+
label:
|
39
|
+
text: "What is your quest?"
|
40
|
+
name: "with-an-id"
|
41
|
+
id: "custom-id"
|
42
|
+
maxlength: 10
|
35
43
|
with_error:
|
36
44
|
data:
|
37
45
|
textarea:
|
@@ -5,9 +5,9 @@ body: |
|
|
5
5
|
|
6
6
|
Real world examples:
|
7
7
|
|
8
|
-
- [News article](/government/news/fast-tracking-uk-innovation-apply-for-business-funding)
|
9
|
-
- [Consultation](/government/consultations/soft-drinks-industry-levy)
|
10
|
-
- [Right to left](/government/news/uk-sets-out-long-term-support-for-stable-secure-and-prosperous-afghanistan-to-2020.ur)
|
8
|
+
- [News article](https://www.gov.uk/government/news/fast-tracking-uk-innovation-apply-for-business-funding)
|
9
|
+
- [Consultation](https://www.gov.uk/government/consultations/soft-drinks-industry-levy)
|
10
|
+
- [Right to left](https://www.gov.uk/government/news/uk-sets-out-long-term-support-for-stable-secure-and-prosperous-afghanistan-to-2020.ur)
|
11
11
|
|
12
12
|
accessibility_criteria: |
|
13
13
|
The share link icons must be presentational and ignored by screen readers.
|
@@ -16,9 +16,9 @@
|
|
16
16
|
<%= csrf_meta_tags %>
|
17
17
|
<%= favicon_link_tag "govuk_publishing_components/favicon-production.png" %>
|
18
18
|
|
19
|
-
<%= yield :application_stylesheet %>
|
20
19
|
<%= stylesheet_link_tag "component_guide/application", media: "screen" %>
|
21
20
|
<%= stylesheet_link_tag "component_guide/print", media: "print" %>
|
21
|
+
<%= yield :application_stylesheet %>
|
22
22
|
|
23
23
|
<%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
|
24
24
|
<%= yield :extra_headers %>
|
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: 21.41.
|
4
|
+
version: 21.41.3
|
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: 2020-04-
|
11
|
+
date: 2020-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|