Skip to content

Commit b6aa507

Browse files
committed
Merge branch 'OIT-472-Preparing-for-static-deployment' into OIT-472-preparing-for-static-deployment-merge-check
2 parents d8e5850 + a14c2e5 commit b6aa507

File tree

150 files changed

+4976
-59649
lines changed

Some content is hidden

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

150 files changed

+4976
-59649
lines changed

package-lock.json

Lines changed: 4109 additions & 1359 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"test": "echo \"Error: no test specified\" && exit 1",
1616
"dev": "vite dev",
1717
"build": "vite build && npm run package",
18+
"deploy": "gh-pages -d docs",
1819
"preview": "vite preview",
1920
"prepackage": "tsx scripts/generate-index.ts && node scripts/copy-static-assets-to-lib.js",
2021
"package": "npm run prepackage && svelte-kit sync && svelte-package && publint",
@@ -61,6 +62,7 @@
6162
},
6263
"devDependencies": {
6364
"@sveltejs/adapter-auto": "^3.3.0",
65+
"@sveltejs/adapter-static": "^3.0.8",
6466
"@sveltejs/kit": "^2.16.1",
6567
"@sveltejs/package": "^2.0.0",
6668
"@sveltejs/vite-plugin-svelte": "^4.0.0",
@@ -95,13 +97,15 @@
9597
"@maptiler/sdk": "^3.0.1",
9698
"@ministryofjustice/frontend": "^4.0.1",
9799
"@monaco-editor/loader": "^1.4.0",
100+
"@sveltejs/adapter-netlify": "^5.0.2",
98101
"@types/dompurify": "^3.0.5",
99102
"accessible-autocomplete": "^3.0.1",
100103
"csv-parser": "^3.0.0",
101104
"d3": "^7.9.0",
102105
"decimal.js": "^10.5.0",
103106
"dompurify": "^3.2.5",
104107
"flowbite-svelte-icons": "^2.0.3",
108+
"gh-pages": "^6.3.0",
105109
"govuk-frontend": "^5.9.0",
106110
"labelplacer": "^0.0.0",
107111
"leaflet": "^1.9.4",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Review checklist #1
2+
## For reviewing a newly-added component applying for status `Baseline completed`
3+
4+
A component's status should be updated to `Baseline completed` when the core functionality for the component has been completed and it is ready for use in prototyping.
5+
6+
`Baseline completed` components have not necessarily passed review for responsive design, accessibility, progressive enhancement and real-use testing.
7+
8+
Therefore, developers should be prepared that these components may be modified in the future. Where modifications occur, a new version of the component library will be published and a description of the updates will be included in the change log.
9+
10+
### 1. Merging and pull requests
11+
12+
- [ ] Are there merge conflicts with the `Main` branch? <br>
13+
(developers should check for conflicts before submitting a pull request by merging `Main` into their branch.)
14+
15+
- [ ] Does the pull request clearly detail new dependencies and features, and list any specific checks which they want the review to focus on?
16+
17+
### 2. Is the component self-contained?
18+
19+
- [ ] Does the component have a simple and specific function? <br>
20+
(if the component's function is broad, the developer should consider splitting it into smaller child components.)
21+
22+
- [ ] Does the component fulfil its function without reference to external code or other components? <br>
23+
24+
### 3. Is the component fully-functional and resuable?
25+
26+
- [ ] List the different use cases for the component. Can all of these use cases be realised by adjusting the components props? <br>
27+
(if a use cases requires adjusting props in an opaque way, that use case should be demonstrated as an example.)
28+
29+
### 4. Are the component props well constructed?
30+
31+
- [ ] Are component props sorted into intuitive categories in the demo UI?
32+
33+
- [ ] Have component props been given names which accurately and succintly describe what they do?
34+
35+
- [ ] Have component props been given reasonable default values where appropriate? <br>
36+
(generally, props should have default values unless they are derived from the data pipeline)
37+
38+
- [ ]
39+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Pull request template #1
2+
## For adding a new component with status `Baseline completed`
3+
4+
A component's status should be updated to `Baseline completed` when the core functionality for the component has been completed and it is ready for use in prototyping.
5+
6+
`Baseline completed` components have not necessarily passed review for responsive design, accessibility, progressive enhancement and real-use testing.
7+
8+
Therefore, developers should be prepared that these components may be modified in the future. Where modifications occur, a new version of the component library will be published and a description of the updates will be included in the change log.
9+
10+
---
11+
12+
### New component details:
13+
14+
| Key | Value |
15+
| :--- | :--- |
16+
| Name | Line |
17+
| Folder | data-vis |
18+
| Sub-folder | line-chart |
19+
20+
---
21+
22+
### New component information:
23+
24+
| Key | Value |
25+
| :--- | :--- |
26+
| Description | The `Line` component receives an array of data and a lineFunction and combines them to render an SVG path element. <br><br>This path element can have hover and click events. It can also have markers, which can have their own optional hover and click events. |
27+
| Context | Since the `Line` component renders an SVG path element it must be called within an `<svg>` element. <br><br>The Line component has been designed as a child component of `Lines`, which takes a full dataset and renders a line for each row, allowing developers to customise the styling and behaviour of lines in groups or individually.<br><br>The Lines component has, in turn, been designed as a child component of `LineChart`, which incorporates other components include `Axis` and labelling to form a complete data visualisation. |
28+
29+
---
30+
31+
### Connected components:
32+
33+
| Component | Description of connectivity | Status |
34+
| :--- | :--- | :--- |
35+
| `Lines` | Calls `Line` component to render individual lines. | `In progress` |
36+
| `LineChart` | Calls `Lines` to render all lines. | Not yet developed |
37+
38+
---
39+
40+
### Dependencies:
41+
42+
| Dependency | Description | New dependency? |
43+
| :--- | :--- | :--- |
44+
| None | - | - |
45+
46+
---
47+
48+
### Core features:
49+
50+
| Feature | Description |
51+
| :--- | :--- |
52+
| Description | The Line component |
53+
54+
---
55+
56+
### Requested checks:
57+
58+
| Check | Description |
59+
| :--- | :--- |
60+
| - | - |
61+
62+
---
63+
64+
### Additional notes:
65+
66+

scripts/generate-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const exports = svelteFilesInComponents
5656
// Write the file
5757
writeFileSync(
5858
indexFile,
59-
`// this file is auto-generated — do not edit by hand\nimport "$lib/main.css";\n\n${exports.join("\n")}\n`,
59+
`// this file is auto-generated — do not edit by hand\nimport "./main.css";\n\n${exports.join("\n")}\n`,
6060
);
6161

6262
let logMessage = `Generated ${indexFile} with ${exports.length} unique exports from ./components.`;

src/app.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link
6-
rel="icon"
7-
href="%sveltekit.assets%/assets/images/oflog_crest_white.png"
8-
/>
5+
96
<meta
107
name="viewport"
118
content="width=device-width, initial-scale=1, viewport-fit=cover"

src/lib/components/layout/Footer.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
label: string;
2323
lang?: string;
2424
hrefLang?: string;
25+
onclick?: (event: MouseEvent) => void;
2526
}
2627
2728
interface FooterSection {
@@ -64,8 +65,6 @@
6465
}>();
6566
</script>
6667

67-
Check - hello
68-
6968
<!-- Main footer container -->
7069
<footer class="govuk-footer">
7170
<div class={containerWidth}>
@@ -120,6 +119,7 @@ Check - hello
120119
href={link.href}
121120
lang={link.lang}
122121
hreflang={link.hrefLang}
122+
onclick={link.onclick}
123123
>
124124
{link.label}
125125
</a>

src/lib/components/layout/InternalHeader.svelte

Lines changed: 155 additions & 150 deletions
Large diffs are not rendered by default.

src/lib/components/layout/service-navigation-nested-mobile/HeaderNav.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script lang="ts">
2+
import { base } from "$app/paths";
3+
24
import { onMount } from "svelte";
35
46
// Define navigation item type

src/lib/components/ui/Breadcrumbs.svelte

Lines changed: 0 additions & 198 deletions
This file was deleted.

0 commit comments

Comments
 (0)