govuk_tech_docs 3.2.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of govuk_tech_docs might be problematic. Click here for more details.

Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/publish.yaml +1 -1
  3. data/CHANGELOG.md +26 -7
  4. data/README.md +2 -2
  5. data/example/source/code.html.md +3 -26
  6. data/lib/govuk_tech_docs/contribution_banner.rb +1 -1
  7. data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +3 -3
  8. data/lib/govuk_tech_docs/version.rb +1 -1
  9. data/lib/source/layouts/core.erb +1 -1
  10. data/node_modules/govuk-frontend/govuk/all.js +1548 -311
  11. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +70 -0
  12. data/node_modules/govuk-frontend/govuk/common/index.js +172 -0
  13. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +373 -0
  14. data/node_modules/govuk-frontend/govuk/common.js +138 -3
  15. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -0
  16. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +5 -6
  17. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +754 -36
  18. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -2
  19. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +29 -21
  20. data/node_modules/govuk-frontend/govuk/components/button/button.js +365 -107
  21. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +9 -0
  22. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1092 -109
  23. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +3 -2
  24. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +30 -2
  25. data/node_modules/govuk-frontend/govuk/components/details/details.js +51 -33
  26. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +289 -6
  27. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +13 -23
  28. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +30 -24
  29. data/node_modules/govuk-frontend/govuk/components/header/header.js +59 -11
  30. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +13 -23
  31. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +252 -2
  32. data/node_modules/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
  33. data/node_modules/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  34. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +1 -1
  35. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -12
  36. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +30 -2
  37. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +11 -0
  38. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +1 -3
  39. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +10 -4
  40. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +45 -13
  41. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +1 -1
  42. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +28 -0
  43. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +1 -1
  44. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -5
  45. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +5 -0
  46. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +13 -11
  47. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -2
  48. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  49. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -3
  50. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +16 -9
  51. data/node_modules/govuk-frontend/govuk/i18n.js +390 -0
  52. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +10 -26
  53. data/node_modules/govuk-frontend/govuk/objects/_template.scss +1 -1
  54. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +0 -4
  55. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +56 -12
  56. data/node_modules/govuk-frontend/govuk/settings/_all.scss +1 -0
  57. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +12 -0
  58. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +26 -0
  59. data/node_modules/govuk-frontend/govuk/settings/_spacing.scss +4 -8
  60. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +23 -0
  61. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +12 -0
  62. data/node_modules/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  63. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +20 -6
  64. data/node_modules/govuk-frontend/govuk/tools/_exports.scss +1 -1
  65. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -1
  66. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -1
  67. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +2 -2
  68. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  69. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +21 -0
  70. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +300 -0
  71. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +21 -0
  72. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +7 -0
  73. data/node_modules/govuk-frontend/govuk-prototype-kit/init.scss +12 -0
  74. data/package-lock.json +12 -12
  75. data/package.json +1 -1
  76. metadata +17 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06ad063ddc3de387b2bae379df43d4ecd6996a42bdc1f0472e2eb46b404b5701
4
- data.tar.gz: 23b17f1d49d77303d7acb06be0ee2f30cd8ec9b40407b18689696008bf594b89
3
+ metadata.gz: 1fe53bb05a63a24a2d7d501d04fa172433d89e8f5fcd48bc4fc9313e97325ad0
4
+ data.tar.gz: 4b53d1f86522ae3807c40ba806befd97c5da2b42d92666fde35ac00bc0c89eba
5
5
  SHA512:
6
- metadata.gz: dfff9af883e1eb613f704789bd55f65947309e5df3a7a1d1280f4a28483a55d38200108d9808279d3985e2fd75bdc86adccea94520bb7469a78cdfa654def53c
7
- data.tar.gz: '09ae4a42091646b3850af6e4db030a0912e48a10df7b0db296621cdaa58c5df236c17399374201fe2f4af4bd38ce9525837a0811145cfea5fa380b70c5836541'
6
+ metadata.gz: 1b5bbfc06fe8387ddc6eae181fef27fca01d2afdefa68a7a5833e77d8eeb30e76335dc32fd13ca20501b88a107e8f0dfe3f0a64ba3cd8dcd9cfa1dc73e0c738f
7
+ data.tar.gz: 50751bf31f0ab377dca9618e749b9f8cbc029cf7a096085e8fdcea3d7004f42ce5901703bbb2c3cb11768aed369232226d74764a9347f02a5787b8822a9ef90d
@@ -3,7 +3,7 @@ name: Publish
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - master
6
+ - main
7
7
  workflow_dispatch:
