govuk-prototype-kit
govuk-prototype-kit copied to clipboard
Review home-office-kit plugin
What
Review the home-office-kit plugin and provide feedback, including things that we think need to be changed.
Linked to PR #2135
Why
So the plugin authors know what they need to do for the plugin to be listed in the 'manage your prototype' section
Who needs to work on this
Developer
Who needs to review this
Team
Done when
- [ ] A review is completed
- [ ] A list of recommendations is drafted and shared with the GOV.UK Prototype Kit team
- [ ] The recommendations are fed back to the author
- [ ] We use this review to create a template for future plugin reviews
Review results:
-
ran the plugin validator to check the config, no issues were found with it
-
namespacing does not seem to be consistent
- css is namespaced “hods"
- nunjucks macros are name spaced "home-office-kit”
- nunjucks paths are not namespaced (eg. they are just "/layouts" and "/macros”)
I don't know if we have this as a requirement, but I think the script within the script tag in their templates should be a callback wrapped within a call to window.GOVUKPrototypeKit.documentReady()
eg:
<script>
window.GOVUKPrototypeKit.documentReady(() => {
/* their script code goes here */
})
</script>
This is to make sure the kit is ready before the script is executed.
Is this just about namespacing in which case we can meet and agree on a preliminary rule for that