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

Add disclaimer about residence location to city/county/other incentives #153

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

oyamauchi
Copy link
Member

Description

See the code comment for rationale. This is the simplest, bluntest
possible approach. Other possibilities are:

  • Include the locality's name in this disclaimer message. This is not
    trivial to do because, although the API returns authority names,
    they're not necessarily suitable for interpolating into a
    sentence. E.g. Denver is named City and County of Denver, which
    does not work in an interpolation like Limited to residents of ${name}. (These names also aren't currently localized.)

    This approach also doesn't work for other-type incentives, because
    those authorities' names aren't place names.

  • Have the API somehow indicate when a locality match is ambiguous,
    and only show the disclaimer in those cases. This would considerable
    work on the backend, to improve its simplistic mapping of zip to
    city and county name.

But given that we're imminently launching a state with local
incentives, I want to have something in place to cover this case.

The Spanish translation is from Google Translate, but I Googled the
phrase to confirm that very similar phrases are in wide use.

One final note: other-type incentives may be utility-based, not
locality-based, but the API doesn't convey that info.

Test Plan

Search for HVAC incentives in 80212 to get some Denver incentives;
make sure the text shows up on the city incentives but not on others.

## Description

See the code comment for rationale. This is the simplest, bluntest
possible approach. Other possibilities are:

- Include the locality's name in this disclaimer message. This is not
  trivial to do because, although the API returns authority names,
  they're not necessarily suitable for interpolating into a
  sentence. E.g. Denver is named `City and County of Denver`, which
  does not work in an interpolation like `Limited to residents of
  ${name}`. (These names also aren't currently localized.)

  This approach also doesn't work for `other`-type incentives, because
  those authorities' names aren't place names.

- Have the API somehow indicate when a locality match is ambiguous,
  and only show the disclaimer in those cases. This would considerable
  work on the backend, to improve its simplistic mapping of zip to
  city and county name.

But given that we're imminently launching a state with local
incentives, I want to have something in place to cover this case.

The Spanish translation is from Google Translate, but I Googled the
phrase to confirm that very similar phrases are in wide use.

One final note: `other`-type incentives may be utility-based, not
locality-based, but the API doesn't convey that info.

## Test Plan

Search for HVAC incentives in 80212 to get some Denver incentives;
make sure the text shows up on the city incentives but not on others.
Copy link

vercel bot commented Mar 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
embed-rewiringamerica-org ✅ Ready (Inspect) Visit Preview Mar 29, 2024 9:04pm

Copy link

@hblumberg hblumberg left a comment

Choose a reason for hiding this comment

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

Sounds like a reasonable approach for now!!

@oyamauchi oyamauchi merged commit 27ea32c into main Apr 5, 2024
3 checks passed
@oyamauchi oyamauchi deleted the owen.disclaimer branch April 5, 2024 15:05
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.

2 participants