raft-tech / cfgov-refresh

Raft's fork of cfgov-refresh in support of Digital Money Toolkit
https://www.consumerfinance.gov/
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

Verify SNAP logic and integrate into UI #52

Closed MissyM2 closed 4 years ago

MissyM2 commented 4 years ago

Verify SNAP logic and integrate into UI. The way that SNAP income appears in the UI has not been determined, yet.

fyi @shubhi-raft @meissadia @RedNumberIX @LesliePerucci @omnipresent07 @MissyM2

Current behavior

Expected behavior

Screenshots

Current In this scenario, I added $100 for starting balance. I added $250/week (on Fridays) for job income and $75/money for SNAP benefit income. I added electricity $85/month on the 23rd and rent payment of $850 on the first of the month. I have not added any groceries but, my SNAP benefit $75 has been applied to other bills.

Screen Shot 2020-06-15 at 9 12 40 AM

Expected

jbevis commented 4 years ago

Tracking thoughts:

Need to confirm if the below matches the UI, if so we can open a PR otherwise need more direction on UI.

Screen Shot 2020-06-16 at 9 05 06 AM
jbevis commented 4 years ago

Based on client feedback, UI has been updated to only have:

Screen Shot 2020-06-16 at 4 36 30 PM
jbevis commented 4 years ago

The logic is in place to handle the SNAP benefits, if this UI is approved I'll open a new PR to merge this work to our my-money-calendar branch to be deployed to CFPB.

jbevis commented 4 years ago

PR is up for review https://github.com/raft-tech/cfgov-refresh/pull/61

shubhi-raft commented 4 years ago

@jbevis

SNAP benefit only applies to grocery and cannot be counted as regular income, and hence cannot be added to the weekly starting or ending balance. The current logic counts it as money available in the weeks after the benefit was added.

Current Logic:

  1. Week Starting Balance = income + job + any remaining money from last week + SNAP Money
  2. Weekly Ending Balance = Starting balance - expenses - SNAP Money
  3. SNAP Balance = works fine = snap card - grocery

Week in which SNAP benefit is added:

Screen Shot 2020-06-22 at 10 37 51 AM

Week following the SNAP benefit was added:

Screen Shot 2020-06-22 at 10 40 02 AM

Expected Logic:

  1. Week Starting Balance = income + job + any remaining money from previous week [No SNAP Money]
  2. Weekly Ending Balance = Starting balance - expenses [grocery to be included as an expense if and only if no SNAP money is left]
  3. SNAP balance = works fine = SNAP card - grocery
shubhi-raft commented 4 years ago

@jbevis Logic looks good, however, need to refine formatting.

Issue 1:

Update text as stated below: Weekly Starting Balance: Weekly Ending Balance: Weekly Ending SNAP Balance:

Issue 2:

Current Behavior See screenshot - more than double digit moves to the next line.

Screen Shot 2020-06-26 at 1 50 21 PM

Expected Behavior No matter the amount; text should be displayed on one line.

jbevis commented 4 years ago

@shubhi-raft I'll get the headers updated per the request.

With regard to the text always appearing on one line, it's a bit more involved. Depending on screen size at some point the element begins to run out of real estate and thus as part of the responsive nature of the app, the text will break to new lines.

I agree that there should be a measure of visual consistency, but keeping it all on one line for smaller screens is going to look cramped.

I could add a css rule to drop the amounts below the label once the viewport is below a certain threshold, which would help with consistency

Let me know your thoughts.

shubhi-raft commented 4 years ago

@jbevis let's try your proposed solution for visual consistency. if it works, great, if not, we will revert back. is that ok?

jbevis commented 4 years ago

Sounds good, I'll update and get changes pushed out for review.

jbevis commented 4 years ago

@shubhi-raft the requested changes are now live at https://cfgov-refresh-staging.herokuapp.com/mmt-my-money-calendar/