-
Notifications
You must be signed in to change notification settings - Fork 5
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 address lookup field #1138
base: include-address-donate-form
Are you sure you want to change the base?
Add address lookup field #1138
Conversation
and added to constants
attempting to add new package for google autocomplete
trying to get it working
trying to fix errrs
trying to fix
removing exclude line for vue files
added autocomplete_key and func to handle autocomplete return
explains why nothing is being logged
testing, basically
for address
hopefully show in form too
trying a computed value
still not seeing values in address field
well lookee there, that worked... adding city and state now and updating zip
This reverts commit 628995f.
field only, no updates yet
after address is picked from autocomplete
should work this time
seeing if this will work
trying to get this to look like the other fields
trying to meet best practices
Better language, undo combo field test
This reverts commit fcbc2d2.
just to make sure we need it
just seeing if this works
This reverts commit 196e301.
This reverts commit d949d2e.
yes, even more!
not sure if anyone else needs this, but only way I can remove that vol
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.
This is slick! The implementation seems really straightforward thanks to that UI vue package (good call to abstract it out with that.)
I treated this more like a design review/functionality review and I have a few ideas on that I wanted to bounce off you:
Autocomplete behavior
Is it possible to make the autocomplete field the actual street field but still have it populate city, state, zip?
Something like this...
- start typing in an address field
- autocomplete fills the address and the corresponding fields below
Field styles
Now that we have more going on in the form, I'm trying to think of some way to make the form look less daunting and flow better. The membership/product teams will have some good ideas on this but for the demo, how about some of these changes?
- move the reason field above address
- add a div wrapper around all the payment info
- address, city, state, zip, cc (not sure if the button belongs in there too or not)
- could give that wrapper a subtle gray background (like #f3f3f3 or #fbfbfb)
- give that new section a title like "Payment information" or "Billing information"
- if the above, autocomplete behavior change I suggested above is possible, rename the label above the street field to "Billing address"
- h/t to @ReeseOxner who noted that being more explicit about what kind of address we want makes good sense here
- on desktop, bring city, state, zip into the same row. city can be 50% width (col-6 in this grid) while state/zip don't need as much room (maybe col-3?)
I sorta mocked up in the browser here, but it deviates a little from some of the above notes. I refreshed my browser so I couldn't change it ha. We can chat more on this together in realtime today too.
######## | ||
# Google APIs | ||
# | ||
ADDRESS_AUTOCOMPLETE_KEY = os.getenv("ADDRESS_AUTOCOMPLETE_KEY", None) |
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.
suggestion (non-blocking): Would it make sense to add this to the env list table in the readme?
On making the address field the lookup, I did toy with that as I've seen other forms working that way too. It might be complicated by the way those fields work, but I'll give it a go. Not to blow smoke, but I love all the design suggestions. Some great updates and I really don't have an argument against anything you suggested so I'll go with it! Thanks for the review and I'll hit you up when I've got everything updated. |
From @ashley-hebler suggestions... also adding first go at swapping out lookup field and input field
focus on address field
What's this PR do?
Adds address fields and an accompanying address lookup field to the main donation form.
Why are we doing this? How does it help us?
This is the front-end element of a larger project geared towards getting address information at time of donation. This will keep membership from having to do extra work when wanting to send something to a member via the mail. Also, getting address information at time of donation is fairly common.
How should this be manually tested?
Locally or on staging...
How should this change be communicated to end users?
We're going to let the membership team play around with these updates as well to give us feedback on layout/design.
Are there any smells or added technical debt to note?
Not really a smell, but worth mentioning that we added a new front-end library called "vue-google-autocomplete" to simplify some of the lookup implementation.
What are the relevant tickets?
https://airtable.com/appyo1zuQd8f4hBVx/tbloNZu8GkM52NKFR/viwS1XPty68eK4Ett/rec2Gm8BTDPBefvFI?blocks=hide
Have you done the following, if applicable:
(optional: add explanation between parentheses)
TODOs / next steps: