Skip to content

Commit 7f11df9

Browse files
authored
Merge pull request #5402 from nhsuk/next
Version 6.4.0
2 parents a7c3c71 + fdeed2c commit 7f11df9

File tree

262 files changed

+5178
-2434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+5178
-2434
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
charset = utf-8
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true

.github/workflows/deploy-application.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,30 @@ jobs:
265265
./.github/send_slack_notification.sh "${{ secrets.SLACK_MAVIS_RELEASES_WEBHOOK_URL }}" "$AWS_CONSOLE_URL" "Running schema migrations attempt $ATTEMPT/$MAX_ATTEMPTS"
266266
fi
267267
268-
aws ecs wait tasks-stopped \
269-
--cluster $cluster_name \
270-
--tasks $TASK_ID
268+
MAX_WAIT_TIME=3600
269+
POLL_INTERVAL=10 # Poll every 10 seconds
270+
ELAPSED=0
271+
272+
while [ $ELAPSED -lt $MAX_WAIT_TIME ]; do
273+
TASK_STATUS=$(aws ecs describe-tasks \
274+
--cluster $cluster_name \
275+
--tasks $TASK_ID \
276+
--query 'tasks[0].lastStatus' \
277+
--output text)
278+
279+
if [ "$TASK_STATUS" = "STOPPED" ]; then
280+
echo "Task has stopped"
281+
break
282+
fi
283+
284+
sleep $POLL_INTERVAL
285+
ELAPSED=$((ELAPSED + POLL_INTERVAL))
286+
done
287+
288+
if [ $ELAPSED -ge $MAX_WAIT_TIME ]; then
289+
echo "ERROR: Migration task did not complete within $MAX_WAIT_TIME seconds."
290+
exit 1
291+
fi
271292
272293
EXIT_CODE=$(aws ecs describe-tasks \
273294
--cluster $cluster_name \

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,4 @@ jobs:
152152
server_types: ${{ inputs.server_types }}
153153
git_ref_to_deploy: ${{ needs.determine-git-sha.outputs.git-sha }}
154154
app_version: ${{ inputs.git_ref_to_deploy == '' && github.ref_name || inputs.git_ref_to_deploy }}
155+
secrets: inherit

.stylelintrc

Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,254 @@
1+
{
2+
"extends": "stylelint-config-gds/scss",
3+
"plugins": ["stylelint-order"],
4+
"rules": {
5+
"order/properties-order": [
6+
[
7+
{
8+
"emptyLineBefore": "threshold",
9+
"properties": ["content", "content-visibility", "quotes"]
10+
},
11+
{
12+
"emptyLineBefore": "threshold",
13+
"properties": ["box-sizing", "display", "visibility"]
14+
},
15+
{
16+
"emptyLineBefore": "threshold",
17+
"properties": ["position", "z-index", "top", "right", "bottom", "left"]
18+
},
19+
{
20+
"emptyLineBefore": "threshold",
21+
"properties": [
22+
"flex",
23+
"flex-basis",
24+
"flex-direction",
25+
"flex-flow",
26+
"flex-grow",
27+
"flex-shrink",
28+
"flex-wrap",
29+
"align-content",
30+
"align-items",
31+
"align-self",
32+
"justify-content",
33+
"order",
34+
35+
"grid",
36+
"grid-area",
37+
"grid-auto-columns",
38+
"grid-auto-flow",
39+
"grid-auto-rows",
40+
"grid-column",
41+
"grid-column-end",
42+
"grid-column-start",
43+
"grid-row",
44+
"grid-row-end",
45+
"grid-row-start",
46+
"grid-template",
47+
"grid-template-areas",
48+
"grid-template-columns",
49+
"grid-template-rows",
50+
51+
"columns",
52+
"column-count",
53+
"column-fill",
54+
"column-gap",
55+
"column-rule",
56+
"column-rule-color",
57+
"column-rule-style",
58+
"column-rule-width",
59+
"column-span",
60+
"column-width",
61+
"row-gap"
62+
]
63+
},
64+
{
65+
"emptyLineBefore": "threshold",
66+
"properties": [
67+
"width",
68+
"min-width",
69+
"max-width",
70+
"height",
71+
"min-height",
72+
"max-height",
73+
74+
"margin",
75+
"margin-top",
76+
"margin-right",
77+
"margin-bottom",
78+
"margin-left",
79+
80+
"padding",
81+
"padding-top",
82+
"padding-right",
83+
"padding-bottom",
84+
"padding-left"
85+
]
86+
},
87+
{
88+
"emptyLineBefore": "threshold",
89+
"properties": ["float", "clear", "overflow", "overflow-x", "overflow-y"]
90+
},
91+
{
92+
"emptyLineBefore": "threshold",
93+
"properties": ["clip", "clip-path", "zoom", "resize"]
94+
},
95+
{
96+
"emptyLineBefore": "threshold",
97+
"properties": [
98+
"table-layout",
99+
"empty-cells",
100+
"caption-side",
101+
"border-spacing",
102+
"border-collapse"
103+
]
104+
},
105+
{
106+
"emptyLineBefore": "threshold",
107+
"properties": [
108+
"list-style",
109+
"list-style-position",
110+
"list-style-type",
111+
"list-style-image"
112+
]
113+
},
114+
{
115+
"emptyLineBefore": "threshold",
116+
"properties": ["transform", "transition", "animation"]
117+
},
118+
{
119+
"emptyLineBefore": "threshold",
120+
"properties": [
121+
"border",
122+
"border-top",
123+
"border-right",
124+
"border-bottom",
125+
"border-left",
126+
127+
"border-width",
128+
"border-top-width",
129+
"border-right-width",
130+
"border-bottom-width",
131+
"border-left-width",
132+
133+
"border-style",
134+
"border-top-style",
135+
"border-right-style",
136+
"border-bottom-style",
137+
"border-left-style",
138+
139+
"border-radius",
140+
"border-top-left-radius",
141+
"border-top-right-radius",
142+
"border-bottom-left-radius",
143+
"border-bottom-right-radius",
144+
145+
"border-color",
146+
"border-top-color",
147+
"border-right-color",
148+
"border-bottom-color",
149+
"border-left-color",
150+
151+
"border-image",
152+
153+
"outline",
154+
"outline-color",
155+
"outline-offset",
156+
"outline-style",
157+
"outline-width"
158+
]
159+
},
160+
{
161+
"emptyLineBefore": "threshold",
162+
"properties": ["pointer-events", "opacity"]
163+
},
164+
{
165+
"emptyLineBefore": "threshold",
166+
"properties": [
167+
"color",
168+
"background",
169+
"background-color",
170+
"background-image",
171+
"background-repeat",
172+
"background-position",
173+
"background-size",
174+
"box-shadow",
175+
"fill",
176+
177+
"mask",
178+
"mask-border",
179+
"mask-border-mode",
180+
"mask-border-outset",
181+
"mask-border-repeat",
182+
"mask-border-slice",
183+
"mask-border-source",
184+
"mask-border-width",
185+
"mask-clip",
186+
"mask-composite",
187+
"mask-image",
188+
"mask-mode",
189+
"mask-origin",
190+
"mask-repeat",
191+
"mask-position",
192+
"mask-size",
193+
"mask-type"
194+
]
195+
},
196+
{
197+
"emptyLineBefore": "threshold",
198+
"properties": [
199+
"font",
200+
"font-family",
201+
"font-size",
202+
"font-style",
203+
"font-variant",
204+
"font-weight",
205+
"font-emphasize",
206+
"font-display",
207+
"src",
208+
209+
"letter-spacing",
210+
"line-height",
211+
"word-spacing",
212+
213+
"text-align",
214+
"text-align-last",
215+
"text-decoration",
216+
"text-decoration-thickness",
217+
"text-decoration-skip-ink",
218+
"text-decoration-skip",
219+
"text-indent",
220+
"text-justify",
221+
"text-overflow",
222+
"text-overflow-ellipsis",
223+
"text-overflow-mode",
224+
"text-rendering",
225+
"text-outline",
226+
"text-shadow",
227+
"text-transform",
228+
"text-wrap",
229+
"word-wrap",
230+
"word-break",
231+
"overflow-wrap",
232+
233+
"text-emphasis",
234+
235+
"vertical-align",
236+
"white-space",
237+
"word-spacing",
238+
"hyphens",
239+
"user-select",
240+
"forced-color-adjust"
241+
]
242+
},
243+
{
244+
"emptyLineBefore": "threshold",
245+
"properties": ["cursor", "-webkit-appearance"]
246+
}
247+
],
248+
{
249+
"emptyLineBeforeUnspecified": "threshold",
250+
"emptyLineMinimumPropertyThreshold": 6
251+
}
252+
]
253+
}
254+
}

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
awscli 2.27.46
2-
hk 1.1.2
2+
hk 1.25.0
33
nodejs 22.15.0
44
pkl 0.28.1
55
postgres 17.2

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ GEM
647647
sidekiq (>= 5.0)
648648
shoulda-matchers (7.0.1)
649649
activesupport (>= 7.1)
650-
sidekiq (8.0.9)
650+
sidekiq (8.0.10)
651651
connection_pool (>= 2.5.0)
652652
json (>= 2.9.0)
653653
logger (>= 1.6.2)

app/assets/javascripts/application.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ import {
33
createAll,
44
isSupported,
55
Button,
6-
Checkboxes,
76
ErrorSummary,
87
Header,
98
NotificationBanner,
109
SkipLink,
1110
} from "nhsuk-frontend";
1211

1312
import { Autocomplete } from "./components/autocomplete.js";
13+
import { UpgradedCheckboxes as Checkboxes } from "./components/checkboxes.js";
1414
import { UpgradedRadios as Radios } from "./components/radios.js";
1515
import { Sticky } from "./components/sticky.js";
16+
import { TimeoutWarning } from "./components/timeoutWarning.js";
1617

1718
// Configure Turbo
1819
Turbo.session.drive = false;
@@ -73,6 +74,10 @@ function initialiseComponents() {
7374
if (!isInitialised("nhsuk-skip-link")) {
7475
createAll(SkipLink);
7576
}
77+
78+
if (!isInitialised("app-timeout-warning")) {
79+
createAll(TimeoutWarning);
80+
}
7681
}
7782

7883
// Initiate components once page has loaded
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { Checkboxes } from "nhsuk-frontend";
2+
3+
export class UpgradedCheckboxes extends Checkboxes {
4+
constructor($root) {
5+
// Promote data-aria-controls attribute to a aria-controls attribute as per
6+
// https://github.com/alphagov/govuk-frontend/blob/88fea750b5eb9c9d9f661405e68bfb59e59754b2/packages/govuk-frontend/src/govuk/components/checkboxes/checkboxes.mjs#L33-L34
7+
const $inputs = $root.querySelectorAll('input[type="checkbox"]');
8+
9+
$inputs.forEach(($input) => {
10+
const targetId = $input.dataset.ariaControls;
11+
12+
// Skip checkboxes without data-aria-controls attributes, or where the
13+
// target element does not exist.
14+
if (!targetId || !document.getElementById(targetId)) {
15+
return;
16+
}
17+
18+
// Promote the data-aria-controls attribute to a aria-controls attribute
19+
// so that the relationship is exposed in the AOM
20+
$input.setAttribute("aria-controls", targetId);
21+
22+
delete $input.dataset.ariaControls;
23+
});
24+
25+
super($root);
26+
}
27+
}

0 commit comments

Comments
 (0)