Skip to content

Commit 4183ba3

Browse files
authored
Merge branch 'main' into adjust-alignment-of-buttons-within-grid
2 parents 908cf64 + 6570c24 commit 4183ba3

28 files changed

+329
-209
lines changed

__snapshots__/layout/_template.spec.js.snap

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,9 +1884,6 @@ exports[`base page template matches the full configuration snapshot 1`] = `
18841884
</div>
18851885

18861886

1887-
1888-
1889-
18901887
<div class="ons-grid__col ons-col-auto ons-u-flex-no-shrink">
18911888

18921889

@@ -1910,7 +1907,7 @@ exports[`base page template matches the full configuration snapshot 1`] = `
19101907

19111908

19121909

1913-
<button type="submit" class="ons-btn ons-u-d-no@2xs@l ons-btn--ghost-dark">
1910+
<button type="submit" class="ons-btn ons-u-d-no@2xs@l ons-btn--ghost">
19141911
<span class="ons-btn__inner"><span class="ons-btn__text">Save and sign out</span><svg class="ons-icon ons-u-ml-2xs" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" focusable="false" fill="currentColor" role="img" aria-hidden="true">
19151912
<path d="M13.85,7.65l-2.5-2.5a.5.5,0,0,0-.71,0,.48.48,0,0,0-.15.36V7h-3a.5.5,0,0,0-.5.5v1a.5.5,0,0,0,.5.5h3v1.5A.49.49,0,0,0,11,11a.48.48,0,0,0,.34-.14l2.51-2.5a.49.49,0,0,0,0-.68Z" transform="translate(-2 -2)"></path>
19161913
<path d="M8.5,14h-6a.5.5,0,0,1-.5-.5V2.5A.5.5,0,0,1,2.5,2h6a.5.5,0,0,1,.5.5V3a.5.5,0,0,1-.5.5h-5v9h5A.5.5,0,0,1,9,13v.5A.5.5,0,0,1,8.5,14Z" transform="translate(-2 -2)"></path>
@@ -1927,7 +1924,6 @@ exports[`base page template matches the full configuration snapshot 1`] = `
19271924

19281925

19291926

1930-
19311927

19321928

19331929

@@ -1976,39 +1972,39 @@ exports[`base page template matches the full configuration snapshot 1`] = `
19761972
<nav class="ons-navigation ons-navigation--main ons-js-navigation" id="main-nav" aria-label="Main menu" data-analytics="header-navigation">
19771973
<ul class="ons-navigation__list">
19781974

1979-
<li class="ons-navigation__item ">
1975+
<li class="ons-navigation__item">
19801976
<a class="ons-navigation__link" href="#0">
19811977

19821978
Service standard
19831979

19841980
</a>
19851981
</li>
19861982

1987-
<li class="ons-navigation__item ons-navigation__item--active">
1983+
<li class="ons-navigation__item ons-navigation__item--active">
19881984
<a class="ons-navigation__link" href="#design-system">
19891985

19901986
Design system
19911987

19921988
</a>
19931989
</li>
19941990

1995-
<li class="ons-navigation__item ">
1991+
<li class="ons-navigation__item">
19961992
<a class="ons-navigation__link" href="#0">
19971993

19981994
Accessibility
19991995

20001996
</a>
20011997
</li>
20021998

2003-
<li class="ons-navigation__item ">
1999+
<li class="ons-navigation__item">
20042000
<a class="ons-navigation__link" href="#0">
20052001

20062002
Brand guidelines
20072003

20082004
</a>
20092005
</li>
20102006

2011-
<li class="ons-navigation__item ">
2007+
<li class="ons-navigation__item">
20122008
<a class="ons-navigation__link" href="#0">
20132009

20142010
Content style guide
@@ -2022,36 +2018,36 @@ exports[`base page template matches the full configuration snapshot 1`] = `
20222018
</div>
20232019

20242020

2025-
<nav class="ons-navigation ons-navigation--sub ons-u-d-no@2xs@l" id="sub-nav" aria-label="Section menu" data-analytics="header-section-navigation">
2021+
<nav class="ons-navigation ons-u-d-no@2xs@l ons-navigation--sub-neutral" id="sub-nav" aria-label="Section menu" data-analytics="header-section-navigation">
20262022
<div class="ons-container ons-container--gutterless@2xs@l">
20272023
<ul class="ons-navigation__list ons-navigation__list">
20282024

20292025
<li class="ons-navigation__item">
2030-
<a class="ons-navigation__link ons-navigation__link" href="#0">
2026+
<a class="ons-navigation__link" href="#0">
20312027

20322028
Guidance
20332029

20342030
</a>
20352031
</li>
20362032

20372033
<li class="ons-navigation__item">
2038-
<a class="ons-navigation__link ons-navigation__link" href="#0">
2034+
<a class="ons-navigation__link" href="#0">
20392035

20402036
Foundations
20412037

20422038
</a>
20432039
</li>
20442040

20452041
<li class="ons-navigation__item">
2046-
<a class="ons-navigation__link ons-navigation__link" href="#0">
2042+
<a class="ons-navigation__link" href="#0">
20472043

20482044
Components
20492045

20502046
</a>
20512047
</li>
20522048

20532049
<li class="ons-navigation__item ons-navigation__item--active">
2054-
<a class="ons-navigation__link ons-navigation__link" href="#patterns">
2050+
<a class="ons-navigation__link" href="#patterns">
20552051

20562052
Patterns
20572053

@@ -2062,7 +2058,7 @@ exports[`base page template matches the full configuration snapshot 1`] = `
20622058
</div>
20632059
</nav>
20642060

