-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix: Address field shows previous set of results on typing any char after removing the previous text #18258
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
||
// To avoid regeneration of query object on each re-renders | ||
const query = useMemo(() => ( | ||
{language: props.preferredLocale, types: 'address', ...(props.isLimitedToUSA && {components: 'country:us'})} | ||
), [props.preferredLocale, props.isLimitedToUSA]); |
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.
// To avoid regeneration of query object on each re-renders | |
const query = useMemo(() => ( | |
{language: props.preferredLocale, types: 'address', ...(props.isLimitedToUSA && {components: 'country:us'})} | |
), [props.preferredLocale, props.isLimitedToUSA]); | |
const query = useMemo(() => ({ | |
language: props.preferredLocale, | |
types: 'address', | |
components: props.isLimitedToUSA ? 'country:us' : undefined, | |
}), [props.preferredLocale, props.isLimitedToUSA]); |
Just for visibility and I think the comment is not necessary here.
Reviewer Checklist
Screenshots/VideosWebweb.mp4Mobile Web - Chromemweb-chrome.mp4Mobile Web - Safarimweb-safari.mp4Desktopdesktop.mp4iOSios.mp4Androidandroid.mp4 |
@Pujan92 Can you please make tests step clearer? Example: type quickly and verify you only see the results of the last typed string or verify you only see results after you are done typing i.e. you should not see intermediate results, etc. (or in any way you see fit better). For Web/Desktop, please indicate that you should check the Network tab and verify that old requests are cancelled once you start typing more letters. Also please remove the offline tests. |
Ok @s77rt , are these steps makes sense?
|
@Pujan92 Sorry for the confusion, but by removing the offline tests I meant to keep the title and just write n/a (not applicable). As for the tests please update to:
|
@s77rt Thanks! updated with the suggested changes. |
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.
LGTM! 🚀
cc @flodnv
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.
Lovely, thanks!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/flodnv in version: 1.3.10-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.12-0 🚀
|
Details
Updated AddressSearch component to use useMemo for the query object which gets passed to the GooglePlacesAutocomplete, with that same ref of query we are passing to the GooglePlacesAutocomplete which eventually won't recreate the function debounceData inside GooglePlacesAutocomplete.
Fixed Issues
$ #16367
PROPOSAL: #16367 (comment)
Tests
Offline Tests
N/A
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Screen.Recording.2023-05-02.at.12.01.50.PM.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
Screen.Recording.2023-05-02.at.12.09.01.PM.mov
iOS
Simulator.Screen.Recording.-.iPhone.14.-.2023-05-02.at.12.05.28.mp4
Android