alphagov / govuk-prototype-kit

Rapidly create HTML prototypes of GOV.UK services
https://prototype-kit.service.gov.uk
MIT License
305 stars 236 forks source link

MOJ Frontend issues #1823

Open joelanman opened 1 year ago

joelanman commented 1 year ago

https://design-patterns.service.justice.gov.uk/get-started/prototyping/

  1. These instructions are slightly wrong:

add window.MOJFrontend.initAll() to app/assets/javascripts/application.js below the line doing the same for GOVUKFrontend

(there is no line for GOVUKFrontend)

  1. It requires jQuery

npm install jquery

  1. It would be better as a plugin - and this would avoid having to do the instructions in number 1 at all

I wonder if we can work with them to improve?

gregtyler commented 1 year ago

Thanks Joe, we'll take a look into how we can integrate with the latest version of the kit better. Sounds like we probably need to extend our plugin config file a bit :)

joelanman commented 1 year ago

oh sorry if you have a config then it is a plugin already, I didn't realise. It might need an update to avoid the init but I'll check with the rest of the team. Otherwise you just need to tell people to install jquery - its no longer in the kit by default in v13. You can just run npm install jquery and we do the rest.

gregtyler commented 1 year ago

We believe this should be fixed in v1.6.6 of the MOJ Pattern Library where we're now using a packaged file that includes its own jQuery distro, and also an init.js script to automatically initialise the components.