-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix depends for array builder #33108
base: main
Are you sure you want to change the base?
Conversation
ebcd01d
to
fd28800
Compare
000397b
to
780c3d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Thanks so much for adding this in!
src/platform/forms-system/src/js/patterns/array-builder/arrayBuilder.jsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well for me!
I switched out the The issue I am still encountering is that on edit if the page becomes no longer shown the data is still present. See this in the following video when "wrist fracture" triggers the Screen.Recording.2024-11-21.at.9.00.34.AM.movCould be out of scope for this fix or could be I need to handle it in a different way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just found a potential bug. I had the page that was shown conditionally as a middle page of the loop (that is what the above video demos). With a recent request the conditional page became the last page of the loop. On the summary page I am now not able to click the "no" option and and continue on. The following video shows the conditional page as a middle page first then as the last page:
Screen.Recording.2024-11-21.at.10.13.33.AM.mov
Here is my branch with your changes merged in and the conditional page as the last in the loop (select the "Cherry" demo when in localhost): conditions-639-refine-prototypes
6c64fba
Thanks @Midge-dev for helping with the tests on 686 Status update: Working on bug that @williamphelps13 found. Need to fix that before merging. |
e87d395
to
504c78f
Compare
src/platform/forms-system/src/js/patterns/array-builder/arrayBuilder.jsx
Show resolved
Hide resolved
src/applications/disability-benefits/686c-674-v2/config/form.js
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,289 @@ | |||
import path from 'path'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added new cypress test in latest commit.
c236024
to
6f43684
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR ready for review
@@ -42,6 +42,14 @@ const testConfig = createTestConfig( | |||
}); | |||
}); | |||
}, | |||
'veteran-identification-information': ({ afterHook }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
included this additional unrelated change - because it was blocking PR
6f43684
to
441f2f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous bug: when dependent page is the last page and its the last item added the user could not continue on from the list loop
This is now resolved.
Potential new issue: the recent changes appear to have changed formData to contain all formData for onNavForward when it previously only contained the itemData.
This may be an enhancement *(in the long term) because it seems desirable that formData always contain all formData and never just contain itemData. *Though in this PR it will cause regressions in some forms.
Appreciate the thorough testing @williamphelps13 - I'll spend some more time on this, to make sure the |
441f2f5
to
52fabce
Compare
onNavForward: props => { | ||
return !props.formData.currentlyServing | ||
const item = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since onNavForward
accepts different formData
now, I went through the code, and updated all places that were affected
Summary
depends
for array builder and addindex
propertyRelated issue(s)
department-of-veterans-affairs/va.gov-team-forms#1800
department-of-veterans-affairs/va.gov-team-forms#1888
Testing done
Screenshots
n/a
What areas of the site does it impact?
array builder
depends
.Acceptance criteria
Quality Assurance & Testing
Error Handling
Authentication
Requested Feedback
(OPTIONAL) What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?