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

Use the new value feature in Frontend #115

Closed
3 tasks
joelanman opened this issue Jul 5, 2022 · 2 comments · Fixed by #123
Closed
3 tasks

Use the new value feature in Frontend #115

joelanman opened this issue Jul 5, 2022 · 2 comments · Fixed by #123
Assignees

Comments

@joelanman
Copy link
Contributor

joelanman commented Jul 5, 2022

Context

GOV.UK Frontend has a new feature to set values in components. We should update the kit/docs (the checked function is covered in the tutorial)

Alternatives

Currently the kit has a function called checked that achieves the same thing. Maybe we can retire it in favour of values

Done when

  • Documentation is updated to refer to values not checked
  • Comms about the change on Slack and mailing list when docs have been updated
  • Raise a new ticket to look at deprecating checked, for example a check in Manage Prototype
@joelanman joelanman added the awaiting triage Needs triaging by team label Jul 5, 2022
@36degrees
Copy link
Contributor

Related proof of concept I put together previously – alphagov/govuk-prototype-kit#1316

I think all form components except date input could be extended in the same way to pre-populate values from the data object.

@Izabela-16 Izabela-16 removed the awaiting triage Needs triaging by team label Sep 6, 2022
@ruthhammond ruthhammond transferred this issue from alphagov/govuk-prototype-kit Dec 13, 2022
@joelanman joelanman self-assigned this Dec 16, 2022
@joelanman
Copy link
Contributor Author

joelanman commented Dec 16, 2022

We still need checked if people write html instead of using nunjucks macros - possibly we can replace with raw nunjucks like

{{ 'checked' if data['fruit'] == 'apples' ] }}

not sure if you can write something similar for checkboxes (arrays)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants