-
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
rerender country and state if visited via deep link #28404
rerender country and state if visited via deep link #28404
Conversation
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
It's possible to test this on iOS and Android too To test Desktop MacOS you can
|
Change QA tests to
|
Co-authored-by: Eugene Voloshchak <copyreading@gmail.com>
Co-authored-by: Eugene Voloshchak <copyreading@gmail.com>
@eVoloshchak have added video for desktop now, my system is giving some error while building app for mobile right now, but i have verified already few hours ago, can we go ahead without mobile video? |
@@ -81,12 +80,19 @@ function AddressPage({privatePersonalDetails, route}) { | |||
const isLoadingPersonalDetails = lodashGet(privatePersonalDetails, 'isLoading', true); | |||
const [street1, street2] = (address.street || '').split('\n'); | |||
const [state, setState] = useState(address.state); | |||
const [currentCountry, setCurrentCountry] = useState(PersonalDetails.getCountryISO(address.country)); |
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.
Generally - no, but If you won't have success with building iOS and Android - I'll help you with videos |
Yes, please help with videos |
is there anything required from my end @eVoloshchak ? |
@@ -87,6 +86,11 @@ function AddressPage({privatePersonalDetails, route}) { | |||
* @param {Object} values - form input values | |||
* @returns {Object} - An object containing the errors for each inputID | |||
*/ | |||
useEffect(() => { |
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.
Co-authored-by: Eugene Voloshchak <copyreading@gmail.com>
@@ -87,6 +86,11 @@ function AddressPage({privatePersonalDetails, route}) { | |||
* @param {Object} values - form input values | |||
* @returns {Object} - An object containing the errors for each inputID | |||
*/ | |||
useEffect(() => { | |||
if(!address) return; |
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.
@@ -87,6 +86,11 @@ function AddressPage({privatePersonalDetails, route}) { | |||
* @param {Object} values - form input values | |||
* @returns {Object} - An object containing the errors for each inputID | |||
*/ | |||
useEffect(() => { |
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 the wrong place to put useEffect
, it's currently between validate function and JSdoc for the said function
It should be placed after const [state, setState] = useState(address.state);
(make sure there's an empty line above and below useEffect)
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.
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.
Apologies @techievivek, accidentally approved the PR, meant to request changes
Ignore this for now
const isLoadingPersonalDetails = lodashGet(privatePersonalDetails, 'isLoading', true); | ||
const [street1, street2] = (address.street || '').split('\n'); | ||
const [state, setState] = useState(address.state); | ||
|
||
useEffect(() => { |
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.
It's misaligned and there's a space required after an if
statement (same as throughout the app)
useEffect(() => {
if (!address) {
return
}
setState(address.state);
setCurrentCountry(address.country);
}, [address]);
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-09-29.at.20.25.44.movMobile Web - Chromescreen-20230929-203246.mp4Mobile Web - SafariRPReplay_Final1696012676.MP4DesktopScreen.Recording.2023-09-29.at.21.23.03.moviOSScreen.Recording.2023-09-29.at.20.42.39.movAndroidScreen.Recording.2023-09-29.at.21.10.51.mov |
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
hi @techievivek all the check have been passed now, can you please have a look? |
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.
Looks good.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
hi @techievivek i have not recieved any upwork contract for this, this is my first PR |
@saranshbalyan-1234, don't worry, this will be handled before/when the payment is due (7 days after PR hits production) |
@eVoloshchak thanks for the response |
🚀 Deployed to staging by https://github.com/techievivek in version: 1.3.76-0 🚀
|
QA raised this #27814 was still not fixed on this pr, can you please confirm @eVoloshchak @saranshbalyan-1234 |
Checking |
Cannot reproduce on staging |
@eVoloshchak City field is not populating, I have checked this on web/chrome |
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀
|
this PR caused this regression https://github.com/Expensify/App/pull/28362/files |
🚀 Deployed to staging by https://github.com/techievivek in version: 1.3.77-0 🚀
|
@saranshbalyan-1234 @eVoloshchak Ping you guys because we are having the same problem with city field. I mentioned about it before @saranshbalyan-1234 raise this PR. But It seems no one paid attention to it. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.77-7 🚀
|
Details
Fixed State and country not rendering if visited address page via deep link
Fixed Issues
$ #27814
PROPOSAL:
$ #27814 (comment)
Tests
Same as Qa Steps
Offline tests
Same as Qa Steps
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-09-28-at-14225-am_j3G9Rn4V.mp4
Mobile Web - Chrome
WhatsApp.Video.2023-09-28.at.7.08.19.AM.mp4
Mobile Web - Safari
whatsapp-video-2023-09-28-at-65801-am_rmlarL7O.mp4
Desktop
screen-recording-2023-09-28-at-112839-pm_ipK8PtYB.mp4
iOS
Android