govuk-prototype-kit
govuk-prototype-kit copied to clipboard
Add settings page
What
At the moment if a user wants to change settings they have to do so in config.json
. As we're adding opt-in support for Markdown we've got an opportunity to make settings more visible and easier to set.
Why
As we add more settings it would be good to give the user a simple way to use them. Having a settings page means that we can include descriptions of what the settings mean etc. and save them from having to touch config.json
.
Who needs to work on this
- Designer
- Developer
Who needs to review this
- Designer
- Developer
Done when
- [ ] We know what settings we want to keep/expose
- [ ] Design for settings
- [ ] Design is tested with users
- [ ] The settings page exists
- [ ] The Service name can be set in the settings page
Other
Related:
https://github.com/alphagov/govuk-prototype-kit/issues/470
Some thoughts on this:
Maybe Settings could be what we were previously discussing as Globals?
Maybe an api could be:
Backend
govukPrototypeKit.settings['serviceName']
Frontend
{{ settings['serviceName'] }}
We need to keep an eye on whether people understand changes in the UI need to be committed to Git separately.
JSON supports arrays, objects and nesting - it's very hard to support these in a GUI
port
might be a good one to cover
more thoughts from recent chat:
- it might be best to keep Settings to only a known list of names and values we control
- separately have Globals for users to customise. The core Globals file could be limited to name/value pairs so it could be edited via a GUI, with the option to load in json files for more complex data
- I think serviceName would be best in Globals, as serviceName should be available throughout the front and back end of a prototype (I don't think theres a user need for Settings to be available everywhere like that)
It'd be good for plugins to be able to have settings editable in the UI to control their behaviour too.