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

There is a bug in the panel text logic regarding tracts that should be identified as disadvantaged due to tribal overlap and the completely surrounded logic #2195

Open
KameronKerger opened this issue Mar 8, 2023 · 4 comments
Assignees
Labels
frontend P3 bug Priority 3 bug

Comments

@KameronKerger
Copy link
Contributor

Describe the bug
The fact that the tract is identified as disadvantaged due to tribal overlap (100% or 99% rounded to 100%) should supersede the logic to display if it is completely surrounded. See the two screenshots below.

https://screeningtool.geoplatform.gov/en/#12.14/43.08083/-75.75447
https://screeningtool.geoplatform.gov/en/#10.8/43.1168/-75.7339

For tracts like these, it should only show the second paragraph:
The lands of Federally Recognized Tribes that cover 100% of this tract are considered disadvantaged.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'tracts above'
  2. Click on 'census tracts'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Don't show the first paragraph or the extra part that is shown for tracts that are completely surrounded.

Screen Shot 2023-03-08 at 11 12 17 AM

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2023-03-08 at 11 12 17 AM
Screen Shot 2023-03-08 at 11 11 57 AM

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@vim-usds
Copy link
Collaborator

vim-usds commented Mar 9, 2023

@KameronKerger and @sampowers-usds, I had one ear on today's stand up when you both were discussing this error.

Currently it seems that TA_PERC_FE (one of the many BE signals) is being used to render the side panel paragraphs. I may have misspoke in some earlier thread stating it was TA_PERC.

It seems that TA_PERC_FE exists as a value of null or [0,1] inclusive. The rendering logic uses three states of TA_PERC_FE, namely:

  1. TA_PERC_FE = null
  2. TA_PERC_FE = 0
  3. TA_PERC_FE > 0

Given that we want to do some new things when TA_PERC_TA = .99 or 1, it sounds like maybe the states need to be modified to the following:

  1. TA_PERC_FE = null
  2. TA_PERC_FE = 0
  3. 0 < TA_PERC_FE < .99
  4. TA_PERC_FE >= .99

Also as an FYI, to remove the floating point errors we were getting (long time ago), we are processing TA_PERC_FE into percentTractIsTribal before sending it to the rendering logic:

if (TA_PERC_FE >= 0) {
   percentTractIsTribal = parseFloat(TA_PERC_FE*100).toFixed())
else  {
  percentTractIsTribal = null
}

If we want to add this state, it might take some time to integrate and test, unless it supersedes all other rendering of the paragraphs. Currently adjacency has the highest rank in the rendering logic.

@vim-usds
Copy link
Collaborator

vim-usds commented Mar 9, 2023

Thinking about this a little more, the above design will allow us to render different logic in the added state. However, in this case it seems we don't want to show the entire first paragraph when we have adjacency and tribal area percentage is .99 or 1. We might be able to do this outside the rendering logic and not show the component if a certain case is satisfied.
Let's chat tomorrow.

@KameronKerger
Copy link
Contributor Author

hi @vim-usds - we just need to update the logic for displaying the text paragraphs in the side panel. the signals are all fine.

@KameronKerger
Copy link
Contributor Author

discuss this bug with partner team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend P3 bug Priority 3 bug
Projects
None yet
Development

No branches or pull requests

2 participants