-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description This allows you to enter any ZIP the backend recognizes, and removes the map+utility selector part if the ZIP is not in RI. It got a little complicated because of the need to accommodate changing the utility selector without losing the outline map; see the comment on the `tempState` property for more detail on that. There are other options for dealing with this quirk, but this felt like the straightest path. One thing I wrestled with is that this would be easier if the `/utilities` response included the state; that would mean the whole `tempState` hack wouldn't be needed. But that felt too much like allowing the needs of this specific frontend to dictate the design of the backend. ### Followup I'll implement the behavior of the `state` attribute on the calculator element "locking" the calculator to that state in a followup PR. ## Test Plan Calculate the RI zip 02814, which has multiple utility options. Make sure the UI progresses straight from loading spinner to fully loaded with utility selector + incentives. RI Energy should be auto-chosen. Choose Pascoag in the utility selector; make sure the map+selector remain visible while the new incentives load. Calculate the zip 02859, which also has RIE and Pascoag. The map+selector should disappear while loading, then reappear with Pascoag still selected; incentives should include Pascoag ones. Calculate the zip 02116, which is in MA. Only IRA incentives should appear, with no map+selector. Calculate a RI zip again; make sure the RI experience reappears.
- Loading branch information
Showing
4 changed files
with
122 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55a965d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
embed-rewiringamerica-org – ./
embed-rewiringamerica-org-git-main-rewiring-america.vercel.app
embed-rewiringamerica-org.vercel.app
embed-rewiringamerica-org-rewiring-america.vercel.app
embed.rewiringamerica.org