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

Update JavaScript content in Frontend for v5 changes #341

Closed
4 of 9 tasks
Tracked by #2186
claireashworth opened this issue Aug 8, 2023 · 2 comments
Closed
4 of 9 tasks
Tracked by #2186

Update JavaScript content in Frontend for v5 changes #341

claireashworth opened this issue Aug 8, 2023 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@claireashworth
Copy link
Contributor

claireashworth commented Aug 8, 2023

What

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

  • Arrange team meeting to discuss JavaScript content updates
  • Draft agreed content
  • Review and publish with v5

Capturing Colin's action list

  • Review every usage of initialising new Component()
    Consider adding a comment about errors that are thrown c1f7a3c
  • 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

@claireashworth claireashworth added the documentation Improvements or additions to documentation label Aug 8, 2023
@claireashworth claireashworth added this to the v5.0 milestone Aug 8, 2023
@claireashworth claireashworth self-assigned this Aug 8, 2023
@claireashworth claireashworth moved this from Backlog 🗄 to Sprint Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Aug 8, 2023
@claireashworth claireashworth moved this from Sprint Backlog 🏃🏼‍♀️ to In progress 📝 in GOV.UK Design System cycle board Sep 5, 2023
@romaricpascal romaricpascal moved this from In progress 📝 to Needs review 🔍 in GOV.UK Design System cycle board Oct 23, 2023
@romaricpascal romaricpascal moved this from Needs review 🔍 to In progress 📝 in GOV.UK Design System cycle board Oct 23, 2023
romaricpascal added a commit that referenced this issue Oct 26, 2023
romaricpascal added a commit that referenced this issue Oct 26, 2023
romaricpascal added a commit that referenced this issue Oct 26, 2023
romaricpascal added a commit that referenced this issue Oct 26, 2023
romaricpascal added a commit that referenced this issue Oct 26, 2023
romaricpascal added a commit that referenced this issue Oct 26, 2023
romaricpascal added a commit that referenced this issue Oct 26, 2023
romaricpascal added a commit that referenced this issue Oct 26, 2023
romaricpascal added a commit that referenced this issue Oct 26, 2023
colinrotherham pushed a commit that referenced this issue Oct 26, 2023
colinrotherham pushed a commit that referenced this issue Nov 1, 2023
colinrotherham pushed a commit that referenced this issue Nov 1, 2023
colinrotherham pushed a commit that referenced this issue Nov 3, 2023
romaricpascal added a commit that referenced this issue Nov 27, 2023
@romaricpascal
Copy link
Member

romaricpascal commented Nov 27, 2023

Remaining changes overlap with #373 and #380. We should probably have one edit addressing these 3 things in one go.

@romaricpascal
Copy link
Member

Closed by #395 , #397, #398 and #404

@romaricpascal romaricpascal moved this from In progress 📝 to Done 🏁 in GOV.UK Design System cycle board Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Development

No branches or pull requests

3 participants