Skip to content

SAA-66: Add child-partner-nationality typeahead page - #56

Merged
jackbussHO merged 12 commits into
masterfrom
SAA-66
Oct 9, 2026
Merged

jackbussHO merged 12 commits into
masterfrom
SAA-66

Conversation

@jackbussHO

Copy link
Copy Markdown
Contributor

What?

Add the /child-partner-nationality page

Why?

So that users can change nationality of child or partner

How?

Added to HOF config files

Testing?

Tested locally.

Screenshots (optional)

Screenshot 2026-10-09 at 10 01 26

Anything Else? (optional)

Check list

  • I have reviewed my own pull request for linting issues (e.g. adding new lines)
  • I have written tests (if relevant)
  • I have created a JIRA number for my branch
  • I have created a JIRA number for my commit
  • I have followed the chris beams method for my commit https://cbea.ms/git-commit/
    here is an example commit
  • Ensure drone builds are green especially tests
  • I will squash the commits before merging

Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:09
@jackbussHO
jackbussHO requested a balanced review from Copilot and removed request for Copilot October 9, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The page is consistently wired through the journey, validation, translations, summary, and progressively enhanced typeahead.

0 open findings

What changed in this PR

Adds the child/partner nationality page with an accessible country typeahead and integrates it into the dependant journey.

Changes:

  • Added country selection, validation, translations, and navigation.
  • Added accessible autocomplete initialization and styling support.
  • Included nationality in dependant summary data.
File Description
assets/​scss/​app.scss Prevents autocomplete results from receiving bullet styling.
assets/​js/​index.js Initializes and synchronizes typeahead fields.
apps/​saa/​translations/​src/​en/​validation.json Adds required-field validation text.
apps/​saa/​translations/​src/​en/​pages.json Adds the page caption and heading.
apps/​saa/​translations/​src/​en/​fields.json Adds the field label and placeholder option.
apps/​saa/​sections/​summary-data-sections.js Adds nationality to the dependant summary.
apps/​saa/​index.js Registers the page field in the journey.
apps/​saa/​fields/​index.js Defines the required country select field.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The autocomplete can submit a previously selected nationality after its visible value is edited on iOS.

0 open findings

Previously missed (2)

In code that hasn't changed since last review

Medium severity Clear hidden value when input differs from selected option

assets/​js/​index.js:36

This checks the text against every option rather than the option currently selected in the hidden select. On iOS, Accessible Autocomplete disables autoselect; after editing a saved country to another valid country name without tapping a suggestion, blur does not confirm it, so the old hidden value is submitted while the new country remains visible. Clear whenever the input no longer matches the selected option.

Low severity Correct grammar in comment

assets/​js/​index.js:21

Correct the grammar in this comment.

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The enhanced field loses required semantics, and stale nationality data can appear in the summary.

1 open finding

🧠 Review effort: Balanced

Comment thread apps/saa/sections/summary-data-sections.js
Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The enhanced required field loses its required accessibility state, and its synchronization logic lacks regression tests.

2 open findings
1 resolved since last review

🧠 Review effort: Balanced

Comment thread assets/js/typeahead.js Outdated
Comment thread assets/js/typeahead.js Outdated
Copilot AI balanced review requested due to automatic review settings October 9, 2026 09:54
@jackbussHO
jackbussHO requested a balanced review from Copilot and removed request for Copilot October 9, 2026 09:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The displayed autocomplete value can diverge from the nationality submitted by the hidden select.

1 open finding
2 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Correct grammar in comment

assets/​js/​typeahead.js:19

Correct the grammar in this comment.

🧠 Review effort: Balanced

Comment thread assets/js/typeahead.js Outdated
Copilot AI balanced review requested due to automatic review settings October 9, 2026 10:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The typeahead emits redundant change events after its select has already been cleared.

1 open finding
1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Clarify why the required state is copied to the visible input

assets/​js/​typeahead.js:19

There is no validate-autocomplete behaviour in this application, so this comment gives a misleading reason for copying the attribute. Describe the actual purpose of preserving the required state on the generated visible input.

🧠 Review effort: Balanced

Comment thread assets/js/typeahead.js Outdated
Copilot AI balanced review requested due to automatic review settings October 9, 2026 10:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The page is fully configured and covered by focused client-side tests, with only a minor comment grammar issue.

0 open findings

1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Fix missing “is” in comment

assets/​js/​typeahead.js:19

This comment is missing “is”; change it to “This is needed…” for grammatical clarity.

🧠 Review effort: Balanced

Comment thread assets/js/typeahead.js Outdated
Comment thread assets/js/typeahead.js

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Typeahead initialization repeats enhancement for every matching select, and the new behavior lacks unit coverage.

2 open findings

🧠 Review effort: Balanced

Comment thread assets/js/index.js Outdated
Comment thread assets/js/typeahead.js
Copilot AI balanced review requested due to automatic review settings October 9, 2026 12:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Typeahead initialization remains outside the agreed DOM-ready lifecycle.

1 open finding
1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Move initTypeahead into the DOM-ready handler

assets/​js/​index.js:6

initTypeahead() still runs outside the existing DOM-ready handler, so the lifecycle change noted in the prior review thread has not been applied. Move it into the handler with initFileUpload() so initialization consistently occurs only after the form controls are available.

🧠 Review effort: Balanced

Comment thread assets/scss/app.scss Outdated
Copilot AI balanced review requested due to automatic review settings October 9, 2026 12:51
@jackbussHO
jackbussHO removed the request for review from Copilot October 9, 2026 12:54
Copilot AI balanced review requested due to automatic review settings October 9, 2026 12:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The page configuration, progressive enhancement, validation, translations, summary integration, and targeted tests are consistent and complete.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@dk4g
dk4g requested a review from vivekkumar-ho October 9, 2026 13:08
@jackbussHO
jackbussHO merged commit 6fbc189 into master Oct 9, 2026
8 checks passed
@jackbussHO
jackbussHO deleted the SAA-66 branch October 9, 2026 13:20
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 this pull request may close these issues.

4 participants