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

Consider what to do with the templates #60

Open
frankieroberto opened this issue Nov 2, 2024 · 9 comments
Open

Consider what to do with the templates #60

frankieroberto opened this issue Nov 2, 2024 · 9 comments
Labels
Content Improvements or additions to documentation

Comments

@frankieroberto
Copy link
Contributor

Currently the templates are shipped with the prototype kit but are also on the documentation website.

We should consider where the best place to put them is, and how best to describe how to use them.

@anandamaryon1
Copy link
Contributor

Interested in this, have chatted with nhs.uk about this, since most of the templates are for the website. One of their designers is working on their own set of more up-to-date templates.

I feel that the templates in the prototype kit should be very generic, and the specific page templates for the nhs.uk website should be a separate package, maintained by nhs.uk teams, that can be added as an extension (but not sure how this works technically).

Same could be said for the NHS App.

@davidhunter08
Copy link
Contributor

I'm also interested in this (from an NHS App perspective). At the moment we have an NHS App prototype, cloned from the prototype kit, with added NHS App components, pages etc. The NHS App has 10 teams, 3 of those teams are currently prototype in code by creating a branch off (or cloning) the NHS App prototype.

This all becomes a bit messy when trying to update, align things. Ideally I'd like to find a better way for NHS App teams to use the prototype kit with the NHS App stuff, as our ambition is to have all 10 NHS App teams prototyping in code.

My current thinking is to add NHS App page templates to the NHS App frontend, so people can plug in (NPM install) all the NHS App stuff into their prototype. So in essence, a designer working on the NHS App would just clone the latest NHS prototype kit version and add the extra NHS App bits. Thus no need for one specific NHS App prototype, making everything a little easier to use and maintain.

It looks like HMRC use this approach with their templates.

frankieroberto added a commit to nhsuk/nhsuk-prototype-kit that referenced this issue Nov 11, 2024
This removes the duplicate install guide, how to guides, branching examples and passing data from page to page examples, and the documentation homepage from kit.

These guides are all now hosted separately in on the [NHS.UK prototype kit](https://prototype-kit.service-manual.nhs.uk) website and maintained within a separate repository: [nhsuk.service-manual.prototype-kit.docs](http://github.com/nhsuk/nhsuk.service-manual.prototype-kit.docs).

This is intended to allow us to update the guidance more frequently (outside of the prototype kit release cycle). It also means that uses of the kit will always access the most up-to-date versions of the guidance, even if their prototype is a few versions old. 

The one acknowledged downside is that it means you now need to be online to view the guidance, vs having a local copy.

The one bit I’ve not removed is the collection of example page templates. These are also duplicated on the prototype kit website at https://prototype-kit.service-manual.nhs.uk/page-templates - however they might be more useful to have locally, as it’ll be easier to copy-and-paste them.  I've created a separate issue to consider what the best thing to do with the templates is: [#60](nhsuk/nhsuk.service-manual.prototype-kit.docs#60).
@davidhunter08
Copy link
Contributor

nhs-app-prototype

@frankieroberto
Copy link
Contributor Author

@davidhunter08 good plan! We haven't yet entirely figured out the best way to handle regular templates within the kit, but definitely worth feeding the NHS app templates in as part of that - same with the app frontend.

Unlike the govuk prototype kit, the NHS one doesn’t (yet) have quite the same support for 'plugins', but I’m sure we can figure something out.

@davidhunter08
Copy link
Contributor

Thanks @frankieroberto, sounds good. I'm more than happy to be part of any future discussions.

@vickytnz
Copy link
Contributor

Agree with all of the above - and the extra thing is that I think templates are an excellent fit for the design system (maybe this is a tangent but I'm confused that the actual NHS frontend has example components https://nhsuk.github.io/nhsuk-frontend/pages/examples.html, for GOV.UK their frontend is just about installation https://frontend.design-system.service.gov.uk/ and examples are in the the design system?)

My suggestion is:

  • actual templates are in the frontend
  • copy and paste templates are in the design system as a point of truth (GOV.UK design system does this well both with basic page templates https://design-system.service.gov.uk/styles/page-template/ but also patterns like question pages https://design-system.service.gov.uk/patterns/question-pages/ )
  • prototype kit templates are a value add in a general templates folder but more of a fallback as the main code is in the design system - if I had to choose between putting templates in the design system or the prototype kit, I'd do the design system first and the prototype kit second

@frankieroberto
Copy link
Contributor Author

frankieroberto commented Nov 17, 2024

Okay, so since discussing this, I think we’ve reached a consensus that the main templates could live in the NHS.UK service manual as new pattern pages. They could also be included in the kit for convenience, but this would have to be weighed against the maintenance burden of having them in 2 places, and possibly it’s not that much of advantage given you’d be copying-and-pasting them anyway?

The NHS.UK page templates need a bit more thought. Potentially they could be a plugin in future, but the kit isn’t really set up for plugins at the moment. In the shorter term perhaps they rolled into a 'Prototype journeys starting on the NHS.UK website' guide, which could either contain the HTML and CSS to copy, or explain how to copy-and-paste it from the NHS website itself (which is a bit clunky but usually works)?

Here’s a possible incremental route forward:

  1. Remove the 'Content page' and 'Transactional journeys' templates from Page templates in the docs, and replace with content explaining that there are some templates within the kit you can use to get started, by copying and pasting them into app/views folder. Done in Remove basic templates from website #137

  2. Move all the example templates in the kit itself from /docs to /lib/example-templates or similar (mainly to allow us to drop the docs folder and make upgrading easier).

  3. Remove the NHS website page templates and CSS from the kit itself (but keep them on the documentation website) - this means we don’t have to update the kit every time the NHS website updates (or forget to)

  4. Create new pattern pages in the Design System for Check answers, Question pages, Confirmation pages and Start pages - most of these are in the backlog already and linked from EPIC: Add patterns

  5. As the templates get added to the Design System as patterns, remove them from the kit (possibly? or keep them as a duplicate)

  6. Improve the NHS website templates on the Prototype kit website so that you get a preview in an iframe and a box with the code with buttons to copy and paste it? Or alternatively link out to a plugin or npm package or any documentation from the NHS.UK website team on their website-only patterns and components?

Thoughts welcome. I don’t think we have to have a completely 100% endstate agreed, but a rough idea might be helpful - and it’d be good to make some steps towards it to undo the current duplication of templates in 2 separate repositories.

cc @vickytnz @anandamaryon1 @sarawilcox @edwardhorsford @paulrobertlloyd and anyone else interested!

@anandamaryon1
Copy link
Contributor

This sounds good @frankieroberto and @vickytnz, agree that the templates should move over to the design system and I think they should only exist there, since it's copy and paste either way, I don't think having them in the kit itself is much help and just adds risk that they're out of date.

Ideally the NHS website templates would be a separate package, same as NHS app templates and components, which can be added as an optional extra. I'm not sure how this works technically, and I think NHS.UK team will need help to implement this.

Leaving the prototype kit with no templates, just an index page with some instructions and links, and maybe a black page (which imports the minimal layout)?

@anandamaryon1
Copy link
Contributor

These steps seem like a good move forward @frankieroberto 👍

@vickytnz vickytnz added the Content Improvements or additions to documentation label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content Improvements or additions to documentation
Development

No branches or pull requests

4 participants