2065-
<div class="ons-u-d-no@l">
2061+
<div class="ons-u-d-no@l ons-navigation--neutral">
20662062

20672063

20682064

@@ -2095,7 +2091,7 @@ exports[`base page template matches the full configuration snapshot 1`] = `
20952091

20962092
</button>
20972093

2098-
<nav class="ons-navigation ons-navigation--sub-mobile ons-u-d-no ons-js-secondary-nav ons-u-mt-2xs" id="sub-nav--mobile" aria-hidden="true" aria-label="Section menu" data-analytics="header-section-navigation">
2094+
<nav class="ons-navigation ons-navigation--sub-mobile ons-u-d-no ons-js-secondary-nav ons-u-mt-2xs ons-navigation--sub-neutral" id="sub-nav--mobile" aria-hidden="true" aria-label="Section menu" data-analytics="header-section-navigation">
20992095
<div class="ons-container ons-container--gutterless@2xs@l">
21002096
<ul class="ons-navigation__list ons-navigation__list--parent">
21012097
<li class="ons-navigation__item">
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
# Migration Guide from version 72.x.x to 73.0.0
2+
3+
# Introduction
4+
5+
This document outlines the steps needed to migrate to version 73.0.0 of our Design System library from versions 72.x.x. This release includes several breaking-changes that may impact your projects. Please follow this guide to ensure a smooth transition.
6+
7+
## Components
8+
9+
This section will list all the changes that are specific to one component.
10+
11+
### List of components
12+
13+
- [Table of Contents](#table-of-contents)
14+
- [Hero](#hero)
15+
- [Message List](#message-list)
16+
17+
### **_Table of Contents_**
18+
19+
**Renamed table of contents component class**
20+
21+
[**Link to PR**](https://github.com/ONSdigital/design-system/pull/3650)
22+
23+
- **Description of change:** The following classes have been renamed:
24+
25+
- `ons-js-toc-container` to `ons-js-table-of-contents-container`
26+
27+
- **Reason for change:** The `ons-js-toc-container` class has been updated to remove the toc acronym.
28+
29+
This will be a breaking change and will require the update of the old classes name with the new one:
30+
31+
- **Components impacted:**
32+
33+
Table of Contents Component
34+
35+
- **Migration steps:**
36+
37+
1. Locate all instances of the above classes in your codebase.
38+
2. Replace the old class name with the new one.
39+
40+
- <details>
41+
<summary><b>Click for example:</b></summary>
42+
43+
```html
44+
OLD
45+
<div class="ons-grid ons-js-toc-container"></div>
46+
47+
NEW
48+
<div class="ons-grid ons-js-table-of-contents-container"></div>
49+
```
50+
51+
</details>
52+
53+
### **_Hero_**
54+
55+
**Removed breadcrumbs parameter in Hero component**
56+
57+
[**Link to PR**](https://github.com/ONSdigital/design-system/pull/3712)
58+
59+
- **Description of change:** The `breadcrumbs` parameter has been removed from the Hero component.
60+
- **Reason for change:** Following a DAC accessibility issue, breadcrumbs are now positioned outside the Hero to ensure correct structure and semantics.
61+
- **Migration steps:**
62+
63+
1. Locate and Remove all instances of the breadcrumbs parameter within the Hero component.
64+
2. Render the Breadcrumbs component separately, outside of the Hero, as shown in the example below.
65+
66+
- <details>
67+
<summary><b>Click for example</b></summary>
68+
69+
```njk
70+
OLD
71+
{% from "components/hero/_macro.njk" import onsHero %}
72+
73+
{{
74+
onsHero({
75+
"topic": 'Topic',
76+
"title": 'Retail Industry',
77+
"text": 'Sales by retailers',
78+
"breadcrumbs": {
79+
"ariaLabel": 'Breadcrumbs',
80+
"itemsList": [
81+
{
82+
"url": '/',
83+
"text": 'Home'
84+
}
85+
]
86+
},
87+
"variants": 'pale-blue'
88+
})
89+
}}
90+
91+
NEW
92+
{% from "components/hero/_macro.njk" import onsHero %}
93+
{% from "components/breadcrumbs/_macro.njk" import onsBreadcrumbs %}
94+
95+
{% block pageContent %}
96+
{{
97+
onsBreadcrumbs({
98+
"ariaLabel": 'Breadcrumbs',
99+
"variant": "pale-blue",
100+
"itemsList": [
101+
{
102+
"url": '/',
103+
"text": 'Home'
104+
}
105+
]
106+
})
107+
}}
108+
<main id="main-content">
109+
{{
110+
onsHero({
111+
"topic": 'Topic',
112+
"title": 'Retail Industry',
113+
"text": 'Sales by retailers',
114+
"variants": 'pale-blue'
115+
})
116+
}}
117+
</main>
118+
{% endblock %}
119+
```
120+
121+
</details>
122+
123+
### **_Message List_**
124+
125+
**Removed deprecated ariaLabelMsg parameter from Message List Component**
126+
127+
[**Link to PR**](https://github.com/ONSdigital/design-system/pull/3726)
128+
129+
- **Description of change:** The deprecated `ariaLabelMsg` parameter has been removed and replaced with `bodyLabel` in the MessageList component.
130+
- **Reason for change:** Removed deprecated parameter to ensure a single clear label for message body.
131+
- **Migration steps:**
132+
133+
1. Locate all instances of `ariaLabelMsg` used in the Message List component within your codebase.
134+
2. Replace `ariaLabelMsg` with `bodyLabel`.
135+
136+
- <details>
137+
<summary><b>Click for example:</b></summary>
138+
139+
```njk
140+
OLD
141+
{{
142+
onsMessageList({
143+
"ariaLabel": "Message list for ONS Business Surveys",
144+
"ariaLabelMsg": "Body",
145+
"unreadText": "New",
146+
"fromLabel": "From",
147+
"dateLabel": "Sent",
148+
"hiddenReadLabel": "Read the message",
149+
"ariaLabelMetaData": "Message information",
150+
"messages": [
151+
{
152+
"id": "message-list-example-1",
153+
"subject": {
154+
"url": "#0",
155+
"text": "BRES 2016 survey response query"
156+
},
157+
"unread": true,
158+
"fromText": "ONS Business Surveys Team",
159+
"dateText": "Tue 4 Jul 2020 at 7:47",
160+
"body": "Hi Jacky. Thanks for that information. Your figures have allowed us to create more accurate…"
161+
},
162+
{
163+
"id": "message-list-example-2",
164+
"subject":{
165+
"url": "#0",
166+
"text": "BRES 2015 Enquiry on data"
167+
},
168+
"fromText": "Jacky Turner",
169+
"dateText": "Mon 1 Oct 2019 at 9:52",
170+
"body": "Hi Jacky, Thank you for returning the Business Register and Employment Survey (BRES) 2016…"
171+
}
172+
]
173+
})
174+
}}
175+
176+
NEW
177+
{{
178+
onsMessageList({
179+
"ariaLabel": "Message list for ONS Business Surveys",
180+
"bodyLabel": "Body",
181+
"unreadText": "New",
182+
"fromLabel": "From",
183+
"dateLabel": "Sent",
184+
"hiddenReadLabel": "Read the message",
185+
"ariaLabelMetaData": "Message information",
186+
"messages": [
187+
{
188+
"id": "message-list-example-1",
189+
"subject": {
190+
"url": "#0",
191+
"text": "BRES 2016 survey response query"
192+
},
193+
"unread": true,
194+
"fromText": "ONS Business Surveys Team",
195+
"dateText": "Tue 4 Jul 2020 at 7:47",
196+
"body": "Hi Jacky. Thanks for that information. Your figures have allowed us to create more accurate…"
197+
},
198+
{
199+
"id": "message-list-example-2",
200+
"subject":{
201+
"url": "#0",
202+
"text": "BRES 2015 Enquiry on data"
203+
},
204+
"fromText": "Jacky Turner",
205+
"dateText": "Mon 1 Oct 2019 at 9:52",
206+
"body": "Hi Jacky, Thank you for returning the Business Register and Employment Survey (BRES) 2016…"
207+
}
208+
]
209+
})
210+
}}
211+
```
212+
213+
</details>
214+
215+
## Contact Information
216+
217+
For further assistance, please reach out to our support team:
218+
219+
- **Email:** ons.design.system@ons.gov.uk

0 commit comments

Comments
 (0)