govuk-prototype-kit icon indicating copy to clipboard operation
govuk-prototype-kit copied to clipboard

Review home-office-kit plugin

Open ruthhammond opened this issue 1 year ago • 3 comments

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

ruthhammond avatar May 25 '23 13:05 ruthhammond

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”)

HannahJMWood avatar Jun 28 '23 12:06 HannahJMWood

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.

BenSurgisonGDS avatar Jun 28 '23 13:06 BenSurgisonGDS

Is this just about namespacing in which case we can meet and agree on a preliminary rule for that

joelanman avatar Jul 11 '23 12:07 joelanman