@W-18762700: Implemented address autocomplete dropdown using mock addresses#2589
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
| @@ -0,0 +1,200 @@ | |||
| /* | |||
There was a problem hiding this comment.
Can this file be moved outside of this folder into a separate one under components/
We want to have a dedicated folder for this dropdown, and then import it here
There was a problem hiding this comment.
Please follow current pattern in the soure code for file name. It is snake-case, not camel case.
|
|
||
| // The port that the local dev server listens on | ||
| port: 3000, | ||
| port: 8080, |
There was a problem hiding this comment.
don't check change in
| export const SHIPPING_COUNTRY_CODES = [ | ||
| {value: 'CA', label: 'Canada'}, | ||
| {value: 'US', label: 'United States'} | ||
| { value: 'AF', label: 'Afghanistan' }, |
There was a problem hiding this comment.
Hmm now I wonder if we should change this for PWA kit :/
Maybe let's not since pwa-kit team is only providing CA and US OOTB?
|
|
||
| // Sample address data structured like Google Places API | ||
| const MOCK_ADDRESSES = [ | ||
| { |
There was a problem hiding this comment.
I'd assume this file will be moved to a test util situation for mocking Google Places API results
| rules: { | ||
| required: | ||
| countryCode === 'CA' | ||
| ? 'Please select your province.' // FYI we won't translate this |
There was a problem hiding this comment.
why remove this comment?
dannyphan2000
left a comment
There was a problem hiding this comment.
We're closing this PR since we're checking this change into a feature branch first.
Use https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2614/files
…ropriate locations
…rrent PR, will add back for next PR
3b45f3f to
47ef052
Compare
Description
This PR implements Address Autocomplete functionality for checkout in the PWA Kit storefront.The implementation includes a mock address service that simulates the Google Places API, which can then be replaced with the actual API integration in the future.
Types of Changes
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization