-
Notifications
You must be signed in to change notification settings - Fork 127
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
VACMS-16913: DUW questions 3 #29030
VACMS-16913: DUW questions 3 #29030
Conversation
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.
src/applications/discharge-wizard/components/v2/questions/Reason.jsx
Outdated
Show resolved
Hide resolved
src/applications/discharge-wizard/constants/question-data-map.js
Outdated
Show resolved
Hide resolved
src/applications/discharge-wizard/constants/question-data-map.js
Outdated
Show resolved
Hide resolved
src/applications/discharge-wizard/constants/question-data-map.js
Outdated
Show resolved
Hide resolved
src/applications/discharge-wizard/components/v2/questions/CourtMartial.jsx
Show resolved
Hide resolved
} | ||
break; | ||
case SHORT_NAME_MAP.DISCHARGE_MONTH: | ||
nextRoute = SHORT_NAME_MAP.DISCHARGE_REASON; | ||
nextRoute = SHORT_NAME_MAP.REASON; |
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.
I noticed you're not using the display conditions (like in PACT Act). It seems to be overcomplicating this routing function. Did the display conditions paradigm not apply well for Discharge Wizard?
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.
Yeah I was thinking about this a lot. And I thought that the logic behind going through the DUW is to dynamically show content on a single results page. It can get hairy but the main logic is based on a question's answer and going forward. Unlike PACT Act I didn't see batches of questions/answers here that would make sense to do the display conditions paradigm.
I can clean up this function and make it more readable by breaking off the if/else logic into smaller functional chunks.
Let me know if my thinking is off!
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.
Largely, display conditions are used in PACT Act to determine what question comes next. Incidentally, we also have separate display conditions for what results page to show. I think DUW is a good match for using them, in particular because it keeps utilities cleaner and gives us a more clear idea of what's coming next.
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.
Thanks Randi! I'll go ahead and work on implementing the display condition paradigm and open another PR for those changes when they are ready.
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.
@randimays I worked on some changes for the display condition paradigm, I tweaked the solution a bit to work with the single path of questions for DUW.
#29130
I also made some changes in this PR to compare both approaches.
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.
I made a comment in the newer PR to this effect, but to reiterate here, since this one is for the existing approach:
This approach doesn't allow us to easily change the order of questions or add/remove questions later on. We can't assume those adjustments will be made of course (fully aware that future coding is weird), but since we have a pattern for a flexible routing system defined in PACT Act, it shouldn't take too much bandwidth to implement it for DUW.
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.
Sounds good we can use the PACT Act routing system and DCs with the new PR implementation. Thanks for the feedback on both approaches!
src/applications/discharge-wizard/components/v2/questions/DischargeType.jsx
Show resolved
Hide resolved
src/applications/discharge-wizard/components/v2/questions/shared/RadioGroup.jsx
Show resolved
Hide resolved
} | ||
break; | ||
case SHORT_NAME_MAP.DISCHARGE_MONTH: | ||
nextRoute = SHORT_NAME_MAP.DISCHARGE_REASON; | ||
nextRoute = SHORT_NAME_MAP.REASON; |
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.
I made a comment in the newer PR to this effect, but to reiterate here, since this one is for the existing approach:
This approach doesn't allow us to easily change the order of questions or add/remove questions later on. We can't assume those adjustments will be made of course (fully aware that future coding is weird), but since we have a pattern for a flexible routing system defined in PACT Act, it shouldn't take too much bandwidth to implement it for DUW.
@chriskim2311 I'm without SOCKS and am relying on screenshots again. Here are my notes:
|
LGTM! |
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.
LGTM! Nice work!
Note: Delete the description statements, complete each step. None are optional, but can be justified as to why they cannot be completed as written. Provide known gaps to testing that may raise the risk of merging to production.
Summary
This PR adds Reason, Intention, Court Martial, Discharge Type questions to the DUW logic flow.
Related issue(s)
department-of-veterans-affairs/va.gov-cms#16913
Testing done
Tested flow locally and added unit tests against the new question components.
Note: The cypress test included in this PR is flaky and won't be able to run until this is live on prod since we are using the dynamic routing for envs.
Screenshots
Reason
Intention
Court Martial
Discharge Type
What areas of the site does it impact?
(Describe what parts of the site are impacted if code touched other areas)
Acceptance criteria
Quality Assurance & Testing