-
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 login page appear for a while #39595
fix login page appear for a while #39595
Conversation
@allroundexperts 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] |
@allroundexperts Please help review PR once you have a chance |
8991222
to
9fb92f1
Compare
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-08.at.6.39.36.PM.movAndroid: mWeb ChromeScreen.Recording.2024-04-08.at.6.35.17.PM.moviOS: NativeScreen.Recording.2024-04-08.at.6.34.14.PM.moviOS: mWeb SafariScreen.Recording.2024-04-08.at.6.32.30.PM.movMacOS: Chrome / SafariScreen.Recording.2024-04-08.at.6.28.15.PM.movMacOS: DesktopScreen.Recording.2024-04-08.at.6.30.26.PM.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.
Looks good. Thanks!
src/hooks/useNetwork.ts
Outdated
@@ -29,5 +29,5 @@ export default function useNetwork({onReconnect = () => {}}: UseNetworkProps = { | |||
prevOfflineStatusRef.current = isOffline; | |||
}, [isOffline]); | |||
|
|||
return {isOffline: isOffline ?? false}; | |||
return {isOffline: networkStatus === CONST.NETWORK.NETWORK_STATUS.OFFLINE}; |
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.
What does this do? It's kind of weird that we have an isOffline
variable, but we don't use it here and are instead looking at the status.
It looks in the other components, you're using the networkStatus
variable to make decisions, so why does this need to change?
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.
What does this do? It's kind of weird that we have an isOffline variable, but we don't use it here and are instead looking at the status.
It looks in the other components, you're using the networkStatus variable to make decisions, so why does this need to change?
This change is to fix the components that are using const {isOffline} = useNetwork()
, such as this issue
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.
Yes, I understand that. But the logic here seems unintuitive to me. That we have an isOffline
variable. But then we return isOffline
as something other than that variable.
Is there a way that we can make this more clear and easy to understand?
@puneetlath Please help check the above comments once you have a chance. Thanks |
@puneetlath Any updates here? |
Friendly bump here - can we try to get this one over the finish line soon? |
src/hooks/useNetwork.ts
Outdated
@@ -29,5 +29,5 @@ export default function useNetwork({onReconnect = () => {}}: UseNetworkProps = { | |||
prevOfflineStatusRef.current = isOffline; | |||
}, [isOffline]); | |||
|
|||
return {isOffline: isOffline ?? false}; | |||
return {isOffline: networkStatus === CONST.NETWORK.NETWORK_STATUS.OFFLINE}; |
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.
Yes, I understand that. But the logic here seems unintuitive to me. That we have an isOffline
variable. But then we return isOffline
as something other than that variable.
Is there a way that we can make this more clear and easy to understand?
@puneetlath I resolved your comment here in this commit. Now, we just use the |
This seems much more clear to me. @allroundexperts can you take a look and also re-test? |
On it today. |
…public-room-sign-in-page
Working good. Screen.Recording.2024-04-29.at.12.32.17.PM.mov |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 1.4.67-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to staging by https://github.com/puneetlath in version: 1.4.68-0 🚀
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 1.4.67-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.68-3 🚀
|
Details
Fixed Issues
$ #38212
PROPOSAL: #38212 (comment)
Tests
Offline tests
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 methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Screen.Recording.2024-04-04.at.19.01.34.mov
Android: mWeb Chrome
Screen.Recording.2024-04-04.at.18.58.41.mov
iOS: Native
Screen.Recording.2024-04-04.at.19.04.25.mov
iOS: mWeb Safari
Screen.Recording.2024-04-04.at.19.05.38.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-04.at.18.52.25.mov
MacOS: Desktop
Screen.Recording.2024-04-04.at.18.55.18.mov