department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

addressUI Web Component State Select Bug in List Loop #83806

Open michaelclement opened 5 months ago

michaelclement commented 5 months ago

User story(ies)

As a VFS developer, I need the addressUI web component to appropriately display a State va-select or va-input based on the address's Country value when inside a list and loop with > 1 applicants, so that I can implement address collection in a list loop.

Additional details/notes/links

Here is a video demonstrating the bug:

https://github.com/department-of-veterans-affairs/va.gov-team/assets/18408628/55d817b9-341a-44cb-9178-d58a560ee325

Acceptance criteria

Point(s) of contact

@ataker @michaelclement

What type of issue is this?

How to configure this issue

caw310 commented 5 months ago

@tbaker1026 DST thinks that this is a forms team issue. Can you take a look at this with your team?

megansiddle commented 4 months ago

@rhasselle-oddball can you summarize your findings?

humancompanion-usds commented 4 months ago

@michaelclement - Is the 1010d using the codified address pattern in the forms system or a bespoke address pattern specific to this application? If it's the former then we can work on this. If it's the latter then it is not something the Forms team can really spend much time on. We would encourage you to use the codified address pattern and, if for some reason you cannot, file issues to request a variation that handles the specific use case for this application.

@rhasselle-oddball - Are there complications with using the codified address pattern within a list and loop?

rhasselle-oddball commented 4 months ago

Notes:

michaelclement commented 3 months ago

@humancompanion-usds My apologies, I never got a notification for your tag last month. Yes, this is the former case of using the established web component address pattern. I talked with @rhasselle-oddball and I'm going to look at using the current list index via the URL params to only update the schema per the correct list item.

Edit: This approach doesn't seem feasible at this point because the index value isn't in the URL on the review page.