-
Notifications
You must be signed in to change notification settings - Fork 44
Move example templates into lib folder (and drop NHS website templates) #409
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
Conversation
|
Hmmmm. Allow me to ask a more fundamental question: how are these examples used (or intended to be used)? Are they meant to be starting points for new pages? Or are they meant to be pages you can copy and paste wholesale to replicate a flow, say from the NHS homepage, to a section of the NHS website, to your service? (Am guessing both!) Does it matter that these templates are likely out-of-date (certainly the case for the NHS homepage). Do these examples need to be kept up to date (urgh)? There’s also something about having a folder of large binary image assets, checked into a repo, and that need to be copied (or possibly in the future, packaged up), which feels like a bit of an anti-pattern. Is the prototype kit repo the right place for these examples? Is it another repo, or maybe with an alongside the documentation? It’d of course be lovely if this kit worked like the GOV.UK one, and these templates were part of a workflow, but given that’s not the case right now, what to do. I’m not sure. Lots of questions! Some of which need answering I think before moving things around. |
|
@paulrobertlloyd those are all good questions that I’ve had too! Currently we’ve also now duplicated the templates so we have 2 copies of them to maintain, in the kit and in the docs! I’ve added nhsuk/nhsuk.service-manual.prototype-kit.docs#60 as a place to discuss the general principle of if/where to add the templates. I was thinking that moving them could be a more immediate stopgap whilst we make a longer-term decision? |
These will no longer be included in the Kit. For now they'll continue to be available on the NHS prototype kit website at https://prototype-kit.service-manual.nhs.uk/page-templates instead.
No longer needed
This is now redundant
|
@paulrobertlloyd @vickytnz @anandamaryon1 @edwardhorsford ok I've updated this PR with some additional changes. It now also deletes the NHS.UK website templates (which we’re leaving on the Prototype Kit website for now), and jQuery. In future we could go further and also delete some of the remaining templates (eg Check your answers or Confirmation page) as they get added to the NHS design systems as patterns. For now, merging this would mean that, of the templates which remain, they’re exclusively either only in the kit itself, or only on the website - so we at least resolve the duplication. We’re also one step closer to having as much of the code as possible within the |
vickytnz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good. I have fixed one broken link in the footer (forgot to PR, oops)
Only thing to think about (but not blocking) - the content examples aren't strictly the same as the NHS website.
I wonder if those pages:
- should have the service title hidden (similar to how it's hidden on GOV.UK prototype kit pages for website stuff)
- maybe should have a bit on the index page to make it clear that they're simplified versions, potentially even with a note to get stuff from the design system or the team. Unless you think that the details on the actual pages are enough.
This is a near-duplicate of `content-page.html`
|
@vickytnz good point. The Also noticed that the "Mini-hub" page is already documented in the Design system: https://service-manual.nhs.uk/design-system/patterns/mini-hub - so perhaps that could also be removed in future. The only thing missing from the Nunjucks code in the Mini-hub page on the design system is |
|
Some good wins in here, removing jQuery, image assets and changing the links to |
edwardhorsford
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should remove jQuery - or at least that should be a separate PR.
Doing so should probably be considered a breaking change - and it does not feel necessary or especially relevant for the purposes of this PR.
@edwardhorsford Good point. Have restored in 16d4dd9. We can remove in a future breaking change release (given it’s no longer used)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can go forward but also needs two more tickets:
- the basic prototype guidance will need to be updated when this codes live as all of the links to templates (for example https://prototype-kit.service-manual.nhs.uk/how-tos/build-basic-prototype/open-prototype-in-editor ) will now be wrong (possibly with a note to older versions)
- there are still inconsistencies with the templates against the design system (for example 'back' instead of 'go back' - these need to be fixed and then also code and screenshots changed in the basic prototype tutorial
The latest release of the kit included a change to move templates into the lib folder nhsuk/nhsuk-prototype-kit#409 this now means that some pages link to /docs/views/templates when it now is /lib/example-templates/ These pages are: https://prototype-kit.service-manual.nhs.uk/how-tos/build-basic-prototype/open-prototype-in-editor https://prototype-kit.service-manual.nhs.uk/how-tos/build-basic-prototype/create-pages (removed link entirely) https://prototype-kit.service-manual.nhs.uk/how-tos/build-basic-prototype/branching https://prototype-kit.service-manual.nhs.uk/page-templates --------- Co-authored-by: Frankie Roberto <[email protected]>
Following discussion in nhsuk/nhsuk-prototype-kit-package#60 and nhsuk/nhsuk.service-manual.prototype-kit.docs#60 this moves the example templates in
/lib/and also drops the NHS.UK website templates (which remain on https://prototype-kit.service-manual.nhs.uk/page-templates for now).This is partly as they’re no longer documentation but purely example page templates, and partly to try and make future updating easier by moving towards having a single folder (currently called
lib) which users could manually update by copying and pasting (or possibly using a script or in future an npm package).I’ve named the new folder with the templates
lib/example-templates.Because the NHS.UK website templates have been dropped, this also means that the
nhs.scsscan be deleted, as can the images used in the NHS website templates, and also jQuery (which resolves #152), which was only used in those templates.Have also updated and simplified the
app.jsfile where I can, although perhaps we can go further.Checklist