8
8
 
9
9
  concurrency: rubygems
data/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.3.0
6
+
7
+ ### New features
8
+
9
+ There are some steps you should follow as the Technical Documentation Template (TDT) now uses GOV.UK Frontend 4.4.1.
10
+
11
+ 1. Update your documentation site to use the latest template version. You can [follow the TDT guidance on using the latest template version](https://tdt-documentation.london.cloudapps.digital/maintain_project/use_latest_template/).
12
+ 2. Check your documentation site displays correctly. If your site does not display correctly, you can refer to the [GOV.UK Frontend release notes](https://github.com/alphagov/govuk-frontend/releases/) for more information, or [contact the GOV.UK Design System team](https://design-system.service.gov.uk/get-in-touch/).
13
+
14
+ ### Fixes
15
+
16
+ - [#242: Make scrollable area keyboard (and voice) focusable](https://github.com/alphagov/tech-docs-gem/pull/242) (thanks [@colinbm](https://github.com/colinbm))
17
+
18
+ ## 3.2.1
19
+
20
+ ### Fixes
21
+
22
+ - [#296: Fix Nokogiri Node.new deprecation warnings](https://github.com/alphagov/tech-docs-gem/pull/296) (thanks [@timja](https://github.com/timja))
23
+
5
24
  ## 3.2.0
6
25
 
7
26
  ### New features
@@ -412,7 +431,7 @@ which item is selected in the navigation.
412
431
  More info:
413
432
 
414
433
  - https://github.com/alphagov/tech-docs-gem/pull/19
415
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#parent
434
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/frontmatter.md#parent
416
435
 
417
436
  ## 1.2.0
418
437
 
@@ -424,15 +443,15 @@ You can use this when you change a page URL.
424
443
 
425
444
  More info:
426
445
 
427
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/configuration.md#redirects
428
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#old_paths
446
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/configuration.md#redirects
447
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/frontmatter.md#old_paths
429
448
 
430
449
  ### New feature: contribution banner
431
450
 
432
451
  You can now show a block at the bottom of the page that links to
433
452
  the page source on GitHub, so readers can easily contribute back to the documentation.
434
453
 
435
- https://github.com/alphagov/tech-docs-gem/blob/master/docs/configuration.md#show_contribution_banner
454
+ https://github.com/alphagov/tech-docs-gem/blob/main/docs/configuration.md#show_contribution_banner
436
455
 
437
456
  ### New feature: page review system
438
457
 
@@ -440,8 +459,8 @@ An optional page review system to make sure documentation stays up to date.
440
459
 
441
460
  More info:
442
461
 
443
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#last_reviewed_on
444
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#owner_slack
462
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/frontmatter.md#last_reviewed_on
463
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/frontmatter.md#owner_slack
445
464
 
446
465
 
447
466
  ### Better meta tags
@@ -453,7 +472,7 @@ Pages now include better meta tags for search engines, Twitter, Facebook and Sla
453
472
  You can now specify `google_site_verification` in tech-docs.yml. You can use
454
473
  this to verify your site in Google Webmaster tools.
455
474
 
456
- https://github.com/alphagov/tech-docs-gem/blob/master/docs/configuration.md#google_site_verification
475
+ https://github.com/alphagov/tech-docs-gem/blob/main/docs/configuration.md#google_site_verification
457
476
 
458
477
  ## 1.0.0
459
478
 
data/README.md CHANGED
@@ -15,7 +15,7 @@ Find out how to [contribute](https://tdt-documentation.london.cloudapps.digital/
15
15
 
16
16
  This gem uses [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend), part of the [GOV.UK Design System](https://design-system.service.gov.uk/).
17
17
 
18
- We use `npm` to download the govuk-frontend package. To update to a new version, change the version in the [package.json file](blob/master/package.json) and run `npm update`.
18
+ We use `npm` to download the govuk-frontend package. To update to a new version, change the version in the [package.json file](package.json) and run `npm update`.
19
19
 
20
20
  ## Developing locally
21
21
 
@@ -96,7 +96,7 @@ The documentation is [© Crown copyright][copyright] and available under the ter
96
96
  [ogl]: http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
97
97
  [tdt-docs]: https://tdt-documentation.london.cloudapps.digital
98
98
  [tdt-template]: https://github.com/alphagov/tech-docs-template
99
- [tdt-readme]: https://github.com/alphagov/tech-docs-template/blob/master/README.md
99
+ [tdt-readme]: https://github.com/alphagov/tech-docs-template/blob/main/README.md
100
100
  [mmt]: https://middlemanapp.com/advanced/project_templates/
101
101
 
102
102
  [jas]: https://jasmine.github.io/
@@ -10,32 +10,9 @@ A paragraph with a `code` element within it.
10
10
 
11
11
  An example of a table with a `code` element within it.
12
12
 
13
- <div class="table-container">
14
- <table>
15
- <thead>
16
- <tr>
17
- <th style="text-align:left">httpResult</th>
18
- <th style="text-align:left">Message</th>
19
- <th style="text-align:left">How to fix</th>
20
- </tr>
21
- </thead>
22
- <tbody>
23
- <tr>
24
- <td style="text-align:left"><code>400</code></td>
25
- <td style="text-align:left">
26
- <code>[{</code>
27
- <br />
28
- <code>"error": "BadRequestError",</code>
29
- <br />
30
- <code>"message": "Can't send to this recipient using a team-only API key"</code>
31
- <br />
32
- <code>]}</code>
33
- </td>
34
- <td style="text-align:left">Use the correct type of API key</td>
35
- </tr>
36
- </tbody>
37
- </table>
38
- </div>
13
+ | httpResult | Message | How to fix |
14
+ | - | - | - |
15
+ | `400` | `[{`<br>`"error": "BadRequestError",`<br>`"message": "Can't send to this recipient using a team-only API key"`<br>`]}` | Use the correct type of API key |
39
16
 
40
17
  An example of a code block with a long line length
41
18
 
@@ -39,7 +39,7 @@ module GovukTechDocs
39
39
  end
40
40
 
41
41
  def repo_branch
42
- config[:tech_docs][:github_branch] || "master"
42
+ config[:tech_docs][:github_branch] || "master" # TODO: change this to 'main' in a future breaking release
43
43
  end
44
44
 
45
45
  private
@@ -69,7 +69,7 @@ module GovukTechDocs
69
69
  first_child.content = leading_text.sub(/# */, "")
70
70
  end
71
71
 
72
- tr = Nokogiri::XML::Node.new "tr", fragment
72
+ tr = Nokogiri::XML::Node.new "tr", fragment.document
73
73
  tr.children = fragment.children
74
74
 
75
75
  tr.to_html
@@ -95,9 +95,9 @@ module GovukTechDocs
95
95
  # be `defined?`, so we can jump straight to rendering HTML ourselves.
96
96
 
97
97
  fragment = Nokogiri::HTML::DocumentFragment.parse("")
98
- pre = Nokogiri::XML::Node.new "pre", fragment
98
+ pre = Nokogiri::XML::Node.new "pre", fragment.document
99
99
  pre["tabindex"] = "0"
100
- code = Nokogiri::XML::Node.new "code", fragment
100
+ code = Nokogiri::XML::Node.new "code", fragment.document
101
101
  code["class"] = lang
102
102
  code.content = text
103
103
  pre.add_child code
@@ -1,3 +1,3 @@
1
1
  module GovukTechDocs
2
- VERSION = "3.2.0".freeze
2
+ VERSION = "3.3.0".freeze
3
3
  end
@@ -53,7 +53,7 @@
53
53
  </div>
54
54
  <% end %>
55
55
 
56
- <div class="app-pane__content toc-open-disabled">
56
+ <div class="app-pane__content toc-open-disabled" aria-label="Content" tabindex="0">
57
57
  <main id="content" class="technical-documentation" data-module="anchored-headings">
58
58
  <%= yield %>
59
59
  <%= partial "layouts/page_review" %>