Hmm it is not here error appears briefly when enabling workflows#40219
Hmm it is not here error appears briefly when enabling workflows#40219ZhenjaHorbach wants to merge 13 commits intoExpensify:mainfrom
Conversation
|
@hungvu193 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] |
|
@hungvu193 |
|
BUG: Enable policy makes NotFound screen shows. Reproduce steps are in the video, or just create a ws offline, turn on Workflows, go online and reload the page. Screen.Recording.2024-04-15.at.09.44.30.mov |
DetailsI would like to ask about the second case that you described It looks as expected In the sense that when we create a workspace offline And then turn on the Internet and immediately reload the pageOur request to enable this feature will not be completed because it was in the queue Should we handle such cases?) I fixed the bug ) And a little explanation The same thing happens on main |
|
I actually waited for all the requests to be called, so this is valid bug I believe. I didn't reload the page immediately. Screen.Recording.2024-04-16.at.10.17.32.mov |
src/libs/actions/Policy.ts
Outdated
| resolve(); | ||
| }).then(() => { | ||
| Navigation.navigate(featureRoute); | ||
| setTimeout(() => { |
There was a problem hiding this comment.
Do you have any other solution for this? We avoid using setTimeout
There was a problem hiding this comment.
This is the problem I described here
And this problem is mentioned here
App/src/libs/actions/Policy.ts
Lines 3915 to 3918 in 268b870
It's still reproduce (even on main branch )
When we navigate
We have cases when isFeatureEnabled equals false for a couple of milliseconds
So why don't we make the navigation happen after the switch animation ends?
There was a problem hiding this comment.
Let's take a look at my video, I posted. I waited for all the request were called, so why are you saying that
Our request to enable this feature will not be completed because it was in the queue
There was a problem hiding this comment.
Sorry
My fault, I didn't notice that you waited for all the request were called
In this case, I fixed the cases you described )
There was a problem hiding this comment.
I don't think your explanation here is correct. Let's discuss our situation here, all APIs were called and we still saw the NotFound screen. That shouldn't happen and I think we can avoid using timeout to fix it.
There was a problem hiding this comment.
I want to fix a specific case with these changes
When, after enabling a feature, we navigate immediately
That Onyx.update sometimes does not change the value immediately
As result we have NotFound for a couple of milliseconds
I think problem related with Promise which we use
App/src/libs/actions/Policy.ts
Lines 3915 to 3921 in 268b870
But so as not to cause regression
I was thinking of using setTimeout inside Promise
To be sure that everything is called in the correct order
2024-04-17.13.39.19.mov
(Video is from main branch )
but okay )
I'll try to find an alternative solution )
Thank you for review )
There was a problem hiding this comment.
I'll look into this issue thoroughly over the weekend
If you do not mind
There was a problem hiding this comment.
Yeah yeah, np. Please keep me posted
|
I decided to update my GPG keys |
Details
Fixed Issues
$ #39443
PROPOSAL: #39443 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2024-04-14.at.23.35.34.mov
Android: mWeb Chrome
Screen.Recording.2024-04-14.at.23.35.34.mov
iOS: Native
Screen.Recording.2024-04-14.at.23.39.27.mov
iOS: mWeb Safari
Screen.Recording.2024-04-14.at.23.39.27.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-14.at.23.33.41.mov
MacOS: Desktop
Screen.Recording.2024-04-14.at.23.37.30.mov