Skip to content

Add option to use GOV.UK Design System components#443

Merged
JC-DSIT merged 4 commits into
release/v6-1-0-betafrom
enable-design-system-components
Apr 3, 2026
Merged

Add option to use GOV.UK Design System components#443
JC-DSIT merged 4 commits into
release/v6-1-0-betafrom
enable-design-system-components

Conversation

@JC-DSIT
Copy link
Copy Markdown
Contributor

@JC-DSIT JC-DSIT commented Mar 17, 2026

What’s changed

I have added a custom extension and renderer to load in gov.uk nunjucks components. They will call these in the same way documented on the design system documentation.

The extension will recogniser any function call that has the prefix govuk and pass the call and any data to the renderer. If the template is not known then the relevant error will be passed back up the chain.

Users can disable this by setting adding

enable_govuk_components: false in config/tech-docs.yaml.

Identifying a user need

There are examples around existing tech docs of users creating their own hard coded copies of gov.uk extensions for example:

There are others, and likely ones that we don't have visibility of.

These do not get updated with new releases of the design system, and need manul maintenance.

This will expand the tech-docs-gem to enable using user and accessibility tested components, while discouraging custom html. It also supports consistent gov.uk documentation, while enabling flexibility to create templates that better suit individual requirements.

And if nothing else, we say we do it here but at the moment, we don't...

@JC-DSIT JC-DSIT marked this pull request as draft March 17, 2026 16:32
@JC-DSIT JC-DSIT marked this pull request as ready for review March 23, 2026 16:57
@JC-DSIT JC-DSIT linked an issue Mar 24, 2026 that may be closed by this pull request
JC-DSIT added 2 commits March 31, 2026 15:05
# Conflicts:
#	CHANGELOG.md
#	lib/govuk_tech_docs/version.rb
#	package-lock.json
@JC-DSIT JC-DSIT linked an issue Mar 31, 2026 that may be closed by this pull request
@JC-DSIT JC-DSIT changed the base branch from main to release/v5-3-0 March 31, 2026 14:19
JC-DSIT added 2 commits April 3, 2026 09:21
# Conflicts:
#	CHANGELOG.md
#	lib/govuk_tech_docs/version.rb
@JC-DSIT JC-DSIT merged commit d082d01 into release/v6-1-0-beta Apr 3, 2026
3 checks passed
@JC-DSIT JC-DSIT deleted the enable-design-system-components branch April 3, 2026 08:38
@JC-DSIT
Copy link
Copy Markdown
Contributor Author

JC-DSIT commented Apr 3, 2026

merged into release 6.1.0.beta branch - #458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release 6.1.0.beta Allow warning_text helper to accept nested content (blocks)

1 participant