-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Save the World - Navigation problem on teachers contact page after a reload #32065
Save the World - Navigation problem on teachers contact page after a reload #32065
Conversation
…page after a reload
@shubham1206agra 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] |
Hello ) Plus a little explanation I added conditions here so as not to see back-to on the screens if we get there from the profile (That is, the behavior remains the same as in the main branch) But I couldn’t decide how to do it right What do you think ? |
const onBackButtonPress = () => { | ||
if (navigateBackTo === ROUTES.SETTINGS_PROFILE) { | ||
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.route); | ||
|
||
return; | ||
} | ||
|
||
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(navigateBackTo)); | ||
}; |
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.
Use useCallback
here
const onNewContactMethodButtonPress = () => { | ||
if (navigateBackTo === ROUTES.SETTINGS_PROFILE) { | ||
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.route); | ||
|
||
return; | ||
} | ||
|
||
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.getRoute(navigateBackTo)); | ||
}; |
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.
Use useCallback
here
Current one seems right |
Reviewer Checklist
Screenshots/VideosAndroid: NativeNA Android: mWeb ChromeiOS: NativeNA iOS: mWeb SafariScreen.Recording.2023-11-28.at.12.07.55.PM.movMacOS: Chrome / SafariScreen.Recording.2023-11-28.at.11.57.33.AM.movMacOS: DesktopScreen.Recording.2023-11-28.at.12.33.46.PM.mov |
const onNewContactMethodButtonPress = useCallback(() => { | ||
if (navigateBackTo === ROUTES.SETTINGS_PROFILE) { | ||
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.route); | ||
|
||
return; | ||
} | ||
|
||
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.getRoute(navigateBackTo)); | ||
}, [navigateBackTo]); |
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.
const onNewContactMethodButtonPress = useCallback(() => { | |
if (navigateBackTo === ROUTES.SETTINGS_PROFILE) { | |
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.route); | |
return; | |
} | |
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.getRoute(navigateBackTo)); | |
}, [navigateBackTo]); | |
const onNewContactMethodButtonPress = useCallback(() => { | |
if (navigateBackTo === ROUTES.SETTINGS_PROFILE) { | |
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.route); | |
return; | |
} | |
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.getRoute(navigateBackTo)); | |
}, [navigateBackTo]); |
const onBackButtonPress = useCallback(() => { | ||
if (navigateBackTo === ROUTES.SETTINGS_PROFILE) { | ||
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.route); | ||
|
||
return; | ||
} | ||
|
||
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(navigateBackTo)); | ||
}, [navigateBackTo]); |
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.
const onBackButtonPress = useCallback(() => { | |
if (navigateBackTo === ROUTES.SETTINGS_PROFILE) { | |
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.route); | |
return; | |
} | |
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(navigateBackTo)); | |
}, [navigateBackTo]); | |
const onBackButtonPress = useCallback(() => { | |
if (navigateBackTo === ROUTES.SETTINGS_PROFILE) { | |
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.route); | |
return; | |
} | |
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(navigateBackTo)); | |
}, [navigateBackTo]); |
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.
Conflicts need to be resolved.
@tylerkaraszewski |
@tylerkaraszewski Can you merge this please? |
✋ 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/tylerkaraszewski in version: 1.4.7-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.7-4 🚀
|
if (navigateBackTo === ROUTES.SETTINGS_PROFILE) { | ||
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.route); | ||
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.
@shubham1206agra can I have context why this change was necessary?
This code is being removed in #38308 to fix #38296.
So I'd like to confirm if this doesn't cause any side effect.
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.
I'm not sure now, as this code is old. Just run the steps in this PR to verify no problem occurs.
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.
Here is a little explanation of why this was done
#32065 (comment)
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.
Thanks, @ZhenjaHorbach and @shubham1206agra for the reply.
@mkhutornyi @akinwale I reproduced the current PR test steps on the changes I made and the output is still the same:
Details
Save the World - Navigation problem on teachers contact page after a reload
Fixed Issues
$ #31895
PROPOSAL: #31895 (comment)
Tests
I am a teacher
screenOffline tests
I am a teacher
screenQA Steps
I am a teacher
screenPR 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)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
Android: Native
Not relevant
Android: mWeb Chrome
android.mov
iOS: Native
Not relevant
iOS: mWeb Safari
ios.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov