Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually test that v5 works with the Prototype Kit #3484

Closed
1 task done
Tracked by #3947
romaricpascal opened this issue Apr 3, 2023 · 3 comments
Closed
1 task done
Tracked by #3947

Manually test that v5 works with the Prototype Kit #3484

romaricpascal opened this issue Apr 3, 2023 · 3 comments

Comments

@romaricpascal
Copy link
Member

romaricpascal commented Apr 3, 2023

What

Share our strategy for loading JavaScript to the Prototype Kit team and confirm that necessary changes on their side are feasible. Use the change they've made and validate that it works, e.g. build a prototype kit review app.

Add a Prototype Kit example loading the govuk-frontend package using the new Prototype Kit option for loading scripts using type="module".

The approach discussed on Slack would be to create a new workspace that:

  • runs npx govuk-prototype-kit create dist to scaffold a new kit
  • links the govuk-frontend package to use the one in packages with npm link
  • we'd run manually when necessary

Post v5, we can look into added automated tests to check that assets load OK (using Jest + Puppeteer).

Why

We'll be updating how our JavaScript loads in the browser and need to make sure that our approach is compatible with what the Prototype Kit can support.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • We've implemented a Prototype Kit example that lets us check we integrate OK
@36degrees
Copy link
Contributor

The Prototype Kit team have created an issue to allow scripts loaded using the plugin system to use type="module".

@36degrees 36degrees changed the title Validate JavaScript loading strategy for Prototype Kit Manually test that v5 works with the Prototype Kit Jul 11, 2023
@colinrotherham colinrotherham added this to the v5.0 milestone Jul 31, 2023
@colinrotherham colinrotherham self-assigned this Aug 8, 2023
@colinrotherham
Copy link
Contributor

Moving this to blocked for now

The new type="module" feature works great but the kit tries to initialise itself before GOV.UK Frontend is available

  1. Preview branch govuk-frontend installs causes test timeouts
  2. Preview branch govuk-frontend is replaced with v4.5.0 (or latest) in test teardowns
  3. Heroku password pages have hard-coded "allowed" files from GOV.UK Frontend
  4. Prototype management pages and plugins can still run GOV.UK Frontend v4

These aren't necessarily blockers but you can track progress in:

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

No branches or pull requests

4 participants