Frontend currently mainly has JavaScript information in 3 pages:
Import CSS, assets and JavaScript
Configure components with JavaScript
JavaScript API Reference
Discuss and decide what content changes are needed and in which pages they should be. Also, discuss the potential for a new page that either brings together the JavaScript info spread across the pages or is specifically about 'Initialising JavaScript'.
Then:
Draft content changes into agreed locations
Update cross-links as needed
Review and publish as part of v5
Why
This is part of the changes to the v5 release
Who needs to know about this
Tech writer, developers
Done when
[x] Arrange team meeting to discuss JavaScript content updates
[ ] Add new caveat to “Import JavaScript using a bundler” to mention the downsides of bundling using require()
This should appear after or within the “bundler that uses CommonJS like Browserify” paragraph
Caveats such as:
We ship UMD not CommonJS so no tree shaking is possible.
When require-ing separate components you’ll see library code duplicated
[ ] Add new heading regarding legacy support for UMD and window globals
Put the section below “Select and initialise part of a page” heading. Include an example of the Rails asset pipeline
[ ] Add the inline snippet for .govuk-frontend-supported to the “Add the JavaScript file to your HTML” example
The current example doesn’t include the snippet:
...
This change ensures we’re consistent with “Get the JavaScript working” (Get started) and “Check an example page” (Install using precompiled files) HTML examples which both include the snippet already on [the v5 preview](https://deploy-preview-332--govuk-frontend-docs-preview.netlify.app/)
Capturing Romaric's action list
[x] Writing up whatever we decide the public API of our errors to be
What
Frontend currently mainly has JavaScript information in 3 pages:
Discuss and decide what content changes are needed and in which pages they should be. Also, discuss the potential for a new page that either brings together the JavaScript info spread across the pages or is specifically about 'Initialising JavaScript'.
Then:
Why
This is part of the changes to the v5 release
Who needs to know about this
Tech writer, developers
Done when
Capturing Colin's action list
new Component()
~Consider adding a comment about errors that are thrown~ https://github.com/alphagov/govuk-frontend-docs/commit/c1f7a3ca50d4c7be814d87e40bf39c3355702dbcCapturing Romaric's action list