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

PL regional partner search: search by ZIP only #25011

Merged
merged 1 commit into from Sep 26, 2018

Conversation

breville
Copy link
Member

@breville breville commented Sep 25, 2018

The UI is updated to search by ZIP only. If a provider for that specific ZIP is not found, geocode the ZIP to get the state, and search for a provider covering that state instead.

@breville breville changed the title PL regional partner search: search by ZIP only & geocode to find state if necessary PL regional partner search: search by ZIP only Sep 25, 2018
Copy link
Contributor

@aoby aoby left a comment

Choose a reason for hiding this comment

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

This looks great! Nice and simple.

Please add tests (with Geocoder stubbed) to verify the 2-pass controller logic.

context: {
zip_code: zip_code
}
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Note - This means if the geocoder fails we could return nil (no result found) when really there is a result for that state. This is probably fine, and we'll be notified in honeybadger to look into it. I just want to call it out here that the user will see no regional partner found.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I see Geocoder fails as the biggest risk to this change, but tracking with Honeybadger should help us understand if we need to change strategy. (We could show the state dropdown in such a case, but I wanted to avoid too many unusual code paths if it's not necessary.)

Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW we use it in many other places and at least for the ones I pay attention to like CSF workshop material orders, I have not seen it fail. AFAICT it's very reliable.

@breville breville merged commit 71a8ac8 into staging Sep 26, 2018
@breville breville deleted the regional-partner-search-zip-only branch September 26, 2018 06:01
@breville
Copy link
Member Author

Tests added at #25047

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.

None yet

2 participants