-
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 image reload on session change #26365
fix image reload on session change #26365
Conversation
@cubuspl42 I'm wondering weather to attach the screen recordings for mobile devices? |
in mobile devices we have to move back to main page then settings and then all this process is there, and to observe the reload we have to go again with the same flow once again reverse. This doesn't seem a valid case for me. |
Added screen recordings for web and desktop. |
@cubuspl42 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] |
@@ -22,7 +22,9 @@ function Image(props) { | |||
return {uri: `${propsSource.uri}?encryptedAuthToken=${encodeURIComponent(authToken)}`}; | |||
} | |||
return propsSource; | |||
}, [propsSource, isAuthTokenRequired, session]); | |||
|
|||
// eslint-disable-next-line react-hooks/exhaustive-deps |
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.
We definitely need a comment explaining why we disable the warning
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.
Will update.
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.
// The `session` prop is not necessary, as it triggers image reloading whenever the session changes. Refer to issue #26034 for more details.
Method I used: GP4 + "Could you make this comment more proper English?"
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.
@cubuspl42 Updated the comment.
So what you're saying is that on iOS/Android (Native?) before the fix it was difficult to observe the bug, but now it's impossible? Or that the fix didn't work all on some platforms? |
Yes, it's important to test on all platforms, even when we just confirm that the modified component still works as expected. There always might be some surprising behavior both on Native (which is much different on the technical level) and from mobile browsers quirks. |
What I'm saying is even if try the same flow, it would be same behaviour because once we disable the 2FA we have to go the screen again by navigation which causes image to re-render whereas in browser we can observe this because the report is in background itself, understood? |
@cubuspl42 I have updated the screenrecording for ios devices. You can start your review by then I'll update the android screen-recordings. |
@cubuspl42 I have completed all the changes you requested and also added screen recordings for other platforms too. |
2b43ebb
to
bb85ebf
Compare
bb85ebf
to
bf4a775
Compare
Reviewer Checklist
Screenshots/VideosWeb2fa-image-reload-web.mp4Mobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - 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/yuwenmemon in version: 1.3.62-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.62-4 🚀
|
Details
Fixes image reload on session change while disabling the 2FA.
Fixed Issues
$ #26034
PROPOSAL: #26034 (comment)
Tests
Offline tests
NA - 2FA won't work on offline.
QA Steps
Same as above
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
Kapture.2023-08-31.at.12.49.50.mp4
Mobile Web - Chrome
video_2023-09-01_10-49-00.mp4
Mobile Web - Safari
Kapture.2023-08-31.at.17.59.44.mp4
Desktop
Kapture.2023-08-31.at.12.58.54.mp4
iOS
Kapture.2023-08-31.at.17.41.55.mp4
Android
video_2023-09-01_10-49-08.1.mp4