Skip to content
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

Merged
merged 36 commits into from
Apr 11, 2024
Merged

VACMS-16913: DUW questions 3 #29030

merged 36 commits into from
Apr 11, 2024

Conversation

chriskim2311
Copy link
Contributor

@chriskim2311 chriskim2311 commented Apr 5, 2024

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

  • Subtask pattern (one question per screen) is used
  • Content changes are made (see below)
  • A11y review
  • Design review

Quality Assurance & Testing

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Linting warnings have been addressed
  • Documentation has been updated (link to documentation *if necessary)
  • Screenshot of the developed feature is added
  • Accessibility testing has been performed

@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 5, 2024 21:29 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 5, 2024 22:09 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 8, 2024 22:08 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 8, 2024 22:29 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 8, 2024 22:50 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 9, 2024 19:40 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 9, 2024 23:05 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 10, 2024 16:11 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 10, 2024 16:41 Inactive
@chriskim2311 chriskim2311 marked this pull request as ready for review April 10, 2024 17:51
@chriskim2311 chriskim2311 requested review from a team as code owners April 10, 2024 17:51
Copy link
Contributor

@randimays randimays left a comment

Choose a reason for hiding this comment

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

Some observations:

  1. Reason A's h1 has more space between it and the breadcrumbs above.
Screenshot 2024-04-10 at 1 01 52 PM

Screenshot 2024-04-10 at 1 01 58 PM
  1. The breadcrumbs need to be left-aligned with the page content at all screen widths
Screenshot 2024-04-10 at 1 11 56 PM

}
break;
case SHORT_NAME_MAP.DISCHARGE_MONTH:
nextRoute = SHORT_NAME_MAP.DISCHARGE_REASON;
nextRoute = SHORT_NAME_MAP.REASON;
Copy link
Contributor

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?

Copy link
Contributor Author

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!

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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!

@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 10, 2024 19:07 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 10, 2024 19:33 Inactive
powellkerry
powellkerry previously approved these changes Apr 10, 2024
}
break;
case SHORT_NAME_MAP.DISCHARGE_MONTH:
nextRoute = SHORT_NAME_MAP.DISCHARGE_REASON;
nextRoute = SHORT_NAME_MAP.REASON;
Copy link
Contributor

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.

@thejordanwood
Copy link

@chriskim2311 I'm without SOCKS and am relying on screenshots again. Here are my notes:

  • I agree with Randi that the spacing between H1s and breadcrumbs should be consistent on all questions. I also agree the breadcrumbs should be left-aligned at all screen widths.
  • All error messages need a period at the end.
  • Reason: There should be a period at the end of the notes copy.
  • Court martial: This question needs a question mark at the end.

@laflannery
Copy link

LGTM!

Copy link
Contributor

@randimays randimays left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work!

@va-vfs-bot va-vfs-bot temporarily deployed to master/16913-questions-3/main April 11, 2024 18:28 Inactive
@chriskim2311 chriskim2311 merged commit a27c6f5 into main Apr 11, 2024
78 of 79 checks passed
@chriskim2311 chriskim2311 deleted the 16913-questions-3 branch April 11, 2024 18:40
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.

6 participants