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

Use more_info_url from v1 API as link button destination #150

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

oyamauchi
Copy link
Member

Description

The links to the RA pages about the IRA incentives are currently in
item.url, which doesn't make conceptual sense. We're going to move
them to a new more_info_url field on incentives, and make
program_url required. We'll have

The backend is currently not sending more_info_url in v1 at all, so
this PR will be a no-op when it's deployed. After the backend change
is deployed, I'll follow up by removing item.url from the frontend,
and then from the backend.

Test Plan

Run against the prod backend and make sure the IRA incentives have
link buttons with the same contents and URL as before.

Run against a local backend with the more_info_url change applied;
make sure the frontend continues to have exactly the same
behavior. (It used to be that the IRA incentives had no program URL,
so the buttons used the item URL. Now they do have a program URL, but
they all have a more-info URL that is exactly the same as the item
URL.)

## Description

The links to the RA pages about the IRA incentives are currently in
`item.url`, which doesn't make conceptual sense. We're going to move
them to a new `more_info_url` field on incentives, and make
`program_url` required. We'll have

The backend is currently not sending `more_info_url` in v1 at all, so
this PR will be a no-op when it's deployed. After the backend change
is deployed, I'll follow up by removing `item.url` from the frontend,
and then from the backend.

## Test Plan

Run against the prod backend and make sure the IRA incentives have
link buttons with the same contents and URL as before.

Run against a local backend with the `more_info_url` change applied;
make sure the frontend continues to have exactly the same
behavior. (It used to be that the IRA incentives had no program URL,
so the buttons used the item URL. Now they do have a program URL, but
they all have a more-info URL that is exactly the same as the item
URL.)
Copy link

vercel bot commented Mar 22, 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 22, 2024 9:07pm

@oyamauchi
Copy link
Member Author

Copy link
Contributor

@rpartridge rpartridge left a comment

Choose a reason for hiding this comment

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

Run against the prod backend and make sure the IRA incentives have
link buttons with the same contents and URL as before.

this worked as expected, no changes in link behavior

Run against a local backend with the more_info_url change applied;
make sure the frontend continues to have exactly the same
behavior

this isn't working - when I tested locally with the backend changes, all of the IRA tax credit incentives were pointing to irs.gov rather than the homes.- links

edit: tested again and it is working! ignore

Copy link
Contributor

@rpartridge rpartridge left a comment

Choose a reason for hiding this comment

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

lgtm! thanks for updating.

in terms of order of operations, this PR will get deployed first, then the API changes, then finally the API changes to get rid of item.url, right?

@oyamauchi
Copy link
Member Author

Right, so when I deploy this PR it'll be a no-op. Then when I deploy the first backend change, the more info URLs will be in both item.url and more_info_url, and the frontend will use the latter. Then there'll be a frontend change to assume program_url is always defined, and stop using item.url. Finally, a backend change to drop item.url.

@oyamauchi oyamauchi merged commit d24fe5c into main Mar 26, 2024
3 checks passed
@oyamauchi oyamauchi deleted the owen.more-info branch March 26, 2024 15:11
oyamauchi added a commit that referenced this pull request Mar 26, 2024
## Description

Followup to #150. This will let us remove item URLs from v1 if we want.

## Test Plan

This should be a no-op; the removed case should never be hit now that
program_url is required. Submit the form for a RI zip code and look at
HVAC incentives; make sure the non-IRA ones still say "visit site" and
the IRA ones say "learn more" and link to the homes.rewiring pages.
oyamauchi added a commit that referenced this pull request Mar 26, 2024
## Description

Followup to #150. This will let us remove item URLs from v1 if we want.

## Test Plan

This should be a no-op; the removed case should never be hit now that
program_url is required. Submit the form for a RI zip code and look at
HVAC incentives; make sure the non-IRA ones still say "visit site" and
the IRA ones say "learn more" and link to the homes.rewiring pages.
oyamauchi added a commit that referenced this pull request Mar 26, 2024
## Description

Followup to #150. This will let us remove item URLs from v1 if we want.

## Test Plan

This should be a no-op; the removed case should never be hit now that
program_url is required. Submit the form for a RI zip code and look at
HVAC incentives; make sure the non-IRA ones still say "visit site" and
the IRA ones say "learn more" and link to the homes.rewiring pages.
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