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

Implement Need and Program Pages #37

Merged
merged 6 commits into from
Feb 16, 2024
Merged

Implement Need and Program Pages #37

merged 6 commits into from
Feb 16, 2024

Conversation

analoo
Copy link
Collaborator

@analoo analoo commented Feb 6, 2024

Implements Need and Program Pages:

To test:

  1. Select A Need (if you select either of the top two options, the next window will show both options with the need you selected prechecked).
  2. Go Back - Select all needs (except not sure) and confirm that in the next page, 4 options appear that are all checked.
  3. Go back. Select "Not Sure". Notice it act's as a "None of the Above". Go to the next page and note that all options are listed but none are checked.

Play around with moving forward to the signpost, and then back: Does the behavior make sense to you?

Once you feel good about the need, check that the pdf form is properly filled out:
If you select SNAP, the snap option on the first page will be checked.
If you select something aside from SNAP, Cash Assistance will be checked.

<th:block th:replace="~{fragments/inputs/checkboxFieldset ::
checkboxFieldset(inputName='programs',
label=#{choose-programs.check-all-that-apply},
ariaLabel=#{choose-programs.header},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bseeger - do we have a best practice around what to include in the ariaLabel?

Copy link
Contributor

Choose a reason for hiding this comment

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

no, I was wondering that as well. Might be worth checking in with Devon about this.

Copy link
Collaborator

@spokenbird spokenbird Feb 16, 2024

Choose a reason for hiding this comment

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

It should be the HTML ID of the HTML element you want to label the input. It's meant for screens where there is only one input, and the screens H1 header is technically the label for that input. In most cases the value you want here will be 'header' since that's the ID assigned to headers in the FFB. You can just use the string 'header' in this case, but it shouldn't be a message property.

@analoo analoo force-pushed the select-programs-flow branch from 7dd5976 to e77d56a Compare February 7, 2024 20:28
@analoo analoo force-pushed the select-programs-flow branch from e77d56a to 9203402 Compare February 9, 2024 02:37
@analoo analoo changed the title WIP" Implements Need and Program Pages Feb 9, 2024
@analoo analoo marked this pull request as ready for review February 9, 2024 02:41
@bseeger bseeger self-requested a review February 9, 2024 20:19
@bseeger
Copy link
Contributor

bseeger commented Feb 9, 2024

@analoo, this looks really great and runs well! I just have some minor comments.

@analoo analoo force-pushed the select-programs-flow branch from d702bdf to 87a4313 Compare February 12, 2024 19:59
@analoo analoo requested a review from bseeger February 13, 2024 00:59

public class ApplicationUtilities {
public static Set<String> flattenHouseholdNeedsPrograms(ArrayList<String> needTypes) {
List<List<String>> relevantPrograms = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

The indents are off in this file -- 8 instead of 4.

assertThat(testPage.hasErrorText(message("error.missing-general")));
assert(testPage.hasErrorText(message("error.missing-general")));

testPage.clickElementById("helpNeeded-CHILDREN");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can take this line out -- or comment that it does nothing, as the checking none__checkbox will cause it to get unchecked. And maybe that's part of the test as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  • I added a comment since I believe that this is actually an important part of the test since none__checkbox unsets the other checkboxes and behaves differently in the programs pages.

@analoo analoo force-pushed the select-programs-flow branch from 87a4313 to 57667fb Compare February 15, 2024 23:02
Ana Medrano Fernandez added 6 commits February 15, 2024 15:23
1.Add before save action that presets a few of the programs based on the need selected
2.Add an additional parameter to differentiate between relevant programs and precheckedprograms
3.Write needsCashAssistance and needsSnap to PDF
@analoo analoo force-pushed the select-programs-flow branch from 47623ff to 76135bf Compare February 15, 2024 23:52
@@ -246,6 +246,7 @@ help-needed.food=Help with food
help-needed.children=Help with money for children
Copy link
Contributor

Choose a reason for hiding this comment

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

It won't let me mark the right spot, so I'll put this here. If this PR includes the help needed page, then the message for help-needed.subheader needs to be updated as it no longer matches the design.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for the "Help with children" - but I wonder if your message is more up to date based on conversations?

@@ -266,6 +267,9 @@ choose-programs.ohep.desc=<br>Helps with heating, electric and gas bills. Maryla
choose-programs.tdap=Temporary Disability Assistance Program (TDAP)
choose-programs.tdap.short-desc=Get help for a disability
choose-programs.tdap.desc=<br>Gives cash to people who are low-income and living with short-term disability or who are waiting for federal disability help. People with children who are dependents cannot get this benefit.
choose-programs.rca=Refugee Transitional Cash Assistance (RTCA or RCA)
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that it looks like the copy for SNAP and TCA has changed in the designs.

The TDAP needs a line break in on spot to match design.

Copy link
Contributor

@bseeger bseeger left a comment

Choose a reason for hiding this comment

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

This works as described. There are a few copy changes - feel free to merge once you make those.

Nice work - the change to the pdf is nice!

@analoo analoo merged commit 7ee1d6e into main Feb 16, 2024
4 checks passed
@analoo analoo changed the title Implements Need and Program Pages Implement Need and Program Pages Feb 16, 2024
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.

3 participants