-
Notifications
You must be signed in to change notification settings - Fork 107
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
EPIC: Explore rebuilding NHS.UK frontend directly from GOV #952
Comments
Ooh, interesting idea! I can see some pros and cons, but a discovery would help spell these out. This would also have an impact on the different implementations (ie ruby, react, python, .net, etc) so might be worth reaching out do those teams as part of the discovery work? |
It might be worth reaching out to the team at MOD. They built a design system that is essentially a wrapper around the GOV.UK Design System, and very impressive it is too. Internal requirements dictated their approach, but what’s interesting is that their Nunjucks macros use the Secondly, as part of the discovery, I’d be interested to see how far you could go by configuring GOV.UK Frontend’s global SCSS settings; there’s a high degree of configurability, and my suspicion is that you could get 90% of the way styling common components by changing these default settings. |
From the Ruby side both the components and form builder gems have a My original attempt at supporting the NHS Design System demonstrates how close they were back in early 2020 - only the JavaScript functionality (character counts and appearing fields) didn't work. |
Hi @sarawilcox, looking forward to seeing how this shakes out based on the conversations we had about it when I was on the service manual! |
This is a great development based off the huddle where @Fenwick17 was showing off the possibilities of this approach. I suppose, the benefits are clear in the sense of maintenance and ingesting all the work GOVUK have done. Hopefully, this investigation also highlights the need for better business structure around these so it can be much clear who is ingesting what and how things go back upstream. So the classic (user needs, business needs, technical needs) |
When I was at HM Land Registry, I did the same thing and extended GOV.UK Frontend so we could make adjustments and add new components but still get updates from GOV.UK: https://github.com/LandRegistry/hmlr-frontend |
I created an initial proof of concept for this which shows a general idea of how it could work. Not all components have been adapted, but it gives an idea of the flexibility:
Very rough proof of concept, but it is handy for demo purposes. Updated to govuk v5.1 and got most of the JavaScript working. https://github.com/Fenwick17/nhsuk-frontend-gov/ |
I agree this is something we should explore. It feels like a pragmatic solution given the limited resources at NHS and the much more frequently updated GOV.UK design system, whilst having such similar designs and aims. My expectation is that we'd still maintain the NHS Service manual, but that under the hood some things can be govuk or at least sourced from there. Some questions a spike / discovery might try to address:
|
https://github.com/rowellx68/spike-govuk-to-nhsuk-transformer I've created a spike that uses some code transformers and good old string replace to patch the files. This repository pulls the The script does the following:
The resulting button looks something like this: I've added a few more components as well as setting up the |
Useful background, GOV.UK state in their vision:
|
A discovery to consider the costs and benefits of building the frontend from GOV.
The service manual team has been asked to consider the following proposal.
Proposal
Currently, nhsuk-frontend is a standalone frontend library that was created based on govuk-frontend using its own HTML, CSS and JavaScript.
By merging the two, we can build nhsuk-frontend directly from GOV.UK by pulling in their entire frontend as a package. This will mean we will not require any of our own code for basic things such as grid system and form fields within nhsuk-frontend.
Services would be using govuk-frontend for general service building, but nhsuk-frontend for our custom components such as care cards.
There would be initial work required to create the new version of nhsuk-frontend, but the work to maintain will be drastically reduced and will improve the overall quality of NHS products.
The text was updated successfully, but these errors were encountered: