Skip to content

Commit d7fcd1d

Browse files
authored
Docs additions (#34)
* Add link to live demo * Add static assets and env vars * Clean up env vars * Replace TODOs with content
1 parent 029fa95 commit d7fcd1d

File tree

4 files changed

+37
-12
lines changed

4 files changed

+37
-12
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ It is designed to be embedded in the frontend of a digital service and provide a
1818

1919
## Demo of DXT
2020

21-
TODO: Link to CDP exemplar
21+
If you are within the Defra network, [see a live demo](https://forms-engine-plugin-example-ui.dev.cdp-int.defra.cloud/example-form).
22+
23+
If you aren't within the Defra network, [see our example UI and run it locally](https://github.com/DEFRA/forms-engine-plugin-example-ui).
2224

2325
## Installation
2426

docs/GETTING_STARTED.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,39 @@ await server.start()
102102

103103
## Step 3: Handling static assets
104104

105-
TODO
105+
1. [Update webpack to bundle the DXT application assets (CSS, JavaScript, etc)](https://github.com/DEFRA/forms-engine-plugin-example-ui/pull/1/files#diff-1fb26bc12ac780c7ad7325730ed09fc4c2c3d757c276c3dacc44bfe20faf166f)
106+
2. [Serve the newly bundled assets from your web server](https://github.com/DEFRA/forms-engine-plugin-example-ui/pull/1/files#diff-e5b183306056f90c7f606b526dbc0d0b7e17bccd703945703a0811b6e6bb3503)
107+
108+
DXT plans to prefix to these asset paths to prevent collisions with your assets. Contact [#defra-forms-support](https://defra-digital-team.slack.com) if this is a blocker for you.
106109

107110
## Step 4: Environment variables
108111

109-
TODO
112+
Blocks marked with `# FEATURE: <name>` are optional and can be omitted if the feature is not used.
113+
114+
```shell
115+
# START FEATURE: Phase banner -- supports `https://` and `mailto:` links in the feedback link
116+
FEEDBACK_LINK=http://test.com
117+
# END FEATURE: Phase banner
118+
119+
# START FEATURE: DXT -- used if using DXT's infrastructure to store your forms and file uploads
120+
MANAGER_URL=http://localhost:3001
121+
DESIGNER_URL=http://localhost:3000
122+
SUBMISSION_URL=http://localhost:3002
123+
124+
# S3 bucket and URL of the CDP uploader. Bucket is owned by DXT, uploader is your service's URL.
125+
UPLOADER_BUCKET_NAME=my-bucket
126+
UPLOADER_URL=http://localhost:7337
127+
# END FEATURE: DXT
128+
129+
# START FEATURE: GOV.UK Notify -- used if using DXT's default GOV.UK Notify email sender
130+
NOTIFY_TEMPLATE_ID="your-gov-notify-api-key"
131+
NOTIFY_API_KEY="your-gov-notify-api-key"
132+
# END FEATURE: GOV.UK Notify
133+
134+
# START FEATURE: Google Analytics -- if enabled, shows a cookie banner and includes GA on the cookies/privacy policy
135+
GOOGLE_ANALYTICS_TRACKING_ID='12345'
136+
# END FEATURE: Google Analytics
137+
```
110138

111139
## Step 5: Creating and loading a form
112140

@@ -120,8 +148,4 @@ These files are called `Form definitions` and are built up of:
120148
- `conditions` - used to conditionally show and hide pages and
121149
- `lists` - data used to in selection fields like [Select](https://design-system.service.gov.uk/components/select/), [Checkboxes](https://design-system.service.gov.uk/components/checkboxes/) and [Radios](https://design-system.service.gov.uk/components/radios/)
122150

123-
The [types](https://github.com/DEFRA/forms-designer/blob/main/model/src/form/form-definition/types.ts), `joi` [schema](https://github.com/DEFRA/forms-designer/blob/main/model/src/form/form-definition/index.ts) and the [examples](test/form/definitions) folder are a good place to learn about the structure of these files.
124-
125-
TODO - Link to wiki for `Form metadata`
126-
127-
TODO - Link to wiki for `Form definition`
151+
To understand the full set of options available to you, consult our [schema documentation](https://defra.github.io/forms-engine-plugin/schemas/). Specifically, the [form definition schema](https://defra.github.io/forms-engine-plugin/schemas/form-definition-v2-payload-schema).

docs/PLUGIN_OPTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The forms plugin is configured with [registration options](https://hapi.dev/api/
1515

1616
## Services
1717

18-
TODO
18+
See [our services documentation](./features/code-based/CUSTOM_SERVICES.md).
1919

2020
## Custom controllers
2121

docs/features/code-based/PAGE_VIEWS.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Templates and views
22

3-
## Extending the default layout
4-
5-
TODO
3+
> [!NOTE]
4+
> DXT currently handles the page layout internally within the plugin and cannot be customised. We plan to offer this customisation as a feature, please contact us on Slack if this is urgent for you.
65
76
To override the default page template, vision and nunjucks both need to be configured to search in the `forms-engine-plugin` views directory when looking for template files.
87

0 commit comments

Comments
 (0)