Skip to content

chore: update design system docs#4109

Open
marianayovcheva wants to merge 1 commit into
mainfrom
chore/form-fields-docs-update
Open

chore: update design system docs#4109
marianayovcheva wants to merge 1 commit into
mainfrom
chore/form-fields-docs-update

Conversation

@marianayovcheva
Copy link
Copy Markdown
Contributor

@marianayovcheva marianayovcheva commented May 14, 2026

This takes into account the updates in v9.1.0 named additional_attributes was deprecated. Other named parameters like collection, text_method and value_method have also been deprecated.

Having read https://github.com/citizensadvice/design-system/blob/main/contributing/adr/2025-11-28-deprecate-form-components.md I was also contemplating removing the "View component version" section of the docs for the form elements or adding a bit of text to discourage users from going for that option. However, I've decided not to do it as part of this PR so that this decision is kept separate. Also, it might be too early to do it and worth waiting until we officially deprecate the view components version of the form fields (or move them to Legacy as per the suggestion in #4049). In any case, opinions/ideas welcome!

@marianayovcheva marianayovcheva requested a review from a team as a code owner May 14, 2026 15:13
@marianayovcheva marianayovcheva requested a review from akamike May 14, 2026 15:13
<%% end %>
```

The `:value_method` and `:text_method` parameters are methods to be called on each member of `collection`. The return values are used as the value attribute and contents of each checkbox.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed this but happy to add some text if it's still useful to have a line about the id and the name.

@marianayovcheva marianayovcheva force-pushed the chore/form-fields-docs-update branch from 570da2a to 8da6e52 Compare May 14, 2026 15:19
This takes into account the updates in v9.1.0 named `additional_attributes` was deprecated.
Other named parameters like `collection`, `text_method` and `value_method` have also been deprecated.
@marianayovcheva marianayovcheva force-pushed the chore/form-fields-docs-update branch from 8da6e52 to 97f3e13 Compare May 14, 2026 15:23
@marianayovcheva marianayovcheva added the docs preview If this is added a preview version of the docs site will be deployed label May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Netlify deployed citizens-advice-design-system as draft

https://6a05ea2d2365eb00b484e72c--citizens-advice-design-system.netlify.app

Copy link
Copy Markdown
Contributor

@davidrapson davidrapson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 Thank you for picking this up. I'm keen to drop the view component parts of the docs for forms sooner rather than later but agree doesn't need to be in this PR

Comment on lines +213 to +214
:id,
:name,
Copy link
Copy Markdown
Contributor

@davidrapson davidrapson May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh just noticed these should be :last, :first as the collection is still an array in the examples. Just in case people copy and paste this as part of running through the guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs preview If this is added a preview version of the docs site will be deployed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants