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

[FEATURE][GWELLS-2094] Address autofill/autocomplete added to Well Owner and Well Location forms #2111

Merged
merged 45 commits into from
Jan 23, 2024

Conversation

acatchpole
Copy link
Contributor

Pull Request Standards

  • The title of the PR is accurate
  • The title includes the type of change [HOTFIX, FEATURE, etc]
  • The PR title includes the ticket number in format of [GWELLS-###]
  • Documentation is updated to reflect change [README, functions, team documents]

Description

This PR includes the following proposed change(s):

  • Added address auto-complete + auto-fill to the Well Owner Information form for well submissions and well editing
  • Added address auto-complete + auto-fill to the Well Location form for well submissions and well editing

Utilized the BC Gov Geocoder API to get addresses. This API allows 1000 requests/min so no throttling should occur. BUT, it does not have Postal Code information, so Postal Code is not auto-filled.

image

@acatchpole
Copy link
Contributor Author

acatchpole commented Jan 16, 2024

Pipeline Checks Failures:
The code is largely repeated between the two changed components, but there are enough small differences that breaking out functions to reduce repetition would be onerous.

The API tests that failed on the first run, succeeded when re-run

Copy link
Contributor

@LocalNewsTV LocalNewsTV left a comment

Choose a reason for hiding this comment

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

Overall Thoughts

  • I would use our API as a proxy to the geocoder api (new endpoint), and set the geocoder api as an environment variable. Doing so achieves the following:
    • Removes power from the frontend of the app, preserving it in the backend where we control it
    • having it as an env variable lets us update the url in the event the architecture changes, without having to do an app rebuild, or open a PR.
    • The api advertises API keys available for production apps like ours, and if that came gets implemented, we would be able to protect that with our API with significantly less overhaul in the future.
    • Can use the existing APIService Class that exists in Vue, and simplify the codebase further by reusing code
    • Good practice
  • fetchAddressSuggestions could be moved into a class or a utilities folder, doing so would reduce complexity in this file, and be more reusable in the application

Copy link

sonarcloud bot commented Jan 23, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@acatchpole acatchpole merged commit b85ce0b into release Jan 23, 2024
9 checks passed
@acatchpole acatchpole deleted the feat/gwells-2094 branch January 23, 2024 18:53
@sanjaytkbabu sanjaytkbabu restored the feat/gwells-2094 branch January 23, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants