Improve how we display long lists of options for Welsh translations - #3175
Open
stephencdaly wants to merge 6 commits into
Open
stephencdaly wants to merge 6 commits into
stephencdaly wants to merge 6 commits into
Conversation
stephencdaly
force-pushed
the
improve-how-we-display-long-lists-for-welsh-translations
branch
10 times, most recently
from
October 5, 2026 15:23
b094f55 to
4763e3f
Compare
stephencdaly
force-pushed
the
improve-how-we-display-long-lists-for-welsh-translations
branch
2 times, most recently
from
October 5, 2026 17:48
b7546d2 to
ed7cc48
Compare
stephencdaly
force-pushed
the
improve-how-we-display-long-lists-for-welsh-translations
branch
3 times, most recently
from
October 6, 2026 10:50
66ff22e to
8fa8568
Compare
stephencdaly
force-pushed
the
improve-how-we-display-long-lists-for-welsh-translations
branch
2 times, most recently
from
October 6, 2026 11:31
ce0c6bf to
6f6bccb
Compare
stephencdaly
force-pushed
the
improve-how-we-display-long-lists-for-welsh-translations
branch
from
October 6, 2026 11:59
6f6bccb to
dd8fd0c
Compare
When there are >30 selection options for a question, don't display the individual fields. Instead display translated options in a details component, or a paragraph of text instructing the user to upload a CSV of translations if none of the options have been translated. If there are errors with any of the translated options, display the input fields for these options below the details component. Include hidden fields for the selection options we aren't displaying so that translations added by uploading a CSV will be saved when the page is submitted. Move the HTML for displaying selection options on the Welsh translation page into a ViewComponent as this is now quite complex. Co-Authored-By: Claude
For long lists of options, we show the completed translations in a details component with hidden fields to store the values to submit. If there are translations with errors, we show the input field for these. We show the hidden fields after any fields that are not hidden meaning they appear out of order on the page. When the form is submitted, ensure we sort the selection options by their index when storing the translations so that they will be stored and displayed in the same order as the English options.
When there is a long list (>30) selection options for a questions, we don't show the inputs and tell the user to upload a CSV. Ensure that if the page is submitted with marked_complete set to true, we validate that the selection options are present in this case and show errors if they are not.
If there are duplicates in the translations of the selection options, the error only appears in the error summary on the page and deos not apply to individual inputs. Ensure that if there is a long list of selection options for a question, we display all the inputs if duplicates are detected so that the user can fix the error.
Include a selection question with a long list of options in the form used by the test so we can check these are displayed properly on the translations page when the CSV is uploaded, and are saved as expected.
The fieldset's aria-describedby references the table's caption. Because the caption ID wasn't unique per question it might have resolved the wrong caption for assistive technology Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
stephencdaly
force-pushed
the
improve-how-we-display-long-lists-for-welsh-translations
branch
from
October 6, 2026 12:13
a34a0a8 to
43c74d3
Compare
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-3175.admin.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
stephencdaly
marked this pull request as ready for review
October 6, 2026 12:24
Contributor
Author
|
@william-castoncook could you check the content for this please? You can just look at the screenshots I've attached |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What problem does this pull request solve?
Trello card: https://trello.com/c/s14o3lPs/
If a selection question has >30 options:
Continue showing input fields if there are errors with any of the selection options, so the user can fix any problems.
When no translations have been added:
When translations have been added and there are no errors:
When translations have been added and there are errors:
When answering "Yes" to "Have you finished adding your Welsh version?" and translations haven't been added:
Things to consider when reviewing