Skip to content

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

Merged
jamescarr28 merged 4 commits intorelease/v6-1-0-betafrom
enable-design-system-components
Apr 3, 2026
Merged

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

Conversation

@jamescarr28
Copy link
Copy Markdown
Contributor

@jamescarr28 jamescarr28 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...

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

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