Skip to content

Fix description of namePrefix for date input#1570

Merged
frankieroberto merged 7 commits into
mainfrom
date-input-name-prefix-description
Nov 6, 2025
Merged

Fix description of namePrefix for date input#1570
frankieroberto merged 7 commits into
mainfrom
date-input-name-prefix-description

Conversation

@frankieroberto
Copy link
Copy Markdown
Contributor

The description of how the namePrefix is out of date, as in #994 we updated it to use square brackets instead of hyphens, for easier use with Express.js based servers (eg the NHS Prototype kit).

Comment thread packages/nhsuk-frontend/src/nhsuk/components/date-input/macro-options.mjs Outdated
@frankieroberto
Copy link
Copy Markdown
Contributor Author

@colinrotherham @anandamaryon1 I've updated this description again, whaddya think?

@frankieroberto frankieroberto temporarily deployed to nhsuk-frontend-pr-1570 September 19, 2025 09:17 Inactive
Comment thread packages/nhsuk-frontend/src/nhsuk/components/date-input/macro-options.mjs Outdated
Copy link
Copy Markdown
Contributor

@sarawilcox sarawilcox left a comment

Choose a reason for hiding this comment

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

Hi @colinrotherham , is there a typo here? "This is used to in the name attribute to group ..."

@colinrotherham
Copy link
Copy Markdown
Contributor

@sarawilcox Yeah there is, do you mind catching up with the review thread?

@sarawilcox
Copy link
Copy Markdown
Contributor

I'm afraid I'm not understanding this very well, @colinrotherham . Maybe we can discuss with @anandamaryon1 at PR review meeting tomorrow.

@frankieroberto frankieroberto temporarily deployed to nhsuk-frontend-pr-1570 September 23, 2025 08:41 Inactive
@sonarqubecloud
Copy link
Copy Markdown

@frankieroberto
Copy link
Copy Markdown
Contributor Author

@sarawilcox I’ve fixed the typo 🤦, thanks.

The short story is that in #994 we (well I) updated the date input component so that the name attributes use the format dateOfBirth[day] instead of dateOfBirth-day as part of a breaking change release, in order to make them a lot easier to use in the prototype kit - but I forgot to update the description in the Nunjucks macro options.

@paulrobertlloyd paulrobertlloyd added date input documentation User requests new documentation or improvements to existing documentation labels Oct 29, 2025
@frankieroberto
Copy link
Copy Markdown
Contributor Author

@anandamaryon1 @colinrotherham could you check this correction to the namePrefix description makes sense to you, and if so approve it?

I can stick an issue on the backlog for a future debate about whether to rename/alias it from namePrefix or not.

I don’t think this needs a changelog entry as it’s purely a documentation wording change, but happy to add one if you think otherwise?

Comment thread packages/nhsuk-frontend/src/nhsuk/components/date-input/macro-options.mjs Outdated
Co-authored-by: Colin Rotherham <work@colinr.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Nov 6, 2025

@frankieroberto
Copy link
Copy Markdown
Contributor Author

@colinrotherham created the issue at #1674.

Ok to approve this now?

@frankieroberto frankieroberto merged commit 5bfd80d into main Nov 6, 2025
13 checks passed
@frankieroberto frankieroberto deleted the date-input-name-prefix-description branch November 6, 2025 19:07
anandamaryon1 pushed a commit that referenced this pull request Nov 25, 2025
The description of how the namePrefix is out of date, as in #994 we updated it to use square brackets instead of hyphens, for easier use with Express.js based servers (eg the NHS Prototype kit).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

date input documentation User requests new documentation or improvements to existing documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants