-
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
Prevent full screen loading on Workflows page if data is present #38428
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-03-19_14.06.46.mp4Android: mWeb Chromeandroid-chrome-2024-03-19_13.06.16.mp4iOS: Nativeios-app-2024-03-19_15.03.41.mp4iOS: mWeb Safariios-safari-2024-03-19_14.31.14.mp4MacOS: Chrome / Safaridesktop-chrome.mp4MacOS: Desktopdesktop-app-2024-03-19_12.55.19.mp4 |
This comment was marked as resolved.
This comment was marked as resolved.
thanks for testing i'll look into it and adress this bug. |
This PR should also resolve #38566 |
This comment was marked as outdated.
This comment was marked as outdated.
Done 👍 |
@ishpaul777 Unfortunately still seeing a flash of the loader specifically when turning off the toggle whilst offline: ios-app-off-2024-03-19_15.08.04.mp4 |
@ishpaul777 can we prioritize getting this one over the finish line please instead of picking up new tasks. Thank you! |
@jjcoffee Can you please give me hints, how can i switch to offline and online while on same page in simulator?
i beleive loading indicator is only visible when I reproduced this is because achdata is undefined, when toggle is off and on reconnect there is call to |
@ishpaul777 Is there any reasoning/context for where it was decided to add a loader for this page? I'm not 100% sure it makes sense unless we're missing data for both items (so |
I think some loading should be in place. That is for case of deeplinking to the page when you do not have the data loaded from elsewhere. But I think we could do a better work with that and use some kind of a skeleton for the parts which we do not have data for. |
Resolved conflicts. |
This was decide here #37629 (comment) to show loader. |
Can you try to repro again i am not able to repro this Screen.Recording.2024-03-21.at.7.09.40.PM.mov |
@jjcoffee are you available to continue your review on this PR? |
@luacmartins Sure, it's on my list for today. Will retest soon to confirm whether or not this is still reproducible. |
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 and tests well
Same issue is still there, easy enough to spot if you just go offline and come back online (no changes need to be made): desktop-chrome-bug-2024-03-22_16.26.10.mp4We are optimistically setting App/src/libs/actions/Policy.ts Lines 2055 to 2057 in b9f3906
So whenever we don't have a bank account set up,
I think it might make more sense to check instead for In reality the only time we'll then display the loader is for this case (deeplinking to the workflows page from a fresh sign-in), as the policy data will be populated earlier anyway. |
Yea, I think that makes sense, let's change the conditional and resolve conflicts! @ishpaul777 |
@ishpaul777 just making sure that you saw this comment:
|
hmm but we added loader for the condition when specifically achData is not fetched, and undefined for example a fresh sign in. so in case if its not fetched and internet is slow (change internet to slow 3g to repro) we dont actually show the loader but the "connect bank account" option while we actually want a loader here Screen.Recording.2024-03-23.at.2.30.47.AM.mov |
@luacmartins yes i was trying to make sense out of it and doing some testing |
After think for a while i'd vote this #38428 (comment) is not a bug but the expected behaviour i.e we want to show to loader when we aren't sure if user has a verified BA(reimbursementAccount?.achData === undefined), example when offline to online and a call in progress |
Hmm I think we should show stale data if we have it locally and then update the UI. What you have in this video seems to be the correct behavior to me. |
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.
Much more stable like this. LGTM!
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
Tests were passing |
Details
Fixed Issues
$ #38153
$ #38566
PROPOSAL:
Tests
Test steps 2
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
Cant be tested on simulator
Android: mWeb Chrome
Cant be tested on simulator
iOS: Native
Cant be tested on simulator
iOS: mWeb Safari
Cant be tested on simulator
MacOS: Chrome / Safari
Screen.Recording.2024-03-16.at.2.03.50.AM.mov
MacOS: Desktop
Screen.Recording.2024-03-16.at.2.54.44.AM.mov