-
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 Issue 9253: Previous chat username is displayed when you navigate back from different chat #10069
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
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.
Changes look fine. Thanks for the signed commit @ntdiary.
I had troubles with reproducing this even back then. Do you have anything specific in the QA steps that makes it easier for me or the QA to reproduce the issue?
Hi @mananjadhav, I'll try to demonstrate it in
demo.mp4 |
Hi, this might be an easier way ( in mobile web ):
|
Hi, @mananjadhav, can you reproduce the issue with the latest steps? 🙂 |
I was OOO last week, getting to this by tomorrow. Can you please resolve conflicts @ntdiary meanwhile? thank you for your patience on this one. |
@mananjadhav resolved. 🙂 |
Right on time. Thanks, just pulled your changes to review and test. Will send an update soon.
Thanks @ntdiary, these steps are much clearer and reproducible. Appreciate it. |
@AndrewGable I tested this on iOS Simulator Safari for mWeb. (tested on all platforms). Changes look fine. The only thing I am not sure if 🎀 👀 🎀
|
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
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Hey! I came across this change because I am working on an issue to refresh the report on network reconnect when the sidebar is open. This solution has an issue where it breaks some existing behavior since it forces the report page to unmount when the sidebar is revealed. There is quite a bit of code in App/src/pages/home/ReportScreen.js Lines 203 to 205 in a70aa0c
|
Hi, sorry for that, I didn't expect such a problem. diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js
index e46a4ed27..ea09a4eb0 100644
--- a/src/pages/home/ReportScreen.js
+++ b/src/pages/home/ReportScreen.js
@@ -198,9 +198,7 @@ class ReportScreen extends React.Component {
return null;
}
- if (this.props.isSmallScreenWidth && this.context === 'open') {
- return null;
- }
+ const visibility = (this.props.isSmallScreenWidth && this.context === 'open') ? styles.visibilityHidden : {};
// We let Free Plan default rooms to be shown in the App - it's the one exception to the beta, otherwise do not show policy rooms in product
if (!Permissions.canUseDefaultRooms(this.props.betas)
@@ -221,7 +219,7 @@ class ReportScreen extends React.Component {
reportClosedAction = lodashFindLast(this.props.reportActions, action => action.actionName === CONST.REPORT.ACTIONS.TYPE.CLOSED);
}
return (
- <ScreenWrapper style={[styles.appContent, styles.flex1, {marginTop: this.state.viewportOffsetTop}]}>
+ <ScreenWrapper style={[styles.appContent, styles.flex1, {marginTop: this.state.viewportOffsetTop}, visibility]}>
<HeaderView
reportID={reportID}
onNavigationMenuButtonClicked={() => Navigation.navigate(ROUTES.HOME)} This way we can both fix this issue and keep the report mounted. |
Reverted |
Hi @AndrewGable, the latest solution can work well for these scenarios in my test, should I submit a new PR later ? 🙂 |
Details
Proposal option 1
Just show blank page when backing
Fixed Issues
$ #9253
Tests
This problem only occurs on mobile web platform.
localhost:8080
localhost:8080
( you have logged in in thestep 2
).step 3
.PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
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)PR Reviewer Checklist
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** comment above it */
displayName
propertythis
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)QA Steps
This problem only occurs on mobile web platform.
staging.new.expensify.com
staging.new.expensify.com
( you have logged in in thestep 2
).step 3
.Screenshots
Web
macos-chrome.mp4
Mobile Web
android chrome
android-chrome.mp4
ios safari
ios-safari.mp4
Desktop
macos-desktop.mp4
iOS
ios-native.mp4
Android
android-native.mp4